Entropy Rate Estimation for Markov Chains with Large State Space

Yanjun Han, Jiantao Jiao, Chuan-Zheng Lee, Tsachy Weissman, Yihong Wu, Tiancheng Yu

Abstract

Estimating the entropy of a distribution is a fundamental problem in information theory and distribution property testing. While the sample complexity for estimating the Shannon entropy of i.i.d. samples is well-understood to be sublinear in the state space size $S$, real-world data often exhibits temporal dependencies. This paper investigates the estimation of the entropy rate for stationary reversible Markov chains with $S$ states from a sample path of $n$ observations. We establish that consistent estimation is achievable when $n \gg S^2 / \log S$, provided the relaxation time is not excessively large ($O(S / \ln^3 S)$). Conversely, we show that consistent estimation is impossible when $n \lesssim S^2 / \log S$ for chains with even slight dependency. This demonstrates that the optimal estimation accuracy is $\Theta(S^2 / (n \log S))$, a significant improvement over the empirical "plug-in" estimator which requires $\Omega(S^2)$ samples. We validate these theoretical bounds through synthetic experiments and applications to large-scale linguistic corpora, including the Penn Treebank and the Google One Billion Words corpus.

Introduction

Entropy serves as a critical measure of uncertainty and information content. In the context of discrete distributions with independent samples, previous research has shown that the Shannon entropy can be estimated with a sample size $n$ that is sublinear in the number of elements $S$—specifically, $n \approx S/\log S$. However, most natural processes, such as human language, DNA sequences, or financial time series, are characterized by dependencies. These are frequently modeled as Markov chains.

In such systems, the "entropy rate" quantifies the average information produced per step. Estimating this rate in large state spaces (where $S$ is large) presents a significant challenge known as the "curse of dimensionality." Because a Markov chain is defined by $S^2$ possible transitions, a naive approach requires tracking every possible state transition, leading to a sample complexity of $\Omega(S^2)$. This paper seeks to determine the fundamental limits of estimation and whether a "logarithmic bonus" similar to the i.i.d. case exists for Markovian data.

Methodology

The $H_{opt}$ Estimator

The authors propose a conditional approach to estimation. The entropy rate of a Markov chain can be decomposed into a weighted average of the Shannon entropies of the transition distributions for each state. Rather than using the standard empirical plug-in estimator—which simply counts observed frequencies and is known to be biased—the authors employ a minimax rate-optimal Shannon entropy estimator (the JVHW estimator) for each row of the transition matrix.

Theoretical Framework

To bridge the gap between dependent Markovian data and independent sample theory, the authors utilize a simulation framework based on Billingsley’s technique. This allows the sample path of a Markov chain to be viewed as a collection of independent samples assigned to different states, facilitating the application of concentration inequalities. To establish lower bounds, the authors use the "method of fuzzy hypotheses" and a Poissonized model to prove that no estimator can succeed with fewer than $\sim S^2 / \log S$ samples.

Key Theoretical Insights

The Logarithmic Bonus

The primary contribution of this work is proving that the optimal sample complexity for entropy rate estimation is $\Theta(S^2 / \log S)$. This indicates that the same logarithmic reduction in sample requirements found in i.i.d. entropy estimation applies to the transition matrices of Markov chains.

Bias, Variance, and Mixing Time

The research reveals a nuanced relationship between the chain's mixing properties and estimation feasibility:

  1. Bias: The bias of the empirical estimator vanishes as long as $n \gg S^2$, regardless of the mixing speed.
  2. Variance: If a Markov chain mixes very slowly (i.e., has a long relaxation time), the variance of the estimator can explode, making consistent estimation impossible.
  3. Reversibility: The tightest bounds are achieved for reversible Markov chains, where the transition probability $i \to j$ is balanced by $j \to i$ in the steady state.

Empirical Results and Applications

Synthetic Validation

Experiments using synthetic Markov chains with Uniform, Zipf, and Geometric transition distributions confirmed the theoretical predictions. The proposed $H_{opt}$ estimator consistently achieved a lower Root Mean Square Error (RMSE) than the empirical estimator, particularly in the regime where the number of samples was small relative to the state space size.

Language Modeling Benchmarks

The authors applied their estimators to two major linguistic datasets:

  • Penn Treebank (PTB): ~1.2 million words, $S \approx 47,000$.
  • Google One Billion Words (1BW): ~740 million words, $S \approx 2.4$ million.

On the 1BW dataset, the $H_{opt}$ estimator converged significantly faster than the empirical one, reaching stable estimates for unigrams using only 0.04% of the corpus. Interestingly, the study found that a 4-gram model suggests the entropy of English is approximately 3.46 bits/word. At the time of the study, the best neural language models achieved roughly 4.55 bits/word (perplexity of 23.5), suggesting a substantial gap between current AI performance and the theoretical information-theoretic limits of the language.

Conclusion

This work establishes the fundamental limits of entropy rate estimation for Markov chains, providing a sharp characterization of the sample complexity as $\Theta(S^2 / \log S)$. By demonstrating that consistent estimation is possible with fewer samples than previously thought, the authors provide a more efficient tool for analyzing large-scale sequential data. Future work may involve extending these tight lower bounds to non-reversible chains and exploring higher-order dependencies beyond the first-order Markov assumption.

Summary updated

BibTeX
@inproceedings{han2018entropy,
  author = {Yanjun Han and Jiantao Jiao and Chuan-Zheng Lee and Tsachy Weissman and Yihong Wu and Tiancheng Yu},
  title = {{Entropy Rate Estimation for Markov Chains with Large State Space}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=B1-GP_buZr},
}

Loading related content...

Figure