Abstract
We present a unified framework for online learning where a learner competes against sequences of experts defined by weighted finite automata (WFA). This approach generalizes classic problems such as "tracking the best expert" by allowing for complex, structured patterns of expert sequences. We introduce the Automata Weighted-Majority (AWM) algorithm, which achieves sublinear regret while maintaining computational efficiency through automata operations and $n$-gram approximations.
Introduction
In the classic "prediction with expert advice" paradigm, a learner aims to minimize regret relative to the single best expert in hindsight. However, in many real-world scenarios, the optimal expert changes over time. While algorithms like Fixed-Share address simple "shifting" patterns, they lack the flexibility to handle more complex structures such as hierarchies, cycles, or data-driven patterns.
This work bridges that gap by employing Weighted Finite Automata (WFA) to represent virtually any structured class of competitor sequences. By treating the learning problem as a graph-theoretic one, we can leverage established techniques from finite-state transducer research to develop efficient and theoretically sound online learning algorithms.
The Automata Weighted-Majority (AWM) Algorithm
The core contribution is the Automata Weighted-Majority (AWM) algorithm. Unlike standard methods that maintain weights over individual experts, AWM maintains a distribution over paths within a WFA. Each path represents a specific sequence of experts.
The algorithm updates these weights efficiently using standard automata operations:
- Intersection: Combining the current weight distribution with the observed losses.
- Weight-Pushing: Re-normalizing the weights across the automaton to ensure a valid probability distribution.
Approximation and Efficiency
For very large automata, real-time processing can become computationally prohibitive. To address this, we propose two main techniques:
$n$-gram Approximations
A complex automaton can be approximated by a simpler $n$-gram model. We demonstrate that by minimizing the $\infty$-Rényi divergence between the target automaton and the $n$-gram model, the additional regret incurred remains bounded. Notably, we prove that the well-known Fixed-Share algorithm is a specific bigram approximation of a $k$-shifting automaton, providing a new theoretical foundation for its success.
Failure Transitions ($\phi$-transitions)
Inspired by string-matching and speech recognition, we utilize "failure transitions" to compress the automaton's representation. This allows the algorithm to execute updates $N$ times faster (where $N$ is the number of experts) for certain sequence classes without losing expressive power.
Theoretical Results
The AWM algorithm provides a weighted regret bound of $O(\sqrt{T H_\eta(q)})$, where $H_\eta(q)$ is the Rényi entropy of the sequence distribution. This bound implies that if the best-performing sequences are concentrated within a small subset of the automaton, the learner's performance improves significantly. Furthermore, the per-round computational complexity is $O(|E_A|)$, where $E_A$ is the number of transitions in the automaton, making it practical for a wide range of applications.
Conclusion
By framing expert sequence competition through the lens of weighted finite automata, we provide a flexible and efficient framework for online learning in dynamic environments. Future work may extend this approach to more complex formal languages, such as context-free grammars, or explore its application in the bandit feedback setting.
Summary updated