Abstract
We study a theoretical and algorithmic framework for structured prediction in the online learning setting. The problem of structured prediction, i.e. estimating function where the output space lacks a vectorial structure, is well studied in the literature of supervised statistical learning. We show that our algorithm is a generalisation of optimal algorithms from the supervised learning setting, and achieves the same excess risk upper bound also when data are not i.i.d. Moreover, we consider a second algorithm designed especially for non-stationary data distributions, including adversarial data. We bound its stochastic regret in function of the variation of the data distributions.
Introduction
Standard machine learning often assumes that output spaces possess a vectorial structure, allowing for straightforward mathematical operations. However, many real-world applications involve structured outputs—complex objects like sequences in translation, pixel-wise labels in image segmentation, or 3D structures in protein folding—that lack this linear structure.
While structured prediction is well-established in batch learning settings, it presents significant challenges in online learning. In this setting, data arrives sequentially, and the underlying distribution may be non-stationary or even adversarial. This work introduces a general framework and two novel algorithms, OSKAAR and SALAMI, to provide the first rigorous theoretical guarantees for structured prediction in these dynamic environments.
The Online Learning Framework
The core of the study revolves around an online learning process where a learner interacts with an environment over $T$ time steps. At each step, the learner receives contextual information, makes a prediction, observes the true label, and updates its model based on the resulting loss.
This framework is designed to handle output spaces $\mathcal{Z}$ and label spaces $\mathcal{Y}$ that do not necessarily have a vectorial structure, using a loss function $\Delta$ to measure performance. By shifting the problem into a feature space (Hilbert space) and projecting back to the structured output space only at the final stage, the learner can apply linear mathematical techniques to non-linear problems.
Algorithmic Approach
The proposed methodology relies on Implicit Loss Embedding (ILE). ILE decomposes complex, non-convex loss functions into inner products within a high-dimensional Hilbert space. This allows the use of kernel methods to manage structured outputs effectively without requiring prior knowledge of complex internal feature maps.
OSKAAR
The Online Structured prediction with Kernel Aggregating Algorithm Regression (OSKAAR) algorithm is designed for relatively stable environments. It employs a variant of Kernel Ridge Regression to estimate the features of true labels in the embedded space.
SALAMI
For non-stationary or adversarial data, the authors propose SALAMI (Structured prediction ALgorithm with Aggregating MIxture). SALAMI acts as a meta-algorithm that aggregates multiple instances of OSKAAR, each starting at different time intervals. By using an Exponentially Weighted Average (EWA) forecaster, SALAMI can effectively "forget" obsolete data and adapt to shifts in the data distribution.
Theoretical Guarantees
A key contribution of this work is proving that online structured prediction can achieve performance bounds comparable to optimal batch-learning algorithms, even when data is not independent and identically distributed (i.i.d.).
- Stationary Performance: In stationary settings, OSKAAR achieves a regret bound of $O(T^{3/4} \sqrt{\log T})$, ensuring that the average error diminishes as more data is processed.
- Non-Stationary Adaptation: SALAMI provides sublinear regret in changing environments, with bounds tied to the variation of the data distribution ($V_G$ for continuous change or $V_0$ for discrete shifts). Specifically, it achieves rates around $\tilde{O}(T^{5/6})$ or $\tilde{O}(T^{3/4})$ depending on the nature of the distribution shift.
- Optimality: The framework recovers optimal convergence rates previously known only for the i.i.d. supervised learning setting, extending them to non-i.i.d. scenarios.
Discussion and Future Work
While providing strong theoretical foundations, the algorithms face practical challenges. The computational complexity of OSKAAR is $O(t^2)$ per round, and SALAMI reaches $O(t^3)$. Future work may involve integrating approximation techniques like Nyström methods to reduce this to $O(t \log t)$. Additionally, tuning SALAMI currently requires prior knowledge of environmental variation, suggesting a need for more adaptive parameter-tuning strategies. Finally, extending the comparison inequalities to handle time-varying baselines remains an open research direction.
Summary updated