Source-linked AI summary
TopoPrimer: The Missing Topological Context in Forecasting Models
Zara Zetlin, Kayhan Moharreri, Maria Safi
TL;DR
Forecasting models typically lack explicit access to the global topology of the series population, even though that population contains recoverable relational structure. TopoPrimer precomputes persistent-homology and spectral-sheaf signals and injects them into fully-trained or frozen pre-trained backbones. Across benchmarks and difficult regimes, it consistently improves accuracy, including a 7.3% MSE reduction with Chronos on ECL and a 27% cold-start MAE reduction over a topology-free Transformer.
Problem
Forecasting backbones encode individual series histories but leave the global topological structure of the series population unexploited, although that structure cannot be observed from any individual series alone.
Method
TopoPrimer precomputes a shared population TDA fingerprint and per-series spectral sheaf coordinates, then injects them into any backbone through token broadcast or a lightweight adapter.
Results
TopoPrimer consistently improves forecasting accuracy across diverse domains and training settings, with a 7.3% MSE reduction with Chronos on ECL.
Takeaways & Limitations
Population-level topology provides a backbone-agnostic signal that complements per-series training and is especially useful for cold start, peak-demand windows, and fine-tuned models.
Takeaways & Limitations
Fine-tuning robustness, seasonal-spike, and cold-start evaluations rely on an internal corpus that cannot be released.
Abstract
from arXiv · showhide
We introduce TopoPrimer, a framework that makes the global topological structure of the series population an explicit input to any forecasting model. TopoPrimer improves accuracy across diverse domains, stabilizes forecasts under seasonal demand spikes, and closes the cold-start gap. Precomputed once per domain via persistent homology and spectral sheaf coordinates, TopoPrimer deploys per token for fully-trained models and as a lightweight adapter for pre-trained backbones. Of these two components, sheaf coordinates are the primary accuracy driver. Across four public benchmarks on Chronos and TimesFM, TopoPrimer consistently improves forecasting accuracy, with gains of up to 7.3% MSE on ECL. The topology advantage persists with near-identical magnitude across zero-shot and fine-tuned backbones, suggesting topology and per-series training capture complementary signals. The gains are most pronounced in difficult regimes. Under peak seasonal demand, classical and zero-shot models degrade by up to 50%, while TopoPrimer stays within 10%. At cold start with no item history, TopoPrimer reduces MAE by 27% over a topology-free baseline.
1 Introduction
TopoPrimer addresses the missing population-level topological context in forecasting by precomputing global and per-series relational signals. It improves accuracy across training paradigms and difficult forecasting regimes.
- Motivation and framework: TopoPrimer encodes global topological shape and relational population structure as a frozen, precomputed input to forecasting backbones.The framework applies persistent homology to the cross-series correlation manifold and derives spectral sheaf coordinates from the entity-time matrix.
- Results: 7.3% MSE reduction occurs with Chronos on ECL, while TopoPrimer degrades by under 10% during peak seasonal demand and reduces cold-start MAE by 27%.Across four public datasets, the framework also reports 7.9% MAE reduction on Monash Weather with the fully-trained Transformer and 6.8% MSE reduction with TimesFM on ECL.
- Topology signals: Population-level persistent homology produces a shared fingerprint describing clustering, cyclic co-movement, and boundary structure across the domain.The fingerprint is computed once per domain and shared across all series.
- Topology signals: Spectral sheaf coordinates encode each series’ position and relational structure within the full population.They are obtained without learned graph convolutions through truncated SVD of the entity-time matrix.
- Training paradigms: The same topology features improve fully-trained transformers and frozen pre-trained TSFMs under one architecture.In fully-trained models, context is broadcast-added to temporal tokens; in pre-trained models, a lightweight adapter applies residual corrections without backbone gradients.
2 Related Work
TopoPrimer reframes topological forecasting from individual-series temporal descriptors and learned relational models toward a frozen, population-level prior. It combines shared population geometry with per-series relational coordinates without replacing the forecasting backbone.
- TDA forecasting: Prior TDA forecasting applies persistent homology to sliding-window embeddings of individual series, whereas TopoPrimer applies it to the cross-series correlation manifold.This produces one shared fingerprint for the entire domain rather than separate descriptors for each window.
- TopoPrimer distinction: TopoPrimer’s architecture uses a 125-dimensional global TDA fingerprint and a 256-dimensional per-series spectral sheaf coordinate, injected without modifying backbone weights.The signals are extracted offline and fused before backbone integration.
- Relational forecasting: Graph forecasters learn or use relational structure through domain-specific adjacency and backbone changes, while TopoPrimer leaves the backbone intact.Transformer forecasters generally encode series independently, and global-factor models learn per-series coordinates jointly with forecasting.
- Cellular sheaf methods: Cellular sheaf methods typically use local message passing, whereas TopoPrimer derives each series’ coordinate from leading left singular vectors in closed form.The resulting sheaf prior requires no training and is backbone-agnostic.
- Time series foundation models: TSFMs support zero-shot transfer or individual-series fine-tuning but do not explicitly introduce population-topology signals.TopoPrimer injects precomputed population-level TDA features and per-series spectral sheaf coordinates as a frozen context vector.
3 Method
TopoPrimer constructs frozen population-topology features and injects them into forecasting models through token-level context addition or a lightweight adapter. Its global TDA fingerprint captures population shape, while spectral sheaf coordinates provide per-series relational position.
- Overview: TopoPrimer extracts two topology signals offline once per domain: a population TDA fingerprint and per-series spectral sheaf coordinates.Both signals are fused into a context vector and injected into forecasting backbones without weight modification.
- Population TDA fingerprint: Persistent homology operates on a sparsified cross-series correlation manifold built from normalized historical observations.The correlation-distance matrix uses k=50 nearest neighbors, reducing memory from O(N^2) to O(Nk).
- Population TDA fingerprint: The Vietoris-Rips filtration extracts H0 clustering, H1 cyclic co-movement, and H2 structural-boundary features through dimension 2.Persistent diagrams are vectorized into a fixed-size persistence landscape representation.
- Spectral sheaf encoder: Spectral sheaf coordinates are rows of U from a truncated SVD X ≈ UΣV^T of the entity-time matrix.Coordinates are computed within semantically coherent groups when series span unrelated categories and are zero-padded to 256 dimensions.
- Spectral sheaf encoder: Spectral coordinates outperform the learned neural sheaf encoder at a fraction of the cost.The TDA fingerprint is global, whereas spectral features locate individual series within the shared demand manifold.
- Fully-trained integration: In fully-trained transformers, projected topology features form a global vector broadcast-added to every temporal token before encoding.The topology projections remain separate, and training uses Huber quantile loss over nine output quantiles.
- Pre-trained integration: For frozen pre-trained backbones, a lightweight adapter projects four branches to dimension 128 and predicts residual corrections to the cached base forecast.The branches are TDA, sheaf, z-scored context statistics, and the cached median forecast; the backbone receives no gradient.
- Ablations: Architecture-matched ablations compare Vanilla, +TDA, and +TDA + Sheaf while holding the output MLP identical.This isolates the contribution of topology encoding branches from additional prediction capacity.
4 Results
TopoPrimer’s gains are driven primarily by sheaf coordinates, while TDA amplification depends on genuine manifold richness. Across backbones and evaluation regimes, topology improves difficult-case robustness, complements fine-tuning, and supplies useful signal when history is absent.
- Topology screening: 7.9% MAE reduction occurs on H1-rich Monash Weather, while gains are marginal on H1-sparse METR-LA.The reported pattern links stronger TDA amplification to genuine loop density across domains.
- Benchmark results: 2.1% MAE improvement is achieved by the Transformer on M5, from 1.866 to 1.827, while both TSFM backbones converge to MAE 1.025 with sheaf augmentation.The sheaf recovers gains after adapter degradation on this calendar-dominated domain.
- Cross-backbone synthesis: Sheaf coordinates are the primary improvement driver across benchmarks, whereas TDA alone provides no consistent gain and can degrade performance.TDA lacks per-series resolution without sheaf coordinates anchoring each series within the population.
- Fine-tuning robustness: Nearly identical topology gains appear on zero-shot and fine-tuned Chronos, with ∆MAE of −0.022 and −0.024 respectively.The paper attributes this complementarity to fine-tuning’s lack of a mechanism for recovering cross-series structure.
- Seasonal spikes: 46–50% degradation affects classical and zero-shot models during peak demand, whereas the best topology model finishes 43% below XGBoost and 31% below Chronos.Transformer+TDAE+TDAI+Sheaf finishes with MAE 1.924 and remains comparatively stable through the seasonal window.
- Cold start: 26–27% lower MAE is achieved at cold start by topology variants relative to the vanilla Transformer, before any post-launch history exists.Transformer+TDAE+TDAI reaches MAE 1.375 and Transformer+TDAE+TDAI+Sheaf reaches 1.395 versus 1.887 for vanilla Transformer at week 0.
5 Conclusion
TopoPrimer treats population topology as a frozen, backbone-agnostic signal that complements per-series training and supports cold-start and robustness gains. Its topology is computed through persistent homology and a no-training spectral sheaf encoder, with stability and deployment extensions described.
- Conclusion: TopoPrimer injects precomputed population topology as a context vector, addressing signals that per-series training alone does not resolve.The framework targets cold-start, peak-demand, and fine-tuning robustness while remaining backbone-agnostic.
- Conclusion: Topology screening uses H1/N density to distinguish domains where TDA amplifies sheaf gains from domains where improvement is sheaf-driven alone.The criterion is presented as a lightweight pre-deployment diagnostic.
- Scope: Topology features are precomputed once per domain and reused during inference, while evaluations of some robustness regimes rely on an unreleased internal corpus.The protocol, hyperparameters, and statistical tests are reported as reproducible on public data.
- Methods: Persistent homology represents population structure through filtration-based features, while the sheaf encoder uses leading left singular vectors without training.The reported spectral encoder uses identity restriction maps and truncated SVD of the entity-time matrix.
- Methods: The persistence landscape is Lipschitz-stable with respect to bottleneck distance, supporting proportionally bounded perturbations from missing weeks or measurement errors.The stability theorem’s constant depends only on the landscape sampling grid.
- Conclusion: 27% lower MAE at cold start is supported by topology signals requiring no per-item history.The signals include shared entity-manifold and item-manifold descriptors plus a relationally approximated sheaf coordinate.
C Transformer Architecture
The transformer architecture activates topology blocks through a projected context vector, with variants differing in which topology inputs are enabled. Internal-corpus variants additionally concatenate learned embeddings, while all variants share the encoder and training framework.
- Context construction: The context vector projects temporal features and active topology inputs to dmodel=256 before broadcasting them into the transformer.The TDA fingerprint is the primary input to Wctx, and the sheaf block uses a dedicated 256→256 projection when active.
- Context variants: Public benchmark variants activate exactly one topology block or none for the vanilla baseline.Vanilla, +TDA, and +TDA+Sheaf share the same encoder and head.
- Context construction: Internal-corpus variants concatenate learned entity, item, and category embeddings with temporal features before the main projection.Topology blocks are stacked across the internal variants.
- Encoder and head: The encoder embeds each demand scalar into 256 dimensions, uses six pre-norm attention layers with eight heads, and predicts nine quantiles at each forecast step.The quantiles range from 0.02 to 0.98, and the output horizon is dataset-specific.
- Optimization: Transformer variants use AdamW with OneCycleLR, whereas topology adapters on frozen backbones use AdamW with CosineAnnealingLR.The shared loss is Huber quantile loss over nine output quantiles.
- Dataset settings: Context windows and forecast horizons follow dataset-specific benchmark settings while the encoder architecture remains shared.Only sequence length, horizon, and temporal feature dimensionality differ across datasets.
D Architecture Diagrams
The architecture diagrams contrast TopoPrimer’s shared population-level TDA fingerprint with per-series spectral sheaf coordinates. Both derive from population geometry, but they provide different granularity of topological context.
- Population-level TDA: Prior work computes one TDA descriptor per sliding window, whereas TopoPrimer applies one Vietoris-Rips filtration to the full population manifold.TopoPrimer produces a shared 125-dimensional persistence landscape vector across all series.
- Sheaf coordinates: The shared kNN graph supports a complementary sheaf pipeline that uses truncated SVD of the entity-time matrix.This produces spectral coordinates rather than another per-window temporal descriptor.
- Sheaf coordinates: Each series receives a unique 256-dimensional spectral coordinate encoding its structural position on the correlation manifold.Unlike the shared TDA fingerprint, the sheaf coordinate is per-series and relational.
E TDA Analysis of Public Benchmarks
Across the public benchmarks, topology diagnostics distinguish topology-rich domains and reveal meaningful differences between segments and entity clusters. ECL and Weather show genuine cyclic manifold structure, while M5 is largely calendar-driven and METR-LA is predominantly tree-like.
- Population Manifold Fingerprints: H1 is the diagnostic signal: Weather and ECL show irregular multi-scale peaks, whereas M5 reflects calendar harmonics and METR-LA reflects road geometry.H0 is broadly similar across datasets, while H2 activity is meaningful only for Weather and ECL.
- Cross-Segment Comparisons: ECL and Weather exhibit structurally meaningful topology differences across their primary segments, unlike the weaker or noise-driven variation in M5 and METR-LA.The comparisons use TDA feature vectors and H1 Wasserstein-2 distances between segments.
- Entity Manifolds: UMAP projections encode topology through arcs, loops, filaments, or diffuse clouds, with ECL and Weather showing richer structure than M5 and METR-LA.Color indicates TDA-derived cluster assignments.
- Entity Clusters: ECL and Weather clusters are sharply separated and semantically interpretable, while M5 and METR-LA profiles are more homogeneous.The cluster profiles align with the corresponding manifold interpretations.
- Internal-Corpus Structure: Category A shows compact, separated UMAP regions and an arc-and-island structure indicating β1 > 0 and passage of the topology pre-screening criterion.The projection also identifies peripheral structural outliers.
- Internal-Corpus Structure: The Category A Mapper graph contains a dense core, peripheral outlier branches, and loops that corroborate nonzero β1 and guide relational graph construction.The graph has 55 nodes and uses a 2D UMAP lens with a 12×12 cover and 40% overlap.
G Randomized Control Ablations
Randomized controls show that TopoPrimer’s gains depend on both meaningful TDA content and correct series-to-topology assignment. Random context can regress performance, whereas real TDA and especially Sheaf improve it.
- Control Results: On Monash Weather, random injection regresses by +0.007 MAE, while real TDA improves by −0.005 and Sheaf improves by −0.171.Monash Weather is identified as the topology-richest benchmark, with 1,847 H1 generators.
- Control Results: Shuffle performance falls between random and real TDA on both evaluated datasets, supporting the importance of correct series-to-topology correspondence.The controls preserve marginal statistics while disrupting the original assignment.
H Spectral vs. Neural Sheaf Encoder
The spectral sheaf encoder is the preferred TopoPrimer implementation: it matches or outperforms the neural alternative while avoiding a full training run. Its strongest advantage appears where item-level heterogeneity is highest.
- Comparative Results: Spectral coordinates achieve MAE 1.0251 versus 1.0343 for the neural encoder on Chronos 2.0 Household, a 0.9% relative gap.Household provides the most informative comparison because its item demand is highly heterogeneous.
- Comparative Results: Across the full 28,860-series M5 evaluation, Vanilla records 0.7717 MAE, Spectral 0.7742, and Neural 0.7805.M5 is a null-TDA domain, so neither sheaf variant overcomes the absent global topology signal.
- Interpretation: The neural variant empirically degrades because optimization moves embeddings away from spectral positions toward graph agreement, which is less useful downstream.The paper therefore adopts spectral coordinates as TopoPrimer’s default.
- Experimental Rationale: M5 isolates the sheaf effect because its TDA signal is null, avoiding confounding from simultaneous TDA contributions on ECL and Monash Weather.Its H1 generators reflect shared seasonal periodicity rather than genuine relational structure.
- Computational Trade-off: The spectral encoder requires one truncated SVD without hyperparameter selection, whereas the neural encoder requires a full pre-training run.For M5 at 30,490 series, the spectral computation completes in under 90 seconds on one CPU core.
I Topology Signal Survives Fine-Tuning
Topology augmentation retains its benefit after backbone fine-tuning, despite fine-tuning itself providing only a marginal gain. The evidence supports complementary signals, while the evaluation depends on domain and backbone conditions that limit broad interpretation.
- Scope Boundary: ECL cannot fully test topology subsumption because its anonymous meters lack entity graphs and relational labels, so fine-tuning targets calibration rather than cross-series relational structure.Its 83 H1 cycles establish topology richness but not the relational-structure condition.
- Scope Boundary: Monash Weather is topology-rich but unsuitable for the primary fine-tuned comparison because Chronos was pre-trained on it and the zero-shot-to-fine-tuned gap is negligible.METR-LA and M5 provide fine-tunable structures but near-null topology signals.
- Fine-Tuning Baseline: Chronos Fine-Tuned improves vanilla-adapter MAE from 1.168 to 1.142, a marginal −0.026 MAE gain from backbone fine-tuning.The result is reported on a single-category slice of 50,920 series.
- Topology Robustness: Topology gains remain nearly identical after fine-tuning: Zero-Shot improves by ∆MAE = −0.022 and Fine-Tuned by ∆MAE = −0.024.The corresponding WAPE deltas are −0.016 and −0.017.
- Interpretation: The results are consistent with fine-tuning and topology augmentation capturing largely orthogonal signals.The item-manifold fingerprint is required to recover and exceed the vanilla result in the described setting.
J Quantile Calibration on the Internal Corpus
The internal-corpus evaluation reports quantile calibration alongside MAE, while combined topology components achieve the best reported MAE. The supplied passages also identify the seasonality and cold-start analyses as separate internal-corpus evaluations.
- Quantile calibration: 9 calibrated quantiles are evaluated using average pinball loss (QLoss) and MAE on the internal corpus.The quantiles are 0.02, 0.1, 0.2, 0.3, 0.5, 0.7, 0.8, 0.9, and 0.98.
- Internal-corpus results: 0.596 MAE is achieved by Transformer + TDAE+TDAI on the internal corpus.The combined TDA fingerprints are described as injecting population-level structural signal that lowers the median forecast.
- Additional evaluations: Sections 4.5 and 4.6 evaluate seasonality and cold start on the internal corpus.The main text reports summary statistics and figure panels, while the appendix provides complete per-week MAE tables.
L ECL: Full Results
The ECL evaluation uses 321 hourly electricity-consumption series under the canonical normalized long-term forecasting protocol. Across horizons from 96 to 720 hours, the sheaf component drives consistent improvements, while TDA alone provides no gain or mildly regresses.
- Dataset and setup: 321 hourly electricity-consumption series from ECL are evaluated across four forecasting horizons.The horizons are H ∈{96, 192, 336, 720} hours.
- Dataset and setup: 96-hour context windows and per-series zero-mean, unit-variance normalization define the ECL protocol.This is identified as the canonical normalized protocol for comparison with published long-term forecasting results.
- Component comparison: TDA alone provides no gain or mild regression at all evaluated horizons.This result is reported in Table 12 under the normalized protocol.
- Component comparison: The sheaf component consistently improves both adapter families from H96 through H336, with gains attenuating at H720.The passage attributes the attenuation to the static topological coordinate becoming less marginal over the backbone’s long-range distributional prior.