arXiv:2608.22201stat.MEAug 2026

Manuscript Offprint

arXiv:2608.22201

Efficient Regression Models for Scan Statistics

Gazi Abdur Rakib, Tristan Ashton, Ryan A. Loomis, Brian S. Mason, Eric J. Murphy, Ci Xue, Jeff M. Phillips

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Gazi Abdur Rakib

University of Utah & CosmicAI

gaziabdur.rakib@utah.edu

Tristan Ashton

National Radio Astronomy Observatory & CosmicAI

tashton@nrao.edu

Ryan A. Loomis

National Radio Astronomy Observatory & CosmicAI

rloomis@nrao.edu

Brian S. Mason

National Radio Astronomy Observatory & CosmicAI

bmason@nrao.edu

Eric J. Murphy

National Radio Astronomy Observatory & CosmicAI

emurphy@nrao.edu

Ci Xue

National Radio Astronomy Observatory & CosmicAI

cxue@nrao.edu

Jeff M. Phillips

University of Utah & CosmicAI

jeffp@cs.utah.edu

Abstract

We introduce a new class of regression models for scan statistics on real-valued signals. These allow for improved fitting of non-stationary signals to contrast with the interval anomalies identified by the scan statistics. Our models can represent generalized likelihood ratio statistics. While these methods naively require O(n4)O(n^{4}) for a length n signal, we provide algorithmic improvements which lead to linear time algorithms (with assumptions on max interval width). Our methods, especially ones based on Nadaraya-Watson kernel regression, are demonstrated as especially effective in detecting both synthetically planted anomalies, and for identifying a real “platforming” issue in interferometric astronomy.

Preprint.

1 Introduction

For a signal x=⟨x[1],x[2],…,x[n]⟩\boldsymbol{x} = \langle x[1], x[2], \ldots, x[n] \rangle, measured at regular intervals [n]={1,2,…,n}[n] = \{1, 2, \ldots, n\} we tackle the challenge of finding an anomalous interval. This task occurs in widespread applications in modeling such as for time series (e.g., stocks [Braun et al., 2018] or weather data [Horel et al., 2002]), interferometric sensing (e.g., from radio telescopes Escoffier et al. [2007] or satellites [Suto et al., 2013]), and genomics (e.g., for copy-number [Zack et al., 2013]). Such anomalous intervals often manifest from instrumental error; that is, these anomalous interval subsets are interruptions in the proper collection of the raw measurements. While some cases can be easily spotted by eye, these data are often directly aggregated and passed to complex downstream analyses, so it is critical to detect these anomalies early and robustly so that they can be dealt with before they corrupt or degrade the complex processes that follow.

Variants of this problem have been studied under the framework of scan statistics Abolhassani and Prates [2021], Glaz and Koutras [2024] which "scan" every possible interval Ia,b={a,a+1,…,b}I_{a,b} = \{a, a+1, \ldots, b\} of the signal, scoring each one, and returning the interval and score of the most extreme one. This most extreme score is the scan statistic. These models traditionally searched for dense clusters of data, often in irregularly-spaced sequences. Regardless, these approaches fit a probabilistic model to the full signal and observe how much better the fit can be if separate models are fit inside and outside the interval. The most relevant formalization of this setting has that each observation x[i]x[i] is in R\mathbb{R} and is drawn independently from a normal distribution N(μ,σ)\mathcal{N}(\mu, \sigma) with unknown mean μ\mu. From here a closed form log-likelihood ratio score (c.f., Huang et al. [2007], Agarwal et al. [2006a], Kulldorff et al. [2009]) can be devised, which we review (and extend) in Section 2.

The interval anomaly – an extreme Ia,bI_{a,b} in the set of all such intervals I\mathcal{I} – is an essential modeling component for the situations we care about, since it corresponds to a rare, and temporary instrumental issue in an otherwise useful signal. However, a more widely studied setting called change point detection has otherwise similar modeling. It also considers regular 1-dimensional signals, and derives statistical scores to determine when at certain indexes i∈[n]i \in [n] the fit of an interval ⟨a,…,i⟩\langle a, \ldots, i \rangle of the signal likely changes to a new fit in ⟨i+1,…,b⟩\langle i + 1, \ldots, b \rangle. This broader area Aminikhanghahi and Cook [2017], Niu et al. [2016] has more developed methods and richer models for the underlying patterns of the signals, and these will resemble the ones we derive and evaluate Siegmund and Venkatraman [1995], Yang et al. [2020], Yu et al. [2022], Harchaoui et al. [2008]; see Appendix A for more in depth review. One could imagine using it to detect each boundary of the anomalous interval. However, this change point setting is structurally different from the scan statistic: it does not enforce that the regions before and after the anomalies adhere to the same model.

In this framing, we make the following contributions:

  1. We formulate new closed-form models of scan statistics that still assume normal noise, but rather than restricting to a constant value, the base model can now fit a regression model – either polynomial or kernel-based. Under the assumed generative and noise models, the proposed polynomial regression anomaly score reduces to a log-likelihood ratio, so ranking and filtering by this score inherits the classical Neyman–Pearson optimality property for the associated detection problem.

  2. We show that the Nadaraya-Watson kernel regression (NWKR) model has favorable modeling properties, requiring only controlled local dependence between consecutive signal values x[i]x[i] and x[i+1]x[i+1], as governed by the kernel bandwidth. The resulting anomaly score is a natural analog to a generalized likelihood ratio statistic for detecting local departures in a fully nonparametric setting.

  3. We devise and analyze efficient algorithms for most of these models when we restrict intervals considered to be of width at most w. For dd degree polynomial regression models the scan statistic can be computed in O(nwd3)O(nwd^{3}) time. For NWKR we can compute it in O(nwr)O(nwr) time where rr is the width of a truncated kernel. This provides orders of magnitude improvement over direct implementations of these statistics which would take O(n4)O(n^{4}) time.

  4. Finally, we evaluate these methods on synthetic and real world data sets demonstrating the efficiency of algorithms and effectiveness of the new models, especially the NWKR variant. A key motivating example is finding “platforming” anomalies [ALMA Pipeline Team, 2025] that occur in bandpass data from radio telescopes [Escoffier et al., 2007].

References (73)