TL;DR
This paper introduces Generative Temporal Models with Memory (GTMMs), a framework that augments temporal variational autoencoders (VAEs) with external memory systems like Neural Turing Machines and Differentiable Neural Computers. By separating memory storage from computation, GTMMs successfully capture complex, long-range dependencies in sequential data, significantly outperforming standard recurrent models like LSTMs and Variational RNNs (VRNNs) on long-delay recall and 3D environment modeling tasks.
What Problem Does This Paper Address?
Modeling sequential data with long-range dependencies—where an event now depends on something that happened a long time ago—is a fundamental challenge in machine learning. Traditional Generative Temporal Models (GTMs), such as Hidden Markov Models or Kalman Filters, rely on fixed-dimensional statistics that fail to capture long-distance correlations.
Modern deep recurrent networks like LSTMs and GRUs attempt to solve this by storing information in their hidden states. However, they suffer from a fundamental flaw: computation and memory capacity are tightly coupled. To increase memory capacity, you must increase the hidden state size, causing the number of parameters to grow quadratically. Furthermore, the recurrent dynamics must simultaneously protect old memories and process immediate inputs. This paper addresses these limitations by decoupling memory storage from computation within a generative framework.
Methods
The authors develop Generative Temporal Models with Memory (GTMMs) by integrating external memory systems into the variational inference framework (specifically, temporal VAEs). Instead of relying solely on an LSTM's hidden state $h_t$ to pass historical information, the model queries an external memory bank $M_t$ at each time step to produce a memory context vector $\Psi_t$.
The authors explore four distinct memory architectures within this common framework:
- Introspection Network: A novel, position-based memory system. It acts as a first-in-first-out (FIFO) buffer that directly stores generated latent variables $z_t$. The model doesn't need to learn how to write; it only learns how to read using a soft-attention mechanism.
- Neural Turing Machine (NTM): Combines content-based (similarity) and positional addressing.
- Least-Recently Used (LRU) access: Exclusively employs content-based addressing and optimizes memory allocation.
- Differentiable Neural Computer (DNC): Uses content-based addressing alongside temporal transition links to track the sequential order of writes.
The entire system is trained end-to-end by maximizing the variational lower bound (negative free energy).
Datasets
The models were evaluated on seven distinct synthetic and vision-based tasks designed to stress-test long-term memory:
- Perfect Recall & Parity Recall: Remembering a sequence of MNIST digits after a long distractor interval (up to 50 steps), or reporting their parity (even/odd).
- One-Shot Recall: A generalization test using unseen characters from the Omniglot dataset at test time.
- Dynamic Dependency (Index-and-Recall): An algorithmic task where the value of the current digit dictates the historical time-index of the next digit to retrieve.
- Similarity-Cued Recall: Using a visual cue to locate a matching image in past history and recalling the sequence that followed it.
- 2D MNIST Maze Navigation: Tracking a random walk across a 4×4 grid of MNIST digits to test spatial mapping capabilities.
- Realistic 3D Environments: A procedurally-generated 3D maze where the model observes a first-person camera rotation for one full turn and must generate consistent views during a second turn.
Key Insights and Ideas
- Decoupling Works: Separating memory from computation allows the network to scale its memory capacity without a parameter explosion, leading to faster training and better data efficiency.
- No "One Size Fits All" Memory: Different tasks require different memory access patterns. The simple Introspection Network learns incredibly fast on ordered, positional tasks (like perfect recall) because it bypasses the need to learn how to write. However, it fails completely on tasks requiring content-based lookup (like similarity-cued recall), where NTMs and DNCs excel.
- The VLB Deception: The authors note that the standard training loss—the Variational Lower Bound (VLB)—can be misleading. A baseline VRNN might achieve a low VLB by averaging pixel predictions, but tracking the per-step Kullback-Leibler Divergence (KLD) reveals whether the model is actually utilizing its memory to make sharp, confident predictions when a past event is repeated.
Key Results
- Handling Long Delays: On the Perfect Recall task with a long delay ($l=50$), GTMMs (particularly the Introspection Network) showed a massive drop in KLD during the recall phase, proving they successfully stored and retrieved early sequence information. The baseline VRNN failed to capture these long-term dependencies.
- Spatial and Physical Consistency: In the 2D MNIST Maze and 3D environment rotation tasks, content-addressed models (DNC and LRU) successfully achieved "loop closure." When returning to a previously visited location or angle, they consistently generated the exact same digits, wall textures, and skyline elements, whereas the VRNN suffered from severe visual "amnesia" and generated incoherent scenes.
Limitations and Future Work
While the paper demonstrates the power of external memory in generative models, it highlights that no single memory architecture dominates all tasks. The authors suggest that a hybrid model—combining the direct latent storage of the Introspection Network with the content-based addressing of a DNC—could provide a more universally dominant architecture. Additionally, they note that these models could be made significantly more computationally efficient by implementing sparse memory access mechanisms, such as fast K-nearest neighbor lookups.
Summary updated