Can We Regress Periods from Differential Representations?

Tejas Lohia, Matthew Graham, Pavlos Protopapas, Ashish MahabalarXiv 2026

TL;DR

Finding the period of a repeating signal usually means guessing a massive list of candidate periods and testing each one against the data. This paper flips the script: by plotting the differences in time and value between every pair of observations into a 2D image, periodicity turns into a visible sequence of bands. A vision transformer can then "read" the period directly from the geometry of that image—no candidate search required—outperforming traditional periodograms and specialized neural networks across astronomy, video, ocean tides, and gene expression.

What Problem Does This Paper Address?

Whether you are tracking a variable star, counting push-ups in a video, or measuring ocean tides, recovering the period of a repeating signal is a foundational task. Real-world recordings, however, are messy: observations are noisy, unevenly spaced, full of gaps, and often only capture a few cycles.

Traditionally, we solve this with a search. Algorithms like the Lomb–Scargle periodogram or phase-folding test a grid of trial periods and pick the winner. This has two built-in headaches: your resolution is limited by your search grid, and the methods are easily fooled—spectral power can lock onto the sampling pattern, and folding can confuse the true period with an integer multiple (a harmonic). Even recent deep-learning approaches mostly operate inside this same box, feeding networks periodograms or wavelets whose axes are still just candidate frequencies. The authors ask: Can we infer the period directly from the raw structure of the observations, without scoring any trial periods at all?

Methods

The authors' starting observation is simple: if a signal repeats with period $P$, any two measurements separated by an integer multiple of $P$ ($P, 2P, 3P, \dots$) will fall at the same phase and have similar values.

To make this visible, they map every ordered pair of observations $(i < j)$ into a 2D histogram called a dm-dt image, plotting time separation ($\Delta t$) on a logarithmic horizontal axis against normalized value difference ($\Delta m$) on the vertical axis. At lags near multiples of $P$, the spread of $\Delta m$ contracts, creating a distinct sequence of bands. Because the $\Delta t$ axis is logarithmic, changing the period simply shifts the entire band pattern left or right while preserving its shape—turning period estimation into a spatial pattern-recognition problem.

Example dm-dt image of a Cepheid

To read these bands, the authors build a two-stage pipeline:

  1. A Hybrid Convolutional-Transformer: The network takes the dm-dt image (plus an optional second channel weighted by Morlet wavelet power) through two $3\times3$ convolutional layers, cuts the feature map into patches, and feeds them to an 8-layer Vision Transformer. Crucially, the lag axis uses a logarithmic sinusoidal positional encoding so that harmonic relationships stay consistent at any scale. A dedicated [PERIOD] token gathers global evidence and outputs a probability distribution over 224 log-period bins (trained with HL-Gauss cross-entropy loss), rather than a single scalar, which keeps harmonic ambiguities visible.
  2. Statistical Refinement: A parameter-free second stage takes the network's rough estimate and runs a harmonic F-test (checking $2P_0, P_0, P_0/2, P_0/3, P_0/4$) followed by a continuous Gauss–Newton polish to sharpen the frequency.
Figure 2. Architecture overview. The dm-dt image is encoded by a convolutional stem and a transformer. The [PERIOD] token is decoded by a distributional head over log-period bins, while [CLS] carries auxiliary losses used only in training.

Datasets

Because real-world recordings only have "ground truth" periods estimated by search algorithms, training on them would just teach the network to mimic search errors. Instead, the authors train on a synthetic corpus of 150,000 series (15,000 per class across 10 classes) built from real signal shapes, sampling times, and noise from a public TESS astronomical survey, but with exact, independently drawn periods.

They evaluate on:

  • Primary Testbed: 14,742 held-out synthetic series and 68,990 real TESS recordings (6,753 held-out).
  • Cross-Domain Benchmarks: Video repetition counting (trained on RepCount, tested zero-shot on QUVA and UCFRep using 1D signals from frozen DINOv3 features), 2,023 held-out 60-day tide-gauge windows, 2,204 Kepler star light curves, and the TimeTrial synthetic circadian gene-expression benchmark.

Key Insights and Ideas

  • The network actually reads the bands: Using integrated gradients, the authors show that attribution concentrates on the expected band columns (a $2.17\times$ lift over uniform). Deleting those band columns drops the true period's log-probability by $1.19$ nats, compared to just $0.53$ nats for halfway columns.
  • Recurrence, not shortcuts: Shuffling the time order of a series—preserving the sampling pattern and value distribution while destroying periodicity—crashes synthetic accuracy from $0.945$ to $0.038$.
  • Distributions beat scalars: Replacing the distributional head with a standard scalar regression head (Huber loss) drops synthetic accuracy by 10 points and real-data agreement by 22 points, because a single point estimate gets pulled between competing harmonics.
  • Density alone is enough: While the headline model uses both density and wavelet channels, an ablation using only the dm-dt density image actually performs better on real recordings, showing the pairwise histogram itself carries the transferable signal.

Key Results

  • Primary Synthetic & Real Data: On synthetic data, the headline model achieves 0.942 accuracy (within 10% of truth) and 0.017 MAE in $\log_{10} P$, beating Lomb–Scargle (0.599) and retrained learned baselines like LightPred (0.885). On real recordings, it folds the light curve tighter than the reference periodogram for 59.7% of stars (and 65.5% for the density-only ablation).
  • Video Repetition Counting: Without any video-specific architecture or fine-tuning, the model beats every published exemplar-free counter trained on RepCount when tested on QUVA (MAE 0.311, off-by-one accuracy 0.563) and achieves the best off-by-one accuracy on UCFRep (0.457).
  • Physical & Biological Signals: It folds tide-gauge records tighter than a periodogram (1,017 wins vs. 752 losses), recovers Kepler catalogue periods with a tighter fold 85.2% of the time (vs. 68.8% for Lomb–Scargle), and detects circadian rhythms with 0.966 ROC-AUC (vs. 0.931 for ARSER).
Cross-domain results table

Limitations and Future Work

The authors note that the first-stage network's binned output is too coarse on its own for clean phase-folding over long baselines, requiring the parameter-free statistical polish in stage two. Additionally, while the model excels at off-by-one accuracy on UCFRep, its MAE there still trails the best specialized video counter. Finally, as with any synthetic-to-real approach, performance on real data depends on how well the synthetic generator captures real-world noise and morphology—though the strong zero-shot transfer to video, tides, and biology suggests the underlying pairwise band geometry is remarkably universal.

Summary updated

BibTeX
@misc{lohia2026can,
  author = {Tejas Lohia and Matthew Graham and Pavlos Protopapas and Ashish Mahabal},
  title = {{Can We Regress Periods from Differential Representations?}},
  year = {2026},
  eprint = {2612.04399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.04399},
}
Figure