Avoiding Overfitting in Variable-Order Markov Models: a Cross-Validation Approach
Abstract
Higherorder Markov chain models are widely used to represent agent transitions in dynamic systems, such as passengers in transport networks. They capture transitions in complex systems by considering not only the current state but also the path of previously visited states. For example, the likelihood of train passengers traveling from Paris (current state) to Rome could increase significantly if their journey originated in Italy (prior state). Although this approach provides a more faithful representation of the system than firstorder models, we find that commonly used methodsrelying on KullbackLeibler divergencefrequently overfit the data, mistaking fluctuations for higherorder dependencies and undermining forecasts and resource allocation. Here, we introduce DIVOP (Detection of Informative VariableOrder Paths), an algorithm that employs crossvalidation to robustly distinguish meaningful higherorder dependencies from noise. In both synthetic and realworld datasets, DIVOP outperforms two stateoftheart algorithms by achieving higher precision, recall, and sparser representations of the underlying dynamics. When applied to global corporate ownership data, DIVOP reveals that tax havens appear in 82 of all significant higherorder dependencies, underscoring their outsized influence in corporate networks. By mitigating overfitting, DIVOP enables more reliable multistep predictions and decisionmaking, paving the way toward deeper insights into the hidden structures that drive modern interconnected systems.
Cite
@article{arxiv.2501.14476,
title = {Avoiding Overfitting in Variable-Order Markov Models: a Cross-Validation Approach},
author = {Valeria Secchini and Javier Garcia-Bernardo and Petr Janský},
journal= {arXiv preprint arXiv:2501.14476},
year = {2025}
}