A Set-Sequence Model for Time Series

Elliot L. Epstein, Apaar Sadhwani, Kay Giesecke · DOI

Abstract

Modeling cross-sectional time series data—where thousands of individual units like stocks or loans evolve simultaneously—presents a fundamental challenge: capturing joint dependencies without incurring prohibitive computational costs. We introduce the Set-Sequence model, which decouples temporal and cross-sectional dependencies using a permutation-invariant "Set" module. This module summarizes the population state at each time step into a low-dimensional vector, which is then processed by standard sequence models for unit-level prediction. Our approach achieves linear scaling $O(M)$ with respect to the number of units $M$, while significantly improving accuracy and risk capture. We demonstrate the model's effectiveness on synthetic contagion tasks, large-scale equity portfolio optimization, and mortgage risk prediction.

Introduction

In domains such as finance and economics, practitioners frequently encounter "cross-sectional" time series. Modeling these units in isolation (the "Single" approach) is computationally efficient but fails to account for "contagion" effects or systemic risks. Conversely, modeling the full joint distribution (the "Joint" approach) typically scales quadratically ($O(M^2)$), making it intractable for datasets with tens of thousands of units.

The Set-Sequence model addresses this by assuming unit exchangeability—where the identity of a unit is less important than its features—allowing for a simplified yet powerful representation of group dynamics.

Methods: The Set-Sequence Architecture

The core innovation is the Set-Sequence Layer, which processes data in two distinct stages:

  1. The Set Module: At each time step $t$, the model aggregates features from all $M$ units using a permutation-invariant function (e.g., mean or sum). This produces a summary $F_t$ that represents the latent state of the entire population.
  2. The Sequence Module: The summary $F_t$ is concatenated with individual unit features. A sequence backbone—such as LongConv, Transformers, or State Space Models (SSMs)—then processes this augmented sequence to generate predictions $Y_{i,t}$ for each unit $i$.
The Set-Sequence architecture summarizes population states ($F_t$) to inform unit-level predictions ($Y_M$).

This architecture ensures that the model can handle a variable number of units at inference time and accommodates "unaligned" series where units may enter or exit the dataset at different intervals.

Experimental Evaluation

The model was rigorously tested across three diverse environments:

  • Synthetic Contagion: A simulation of 1,000 units where defaults are driven by a hidden shared factor, testing the model's ability to recover latent group dynamics.
  • Equity Portfolio Optimization: Daily portfolio weight selection for over 36,000 U.S. equities using the CRSP database.
  • Mortgage Risk Prediction: A large-scale real-world dataset comprising 5 million loan-month observations to predict delinquency and foreclosure.

Key Results and Discussion

The Set-Sequence model demonstrated substantial performance gains across all tasks. In the synthetic contagion environment, it reduced error (measured by KL divergence) by 4.4x to 10.2x compared to independent modeling. In the equity task, the model achieved 22–42% higher Sharpe ratios than state-of-the-art domain baselines.

Furthermore, the model's performance is robust across various sequence backbones. As shown in the table below, the Set-Sequence approach consistently yields lower KL divergence and higher AUC scores regardless of whether the underlying sequence model is a Transformer, S4, or LongConv.

Performance metrics across different sequence backbones, highlighting the consistent advantage of the Set-Sequence approach.

Beyond accuracy, the model offers interpretability. In the mortgage task, the learned set summaries were found to be highly correlated with actual market-wide foreclosure rates, indicating that the model successfully captures meaningful economic signals without explicit supervision.

Conclusion

The Set-Sequence model provides a scalable and effective framework for modeling large-scale cross-sectional time series. By leveraging exchangeability and permutation-invariant aggregation, it achieves the benefits of joint modeling with the efficiency of independent processing. Future work includes extending the model to continuous-time, irregularly sampled data and exploring more complex relational dependencies using Graph Neural Networks.

Summary updated

BibTeX
@inproceedings{epstein2026set,
  author = {Elliot L. Epstein and Apaar Sadhwani and Kay Giesecke},
  title = {{A Set-Sequence Model for Time Series}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=y1ZoyGsVuL},
}
Figure