Learning higher-order sequential structure with cloned HMMs

Antoine Dedieu, Nishad Gothoskar, Scott Swingle, Wolfgang Lehrach, Miguel Lázaro-Gredilla, Dileep GeorgearXiv 2019

Abstract

Sequence modeling often faces a trade-off between the interpretability of probabilistic models like Hidden Markov Models (HMMs) and the performance of deep learning architectures like LSTMs. This paper introduces the Cloned Hidden Markov Model (CHMM), which utilizes a fixed, sparse emission structure inspired by the columnar organization of the neocortex. By assigning multiple "clone" hidden states to each observation, CHMMs overcome the credit diffusion problem that plagues standard overcomplete HMMs. Our results demonstrate that CHMMs outperform LSTMs on character-level language modeling tasks while offering superior interpretability and computational efficiency.

Introduction

Capturing long-term dependencies in sequential data is a fundamental challenge in artificial intelligence. While Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks have become the industry standard for these tasks, they are often criticized for being "black boxes" that struggle to handle uncertainty natively. Probabilistic graphical models, specifically Hidden Markov Models (HMMs), offer a mathematically transparent alternative. However, standard HMMs fail to scale to complex sequences because increasing the number of hidden states leads to "credit diffusion" during training. In an overcomplete HMM, the learning signal from the Baum-Welch algorithm is distributed across too many possibilities, causing the model to converge to poor local minima.

The Cloned HMM Framework

The authors propose the Cloned HMM (CHMM) to resolve the credit diffusion problem. The core innovation is a specific sparsity constraint applied to the emission matrix. In a CHMM, each observed symbol (e.g., a character in a text) is assigned a fixed set of hidden states, or "clones."

Architectural overview of CHMMs, comparing standard HMMs (b) with cloned variants (c) and illustrating the biological inspiration from neocortical columns (g).

Key features of the CHMM architecture include:

  1. Deterministic Emissions: Each hidden state maps deterministically to exactly one emission. For instance, states 1–10 might only emit 'A', while states 11–20 only emit 'B'.
  2. Fixed Sparsity: This mapping is initialized before training and remains unchanged. The model only learns the transition matrix—the probabilities of moving between hidden states.
  3. Biological Inspiration: This structure mimics the columnar organization of the neocortex, where different neurons (clones) in a column represent the same sensory input but within different sequential contexts.
  4. Scalable Training: By fixing the emission matrix, the authors developed an online Expectation-Maximization (EM) algorithm capable of training models with over 1 billion parameters on standard hardware.

Experimental Evaluation

The CHMM was evaluated on both synthetic and real-world datasets. Synthetic tests included a "Toy FSM" designed to measure context recovery over long gaps and a bracket-matching task for nested structures. For real-world performance, the model was tested on eight character-level text datasets from the NLTK and Gutenberg projects, including Hamlet, Moby Dick, and War and Peace.

On 7 out of 8 text datasets, the CHMM achieved a lower Bits Per Symbol (BPS) than LSTMs and n-gram models. For example, on Alice in Wonderland, the CHMM reached 1.54 BPS compared to 1.58 for the LSTM. Furthermore, the CHMM demonstrated significant gains in computational efficiency; a forward pass for a 42,000-character sequence took only 1.6 seconds for the CHMM, compared to 32.4 seconds for a PyTorch-based LSTM on the same GPU.

Key Insights and Interpretability

The primary advantage of the CHMM is its ability to avoid credit diffusion. By forcing the model to use its hidden states to represent temporal context rather than emission probabilities, the learning process is effectively regularized. This allows the model to recover the global optimum of the sequence structure where a standard overcomplete HMM would fail.

The learned transition matrix of a CHMM exhibits a highly structured, sparse pattern, indicating successful recovery of sequential dependencies.

Beyond predictive performance, CHMMs are highly interpretable. By applying community detection to the learned transition matrix, the authors discovered emergent "word graphs"—clusters of hidden states representing specific words or common suffixes—despite the model only being trained on raw characters. Additionally, as a generative model, the CHMM can perform zero-shot tasks like decoding scrambled text using Viterbi decoding to find the most likely sequence of hidden states.

Limitations and Future Work

While CHMMs excel on the tested datasets, LSTMs may still scale more effectively to "web-scale" datasets with massive vocabularies. The current EM algorithm also tends to underutilize the available clones; future research could incorporate sparse priors (e.g., Dirichlet priors) to improve efficiency. Finally, integrating advanced smoothing techniques from n-gram models, such as Kneser-Ney smoothing, could further enhance the CHMM's predictive power.

Summary updated

BibTeX
@misc{dedieu2019learning,
  author = {Antoine Dedieu and Nishad Gothoskar and Scott Swingle and Wolfgang Lehrach and Miguel Lázaro-Gredilla and Dileep George},
  title = {{Learning higher-order sequential structure with cloned HMMs}},
  year = {2019},
  eprint = {1905.00507},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.00507},
}
Figure