stat.MLMar 20, 2026

A two-step sequential approach for hyperparameter selection in finite context models

Authors: José Contente, Ana Martins, Armando J. Pinho, Sónia Gouveia

Organizations: Institute of Electronics and Informatics Engineering of Aveiro (IEETA), Department of Electronics, Telecommunications and Informatics (DETI), University of Aveiro (UA), Aveiro, Portugal · Intelligent Systems Associate Laboratory (LASI), Portugal

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.

Figures & tables

Explore similar work

CardsList
  1. FlexComp: One Model for Every Ratio in Context Compression

    Sep 10, 2026Kaiyan Zhao, Zhongtao Miao, Akiko Aizawa +1LLM Inference AccelerationContext Compression

  2. Density-aware Soft Context Compression with Semi-Dynamic Compression Ratio

    Mar 26, 2026Yijiong Yu, Shuai Yuan, Jie Zheng +2LLM Context CompressionContext Compression

  3. Fractional State Space Transition for Long Sequence Modeling

    Sep 28, 2026Ivan Kobyzev, Abbas Ghaddar, Ali Nasiri-Sarvi +2State Space Language ModelsState Space Models