Skip to main content
QUICK REVIEW

[Paper Review] A two-step sequential approach for hyperparameter selection in finite context models

José Contente, Ana Martins|arXiv (Cornell University)|Mar 20, 2026
Algorithms and Data CompressionComputer Science0 citations
TL;DR

Proposes a two-step sequential method to select hyperparameters k and α for finite-context models (FCMs): use pami to identify k, then maximize a Dirichlet–multinomial marginal likelihood to estimate α given k, achieving comparable compression to grid search with much lower cost.

ABSTRACT

Finite-context models (FCMs) are widely used for compressing symbolic sequences such as DNA, where predictive performance depends critically on the context length k and smoothing parameter α. In practice, these hyperparameters are typically selected through exhaustive search, which is computationally expensive and scales poorly with model complexity. This paper proposes a statistically grounded two-step sequential approach for efficient hyperparameter selection in FCMs. The key idea is to decompose the joint optimization problem into two independent stages. First, the context length k is estimated using categorical serial dependence measures, including Cramér's ν, Cohen's \k{appa} and partial mutual information (pami). Second, the smoothing parameter α is estimated via maximum likelihood conditional on the selected context length k. Simulation experiments were conducted on synthetic symbolic sequences generated by FCMs across multiple (k, α) configurations, considering a four-letter alphabet and different sample sizes. Results show that the dependence measures are substantially more sensitive to variations in k than in α, supporting the sequential estimation strategy. As expected, the accuracy of the hyperparameter estimation improves with increasing sample size. Furthermore, the proposed method achieves compression performance comparable to exhaustive grid search in terms of average bitrate (bits per symbol), while substantially reducing computational cost. Overall, the results on simulated data show that the proposed sequential approach is a practical and computationally efficient alternative to exhaustive hyperparameter tuning in FCMs.

Motivation & Objective

  • Motivate the need for efficient hyperparameter selection in finite-context models (FCMs) for symbolic sequences like DNA.
  • Develop a two-step approach that decouples context length k from smoothing α to reduce optimization complexity.
  • Provide a statistically grounded method to estimate k and α with empirical Bayes and information-theoretic measures.

Proposed method

  • Estimate k* using pami (partial auto mutual information) as a lag-based feature indicating the strongest serial dependence.
  • Assume conditional independence across contexts and estimate α*|k* by maximizing the Dirichlet–multinomial marginal likelihood (empirical Bayes) across contexts of order k*.
  • Represent the Lidstone smoothing in FCMs as P(y_{t+1}=s|c^t)=(n_s^t+α)/(∑_a n_a^t+|A|α) and interpret α as a Dirichlet prior parameter.
  • Compute pami(h)=E[log(P(Y_t,Y_{t+h}|F_t)/(P(Y_t|F_t)P(Y_{t+h}|F_t)))] and select k* as the lag with the maximum pami.
  • Optionally compare with other features like Cramér’s ν and Cohen’s κ, though they were not effective for larger k.
$(k,\alpha)=(3,0)$
$(k,\alpha)=(3,0)$

Experimental results

Research questions

  • RQ1Can a two-step sequential procedure reliably identify the optimal context length k* in finite-context models from symbolic sequences?
  • RQ2Can α* be accurately estimated by maximizing the Dirichlet–multinomial marginal likelihood conditional on the chosen k*?
  • RQ3How does the proposed sequential approach compare to exhaustive grid search in terms of compression performance (bits per symbol) and computational cost?
  • RQ4What is the impact of sample size on the accuracy of k* identification and α* estimation?
  • RQ5Do alternative categorical-time-series features (e.g., ν, κ) offer comparable benefits for selecting k*?

Key findings

  • pami shows a clear peak at the true lag k and outperforms ν and κ for identifying k*, with about 70% correct k* at T=100,000 in simulations.
  • α*|k* estimates improve with larger sample sizes and are more accurate when k* is correctly identified; misidentifying k* degrades α* estimation.
  • The two-step method yields compression bitrate (bps*) close to grid-search bitrate (bps(gs)) and, importantly, requires only a single compression run versus many in grid search.
  • When k* is correctly identified, bps* is indistinguishable from the data-generating bitrate; misidentifying k* tends to worsen compression, though α* can partially compensate.
  • Overall, the context length k is the dominant hyperparameter for compression efficiency, with the sequential approach offering substantial computational savings.
$(k,\alpha)=(8,0)$
$(k,\alpha)=(8,0)$

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.