Table of Contents
Fetching ...

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

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

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.

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

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.
Paper Structure (11 sections, 13 equations, 8 figures, 1 table)

This paper contains 11 sections, 13 equations, 8 figures, 1 table.

Figures (8)

  • Figure 1: Illustration of the usage of a finite context model in a compression task, showing how the probability of the next outcome, $y_{t+1}$, is conditioned by the last $k$ outcomes ($k= 5$, in this example). Adapted from pinho2010.
  • Figure 2: Outline of the two-step sequential strategy for hyperparameter context ($k^*$) and smoothing factor ($\alpha^*$) selection.
  • Figure 3: Boxplots of the distribution of pami for synthetic time series of length 100,000, generated with $k \in \{3, 8\}$ and $\alpha \in \{0, 0.1, 0.5,0.8, 1 \}$.
  • Figure 4: Boxplots of the distribution of Cramér’s $\nu$ (blue) and Cohen’s $\kappa$ (red) for the synthetic time series of length 100,000, with $k = 3$ and $\alpha \in \{ 0.1,0.5,0.8\}$.
  • Figure 5: Partial auto mutual information for two data sequences with $T=100,000$. Maximum value highlighted in red.
  • ...and 3 more figures