Prediction with a short memory

Vatsal Sharan, Sham M. Kakade, Percy Liang, Gregory Valiant

TL;DR

This paper shows that surprisingly simple Markov models, using only a short "memory" of recent observations, can achieve near-optimal prediction accuracy for a broad class of sequential data. This holds even for complex data-generating processes, as long as their long-range dependencies are limited by mutual information. The paper also establishes that this short memory is information-theoretically necessary and that learning such models requires a significant amount of data.

What Problem Does This Paper Address?

The core challenge this paper tackles is understanding how much "memory" is truly necessary for accurate sequential prediction. Many modern machine learning models, like Recurrent Neural Networks (RNNs) and Transformers, are designed to capture long-range dependencies in data. However, the authors question whether these complex architectures are always required, or if simpler models can suffice under certain conditions. They aim to quantify the relationship between the complexity of dependencies in a sequence and the memory required for effective prediction, specifically focusing on the trade-off between prediction accuracy and the length of the observed history used for prediction.

Methods

The authors employ a combination of information-theoretic analysis and complexity-theoretic arguments.

  • Information-Theoretic Bounds: They introduce the concept of mutual information between past and future observations as a key measure of dependency complexity. Using this, they derive upper bounds on the prediction error of simple Markov models.
  • Markov Models: The paper focuses on "l-th order Markov models," which predict the next observation based solely on the preceding 'l' observations. They analyze the performance of the "best" such model (i.e., one that optimally uses the last 'l' observations).
  • Lower Bounds via CSPs: To establish the necessity of short memory and the data requirements, they construct a reduction from a class of Constraint Satisfaction Problems (CSPs) to the sequential prediction problem. This leverages the presumed hardness of solving certain CSPs to prove lower bounds on the sample complexity of learning predictors.
  • Martingale Arguments: For proving results related to Hidden Markov Models (HMMs), they utilize martingale concentration inequalities to bound the expected error.

Datasets

Not discussed in the paper. The paper focuses on theoretical analysis and lower bounds, not empirical evaluation on specific datasets.

Key Insights and Ideas

  • Short Memory is Often Sufficient: The most surprising insight is that for many sequential data distributions, a simple Markov model with a memory of length proportional to the mutual information between past and future observations (divided by the desired error) can achieve near-optimal prediction. This suggests that complex architectures might be overkill if long-range dependencies are not excessively strong.
  • Mutual Information as a Complexity Measure: The paper highlights mutual information as a crucial parameter that dictates how much memory is needed. A lower mutual information implies simpler dependencies and thus a shorter effective memory requirement.
  • Markov Models as a Baseline: The work establishes a strong theoretical baseline for prediction using Markov models, showing their surprising effectiveness under specific conditions.
  • Information-Theoretic Necessity: The paper proves that the short memory length derived from mutual information is not just sufficient but also information-theoretically necessary for achieving a given prediction accuracy.
  • Data Requirements are Significant: Even for simple Markov models, accurately estimating their parameters requires a substantial amount of data, scaling with the alphabet size and the desired error. This data requirement is shown to be information-theoretically necessary for computationally tractable algorithms.

Key Results

  • Upper Bounds: For any distribution with mutual information $I$ between past and future, a Markov model using the last $O(I/\epsilon)$ observations achieves an expected KL error of $\epsilon$ (and $\ell_1$ error of $\sqrt{\epsilon}$).
  • HMMs: For Hidden Markov Models (HMMs) with $n$ hidden states, the mutual information is bounded by $\log n$. This implies that a Markov model with a window length of $O(\log n / \epsilon)$ can achieve the desired prediction error.
  • Lower Bounds (Information-Theoretic): The paper shows that for HMMs, a window length of $\Omega(\log n / \epsilon)$ is information-theoretically necessary to achieve expected KL error $\epsilon$.
  • Lower Bounds (Sample Complexity): For learning Markov models from data with an alphabet of size $d$, $\Omega(d^{\Theta(\log n / \epsilon)})$ samples are necessary for any computationally tractable algorithm, assuming hardness of certain CSPs.

Limitations and Future Work

  • Average Error Metric: The authors note that "average prediction error" might not be the ideal metric for tasks where capturing very long-range dependencies is crucial (e.g., natural language narratives). They suggest exploring alternative metrics that might better drive progress in models designed for such tasks.
  • Robustness: They propose investigating prediction under more robust settings, such as when observations are corrupted or noisy, which might lead to better sample complexity requirements.
  • Computational Tractability: While the paper establishes information-theoretic limits, the lower bounds on sample complexity are conditional on the hardness of certain CSPs. Further work could explore these connections more deeply.
  • Alternative Metrics: The paper explicitly calls for research into alternative prediction metrics beyond average error, which could better capture the nuances of long-range dependencies.

Summary updated

BibTeX
@inproceedings{sharan2018prediction,
  author = {Vatsal Sharan and Sham M. Kakade and Percy Liang and Gregory Valiant},
  title = {{Prediction with a short memory}},
  booktitle = {STOC},
  year = {2018},
  doi = {10.1145/3188745.3188954},
}
Figure