In the mid-1990s, the machine learning community faced a significant hurdle: the inability of models to capture long-term dependencies. While recurrent neural networks (RNNs) were known to suffer from vanishing gradients, the behavior of Markovian models like Hidden Markov Models (HMMs) remained less formally diagnosed. In their 1995 paper, Yoshua Bengio and Paolo Frasconi provided a rigorous mathematical explanation for why these models "forget" sequence history, identifying the "smooth" transition between states as the primary culprit.
The Problem: Context and Credit Diffusion
The authors identify two symmetrical failures that prevent Markovian models from learning long-range patterns: the diffusion of context and the diffusion of credit.
- Diffusion of Context (Forward): As a sequence progresses, the influence of the initial state "spreads out" across the state space. Eventually, the current state distribution becomes independent of the starting point, meaning the model has lost all memory of the sequence's beginning.
- Diffusion of Credit (Backward): During training—whether using Expectation-Maximization (EM) or gradient descent—the error signal (or "credit") sent backward from the end of a sequence to the beginning vanishes. This makes it impossible for the model to learn that an early event was the cause of a late outcome.
Theoretical Framework
To quantify this decay, the authors leverage Markov Chain Theory and the Perron-Frobenius Theorem. They demonstrate that for any "primitive" transition matrix (where any state is eventually reachable from any other), repeatedly multiplying the matrix causes it to converge to a rank-1 matrix. In this state, all rows become identical, implying that the outcome is the same regardless of the starting state.
They utilize Dobrushin’s ergodicity coefficient ($\tau_1$) to measure how quickly a matrix "forgets." A small coefficient indicates a "forgetter" matrix. The authors prove that for a model to maintain information over long durations, it must move away from "fuzzy" probabilities and toward sparse, nearly deterministic transitions (0s and 1s).
The Catch-22 of Probabilistic Modeling
A central insight of the paper is the inherent conflict between trainability and memory. For a model to be trainable via continuous optimization, we prefer smooth, non-zero probabilities. However, for a model to possess memory, it requires transitions to be nearly 0 or 1. Smoothness allows for gradient flow but causes information to leak; determinism preserves information but creates a difficult optimization landscape.
Experimental Results
The paper utilizes controlled, synthetic experiments to isolate the effect of "dependency span":
- Rapid Information Loss: In numerical simulations using $8 \times 8$ transition matrices, fully connected models lost almost all information about their starting state in just 4 to 5 time steps.
- The Training Wall: When the dependency span in the data exceeded 10-20 steps, standard HMMs almost never converged to a correct solution.
- Topology as a Shield: Sparser architectures, such as "left-to-right" models, act as a physical constraint that slows down diffusion. By restricting where the model can "wander," these topologies force the system to maintain state information longer.
- The Over-parameterization Paradox: Interestingly, using more hidden states than necessary—when combined with sparse connectivity—actually helped models learn longer dependencies by providing "buffer" states that slowed the diffusion process.
Implications and Future Directions
Bengio and Frasconi conclude that because the memory problem is essentially a search for the right 0/1 topology, standard gradient-based optimization may be insufficient. They suggest two primary paths forward:
- Discrete Optimization: Utilizing constructive methods or discrete search algorithms to find the appropriate sparse structure.
- Hierarchical Representations: Moving toward models where some "slow" state variables change infrequently, allowing credit to propagate over much longer temporal spans. This concept would later become a foundational element in modern deep learning architectures, such as Hierarchical RNNs and Long Short-Term Memory (LSTM) networks.
Summary updated