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) 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.
Figures & tables
Model
Solve
Update
Evaluate
Total
Improved Total
Truncated Total
F0
O(n)
O(1)
O(1)
O(n2w)
O(nw)
O(nw)
Fd
O(nd2)
O(d3)
O(d)
O(n2wd3)
O(nwd3)
O(nwd3)
F\textsckrr
O(n3)
O(n3)
O(n)
O(n4w)
O(n4w)
O(n4w)
F\textscnwkr
O(1)
O(1)
O(n)
O(n3w)
O(n2w)
O(nwr)
Table 1: Runtime Comparison of models in Algorithm 1 for a sequence of length n , with max interval size w , and kernels truncated at radius O(r) . Improved results derived in Section 3.2 .
Figure 1: Example synthetic signal. Anomaly width at 5% and SNR= 2.5×σ .
Figure 2: Mean localization score comparison on quadratic trend data by varying SNR or anomaly width.
Figure 3: Mean localization score comparison on AR(2) data by varying SNR or anomaly width.
Figure 4: Comparison of NWKR with other baselines on quadratic trend data in a varying SNR (left) and anomaly width (right).
Figure 5: Log-log plots for runtime scaling on signal as a function of signal length n (left), w (middle), and truncation range r (right). Otherwise parameters fixed ( n=10,000 , w=200 , r=300 )
Method
time (ms)
F0
17
FNWKR Laplace
69
FNWKR Gaussian
70
F1 Poly (deg 1)
392
F2 Poly (deg 2)
472
FNWKR Gaussian (naive)
759,396
Table 2: Median runtime at n=1000 .
Figure 6: ALMA calibration signal with platforming.
Figure 7: Performance analysis of different methods on variable IOU settings on ALMA dataset
Figure 8: Performance analysis of different methods on variable score settings on ALMA dataset
Method
TP
FP
TN
FN
Accuracy
Precision
Recall
F1
F0 Mean
118
2,561
36,089
113
0.9312
0.0440
0.5108
0.0811
F1 Poly (deg 1)
154
3,980
34,670
77
0.8957
0.0373
0.6667
0.0706
F2 Poly (deg 2)
174
2,932
35,718
57
0.9231
0.0560
0.7532
0.1043
FKR Gaussian
231
191
38,459
0
0.9951
0.5474
1.0000
0.7075
FKR Laplace
231
277
38,373
0
0.9929
0.4547
1.0000
0.6252
CAPA
31
554
38,096
200
0.9806
0.0530
0.1342
0.0760
Table 3: Performance metrics on the large ALMA dataset ( N=38,881 ) at τS=0.3
Method
Precision
Recall
F1
FN rate
FP rate
Data reducer (a person)
0.3665
0.5108
0.4268
0.4892
0.0053
Existing ALMA heuristic
0.7018
0.4233
0.5281
0.5767
0.0013
Our F\textscnwkr Gaussian
0.5474
1.0000
0.7075
0
0.0049
Table 4: Comparison with estimated existing ALMA False Positive and False Negative rates
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Synthetic dataset construction and anomaly injection
Figure 10: Different generated signals
Figure 11: Different anomalies visualized in signal
Figure 12: AR(2) dataset construction and anomaly injection
Figure 13: Different generated AR(2) signals
Figure 14: Different anomalies visualized in AR(2) signal
Method
0.50
0.55
0.60
0.65
0.70
0.75
0.80
0.85
0.90
0.95
1.00
F0 Mean
0.6000
0.5920
0.5920
0.5797
0.5797
0.5756
0.5546
0.5460
0.5106
0.2624
0.2182
F1 Poly (deg 1)
0.6649
0.6545
0.6510
0.6223
0.6150
0.6075
0.5611
0.5408
0.4854
0.2381
0.1888
F2 Poly (deg 2)
0.7172
0.7074
0.7041
0.6702
0.6596
0.6489
0.5810
0.5444
0.4699
0.1922
0.1727
F\textscnwkr Gaussian
0.9902
0.9902
0.9902
0.9902
0.9902
0.9892
0.9892
0.9892
0.9892
0.9870
0.9870
F\textscnwkr Laplace
0.9825
0.9825
0.9780
0.9689
0.9573
0.9526
0.9333
0.9057
0.8873
0.8627
0.8342
FS NWKR Gaussian
0.0339
0.0171
0.0171
0.0171
0.0171
0.0171
0.0171
0.0171
0.0171
0.0000
0.0000
Appendix
Table 5: F1 Score across IoU Thresholds τI for each method, with τS=0.3
Method
TP
FP
FN
Accuracy
Precision
Recall
F1
Runtime (ms)
F0 Mean
99
14
132
0.708
0.8761
0.4286
0.5756
680.4
F1 Poly (deg 1)
113
28
118
0.708
0.8014
0.4892
0.6075
15,392.7
F2 Poly (deg 2)
122
23
109
0.736
0.8414
0.5281
0.6489
18,561.5
F\textscnwkr Gaussian
228
2
3
0.990
0.9913
0.9870
0.9892
223.0
F\textscnwkr Laplace
211
1
20
0.958
0.9953
0.9134
0.9526
214.1
FS NWKR Gaussian
2
1
229
0.540
0.6667
0.0087
0.0171
143.1
Appendix
Table 6: Performance metrics on sampled balanced dataset ( N=500 ) at τI=0.75 , τS=0.3
IoU ≥ 0.50
IoU ≥ 0.75
IoU ≥ 0.90
Method
τS∗
Prec.
Rec.
F1
τS∗
Prec.
Rec.
F1
τS∗
Prec.
Rec.
F1
F0 Mean
0.20
0.690
0.558
0.617
0.25
0.766
0.480
0.590
0.25
0.728
0.394
0.511
F1 Poly (deg 1)
0.30
0.822
0.558
0.665
0.30
0.801
0.489
0.608
0.30
0.748
0.359
0.485
F2 Poly (deg 2)
0.25
0.833
0.649
0.730
0.25
0.808
0.546
0.651
0.25
0.730
0.351
0.474
FKR Gaussian
0.35
0.996
0.987
0.991
0.35
0.996
0.987
0.991
0.35
0.996
0.987
0.991
FKR Laplace
0.30
0.996
0.957
0.976
0.30
0.995
0.913
0.953
0.30
0.995
0.801
0.887
Appendix
Table 7: Summary of best F1 operating points per method across IoU thresholds. For each method, the optimal score threshold ( τS∗ ) is selected to maximize F1. Precision, Recall, and F1 are reported at that threshold.
Method
TP
FP
TN
FN
Accuracy
Precision
Recall
F1
Mean (ms)
Median (ms)
F0 Mean
99
2,561
36,089
132
0.9307
0.0372
0.4286
0.0685
394.3
94.9
F1 Poly (deg 1)
113
3,980
34,670
118
0.8946
0.0276
0.4892
0.0523
9,200.6
2,213.6
F2 Poly (deg 2)
122
2,932
35,718
109
0.9218
0.0399
0.5281
0.0743
11,181.2
2,697.3
FKR Gaussian
228
191
38,459
3
0.9950
0.5442
0.9870
0.7015
190.3
45.2
FKR Laplace
211
277
38,373
20
0.9924
0.4324
0.9134
0.5869
185.5
45.1
CAPA
14
554
38,096
217
0.9802
0.0246
0.0606
0.0350
8.6
5.4
Appendix
Table 8: Performance metrics on the full ALMA dataset ( N=38,881 ) at τI=0.75 , τS=0.3
τS
TP
FP
FN
Accuracy
Precision
Recall
F1
FPR
FNR
0.10
228
6,166
3
0.8413
0.0357
0.9870
0.0688
0.1595
0.0130
0.11
228
4,544
3
0.8831
0.0478
0.9870
0.0911
0.1176
0.0130
0.12
228
3,365
3
0.9134
0.0635
0.9870
0.1192
0.0871
0.0130
0.13
228
2,542
3
0.9345
0.0823
0.9870
0.1519
0.0658
0.0130
0.14
228
1,957
3
0.9496
0.1043
0.9870
0.1887
0.0506
0.0130
0.15
228
1,507
3
0.9612
0.1314
0.9870
0.2319
0.0390
0.0130
Appendix
Table 9: Fine-grained score threshold grid search at τI=0.75 for F\textscnwkr Gaussian on the full ALMA dataset ( N=38,881 ).
Figure 15: Example spectra where F\textscnwkr methods outperform other baselines
Figure 16: High-scoring rows produced from ALMA dataset
Figure 17: Low-scoring rows produced from ALMA dataset
Figure 18: Scan statistic results on WBB solar radiation signal from 2024-12-10.
Time-Series Anomaly Detection identifies unusual patterns or events in sequential data, from sensor readings and network traffic to health and industrial telemetry.
Time-series anomaly detection trades off predictive accuracy, computational efficiency, and interpretability. We use a large language model not as the detector but as the author of one: an autonomous research loop in which the model repeatedly edits a single short NumPy program under a leakage-free objective, keeping the best-scoring detector it finds. The loop discovers two compact detectors, one for univariate and one for multivariate series, that describe short windows by their local spectral features and compare them with the training-region distribution through a covariance-aware distance. On the TSB-AD benchmark these detectors lead the field across metrics, ahead of the strongest classical, deep, and foundation-model baselines including Time-RCD, yet they train no network and use no GPU, and the multivariate detector is faster than every similarly performing baseline. LLM-driven program search is thus a practical route to accurate, efficient, and transparent detectors.
David Berghaus
Lamarr Institute Germany · Fraunhofer IAIS Germany
Hyperparameter tuning almost always means search: fit the model at every value on a grid, score each by cross-validation, and keep the winner. For spline regression that search is unnecessary. The optimal resolution can be solved for in closed form, to the accuracy an exhaustive search reaches, at a fraction of the compute. Three ingredients make this possible: classical approximation theory pins the squared bias to a known power of the resolution G, exactly the Kolmogorov n-width of the smoothness class; the basis dimension is an explicit polynomial in G; and leave-one-out error follows from a single fit via the PRESS identity. Balancing the two known curves gives the minimizer analytically. We extend this calculus to many coordinates by replacing ambient input dimension with interaction order, the number of active low-order components in an ANOVA decomposition, yielding a scaling law in which the optimal resolution and error are power functions of the effective density (sample size per active component), with input dimension absent from the exponent. The law becomes an algorithm. KORE (Kolmogorov-optimal Order-aware Resolution Estimation) fits two pilot resolutions, solves a leverage-calibrated 2x2 system for the bias and noise scales, and evaluates the closed-form plug-in resolution with a tiny leave-one-out certificate: about a dozen fits instead of a full grid sweep, with a consistency guarantee as the sample grows. Across additive and sparse pairwise targets up to 80 input dimensions, KORE matches exhaustive 3-fold cross-validation and the full classical ladder (GCV, Mallows' Cp, AIC, BIC) while fitting roughly 8x fewer models; on 36 real tabular datasets it ranks first among 21 methods in accuracy per unit of compute, ahead of tuned boosters and kernel machines. When complexity lives in low interaction order, solving for the resolution beats searching for it.
We propose SYRAN, an unsupervised anomaly detection method based on symbolic regression. Instead of encoding normal patterns in an opaque, high-dimensional model, our method learns an ensemble of human-readable equations that describe symbolic invariants: functions that are approximately constant on normal data. Deviations from these invariants yield anomaly scores, so that the detection logic is interpretable by construction, rather than via post-hoc explanation. Experimental results demonstrate that SYRAN is highly interpretable, providing equations that correspond to known scientific or medical relationships, and maintains strong anomaly detection performance comparable to that of state-of-the-art methods.
Md Maruf Hossain, Tim Katzke, Simon Klüttermann +1
TU Dortmund University, Dortmund, Germany · Research Center Trustworthy Data Science and Security, UA Ruhr, Germany