TL;DR
Deep neural networks are phenomenal interpolators, yet they famously fall apart when asked to extrapolate beyond their training window. This paper proves that from a finite training window alone, the true underlying data-generating process is mathematically impossible to identify—meaning "feature engineering is dead" is only true inside your training distribution. To generalize out-of-distribution (OOD), someone—either you via feature maps or a foundation model's input format—must explicitly supply the right structural assumptions.
What Problem Does This Paper Address?
Imagine looking at a curve on the interval $[-\pi, \pi]$. Is it $\sin(x)$, or is it a degree-9 Taylor polynomial? Within that window, the two are practically indistinguishable—their maximum deviation is tiny, easily swallowed by a whisper of noise. Yet step just outside that window into $[\pi, 3\pi]$, and the polynomial rockets off to infinity while the sine wave calmly oscillates on.
This is the fundamental trap of out-of-distribution (OOD) extrapolation. Statistical learning theory guarantees that neural networks generalize well in-distribution (ID), where test data looks like training data. However, on any finite training window, infinitely many data-generating processes (DGPs) agree within noise tolerance while diverging wildly outside it. Standard empirical risk minimization (ERM) and cross-validation are completely blind to this choice. The authors ask: when can neural networks actually extrapolate, and what breaks the tie between equally plausible realities?
Methods
The authors formalize observational equivalence on a finite window and introduce the DGP commitment: a joint triplet $(\varphi, \psi, \mathcal{M})$ consisting of an input feature map ($\varphi$), an invertible label map ($\psi$), and a model class ($\mathcal{M}$). Rather than treating feature engineering and architecture as separate knobs, they show these three act as a single structural commitment that locks in an assumed continuation beyond the training data. For instance, mapping $x \mapsto (\sin x, \cos x)$ wraps both training and OOD points onto the same unit circle, turning dangerous extrapolation into safe interpolation.
Beyond theory, the authors deliver three practical tools for engineers:
- Near-boundary validation: Holding out a narrow strip of data just past the training boundary (rather than random internal folds) to catch diverging hypotheses early.
- The SINDy $\delta_{\text{OOD}}$ diagnostic: Using sparse identification of nonlinear dynamics (SINDy) residuals to flag whether candidate feature coordinates admit clean, sparse governing equations.
- CE/PE reframing: Treating Content Embeddings (CE) and Positional Embeddings (PE) in sequence models (Transformers, Mamba, S4D) as explicit feature-engineering channels.
Datasets
The paper evaluates its framework across both synthetic benchmarks and real-world scientific datasets:
- Synthetic Benchmarks: Minimal DGP pairs ($\sin(x)$ vs. Taylor-9; power law vs. exponential), a 2-node synthetic mass-action kinetics (MAK) graph, a periodic sequence-annotation task, and a newly constructed periodic $d$-torus benchmark designed to stress-test sample coverage, dimensionality, interaction order, and noise.
- Natural-Science Datasets:
- Physics: NASA Exoplanet Archive (predicting orbital periods via Kepler's third law, training on $a < 0.5\text{ AU}$ and testing up to $20\text{ AU}$).
- Biology: Cross-species coding-DNA (CDS) detection (training on S. cerevisiae yeast chromosomes and testing zero-shot across five organisms spanning 19%–65% GC content, like E. coli and M. tuberculosis).
- Histopathology: Camelyon17-WILDS ($96\times96$ H&E-stained lymph-node patches across multiple hospitals with different staining protocols).
Key Insights and Ideas
- Features alone aren't enough—they must match the model class: Giving a model the exact right log-transformed coordinates $(\log x, \log y)$ for a power-law problem yields 3.2% OOD error with linear regression (OLS), yet fails miserably (83.3% error) with an MLP head because the MLP doesn't commit to linearity in that space.
- Frozen foundation models inherit commitments via input format: Without changing a single weight, feeding raw $x$ vs. Fourier columns into TabPFN or TimesFM swings OOD error from total collapse to near-perfect accuracy. Pretraining doesn't magically solve OOD identifiability; it just routes the commitment through how you format the prompt or context.
- Positional encodings are feature maps, not backbone magic: Across Transformers, Mamba, and S4D, standard PEs (RoPE, sinusoidal, learned APE) fail OOD on periodic tasks (~98–99% error), whereas an exact-Fourier PE drops error near zero regardless of the sequence architecture.
- Partly wrong commitments can hurt worse than none: On coupled multi-dimensional problems, applying the exact feature map to only some coupled coordinates actually degrades OOD error compared to using raw inputs—even while improving in-distribution training error!
Key Results
- Toy Sine Extrapolation: Identical MLPs achieve 0.3% ID error on $\sin(x)$, but OOD error drops from 155.9% (raw input) to 0.3% (Fourier features)—a ~520$\times$ improvement. TabPFN drops from 226.2% to 0.1% OOD error with zero gradient steps.
- Natural Sciences:
- Chemistry (MAK): Bilinear features + OLS achieve 0.0% OOD error vs. 24.4% for raw MLP.
- Physics (Kepler): Log-space SINDy/OLS hit 2.1% / 3.8% OOD error vs. 79.0% for a raw MLP.
- Biology (DNA): Injecting genetic-code features lifts zero-shot cross-species AUROC to 0.750–0.960, whereas standard positional encodings collapse to 0.445–0.824 (falling below random chance on M. tuberculosis).
- Histopathology: Physics-based Macenko stain normalization lifts held-out hospital AUC from 0.754 to 0.984 while shrinking seed variance ~60$\times$.
- Practitioner Tools: Near-boundary validation selects the true periodic DGP 100% of the time vs. 81.3% for standard cross-validation. The SINDy $\delta_{\text{OOD}}$ diagnostic correlates strongly with wrong feature maps (Spearman $\rho = 0.82$, $p = 1.3 \times 10^{-9}$).
Limitations and Future Work
The authors are transparent about where their guarantees stop:
- Noise vs. Signal Regimes: Their main theoretical blindness bound (Proposition 1) is mathematically tight only when noise dominates the in-window gap ($\varepsilon_W \sqrt{n} \ll \sigma$), though empirically cross-validation still gets fooled in low-noise regimes due to polynomial overfitting.
- Necessary, Not Sufficient: Even with the exact right feature map, OOD generalization collapses if the model lacks capacity for high-order feature interactions or if sample coverage falls below $N \lesssim 4^d$ in $d$ dimensions.
- Diagnostic Blind Spots: Near-boundary validation requires access to data slightly outside the training window, and the SINDy diagnostic cannot rank feature maps for non-polynomial dynamics (like $\tanh$).
- Future Directions: Extending sparse-identifiability bounds to finite samples and using near-boundary data to automatically discover $\varphi$ rather than hand-crafting it.
Summary updated