TL;DR
Tilted Empirical Risk Minimization (TERM) is a powerful framework for balancing robustness and fairness, but it completely breaks down in online streaming settings where data arrives one sample at a time. This paper introduces a simple, elegant tweak—dropping the logarithm from the TERM objective—to unlock the full robustness-fairness spectrum for single-sample streaming data with zero extra computational or memory overhead.
What Problem Does This Paper Address?
Most modern machine learning models rely on Empirical Risk Minimization (ERM), which minimizes the average loss across a dataset. While ERM works well on average, it treats all samples equally. This uniform weighting makes it fragile when dealing with noisy data, adversarial outliers, or severe class imbalances.
To fix this, researchers previously proposed Tilted ERM (TERM), which introduces an exponential tilt hyperparameter $t$. Positive values of $t$ magnify large losses (forcing the model to focus on hard or minority samples, promoting fairness), while negative values of $t$ suppress large losses (making the model ignore outliers, promoting robustness).
However, TERM was designed for batch learning. In online or streaming settings where a model processes only one sample at a time ($N=1$), the classical TERM mathematical formulation collapses right back into standard ERM. The tilt effect completely vanishes, leaving streaming applications without a way to tune the robustness-fairness trade-off.
Methods
The authors propose Online TERM, a novel formulation specifically engineered for single-sample streaming regimes.
The classical batch TERM objective uses a log-sum-exp form: $$\bar{R}(t; \theta) := \frac{1}{t} \log \left( \frac{1}{N} \sum_{i=1}^N e^{t \ell_i(\theta)} \right)$$
When $N=1$, the log and exponential functions cancel each other out, destroying the impact of $t$. The authors' core hack is beautifully simple: drop the logarithm. They propose the alternative online objective: $$\tilde{R}(t; \theta) := \frac{1}{t} e^{t \ell_i(\theta)}$$
When you take the gradient of this new objective to update the model parameters ($\theta$), you get: $$\nabla_\theta \tilde{R}(t; \theta) = e^{t \ell_i(\theta)} \nabla_\theta \ell_i(\theta)$$
This gradient reveals that the exponential weighting mechanism is fully restored at a single-sample level:
- When $t > 0$: Large losses are exponentially amplified, forcing aggressive updates on misclassified or rare samples.
- When $t < 0$: Large losses are exponentially attenuated, effectively acting as an automatic gradient clipper that ignores outliers.
Crucially, this modification requires no history tracking or memory overhead, making it ideal for strict streaming environments.
Datasets
The authors evaluated Online TERM using two synthetic streaming benchmarks designed to simulate common data corruptions:
- Robust Linear Regression Stream: A stream where 90% of the data points are clean "inliers" ($y = 0.52x - 2$ with Gaussian noise) and 10% are adversarial outliers shifted significantly upward ($y = 0.52x + 2$).
- Toy Binary Classification Stream: A high-variance streaming mixture of two linear models where 90% of the samples belong to a majority class (assigned label -1) and 10% belong to a rare minority/outlier class (assigned label +1).
Key Insights and Ideas
- The Logarithm was a Batch-Only Necessity: The core realization is that the logarithm in classical TERM is only there to keep batch losses on the same scale as standard ERM. In a sequential, single-sample update rule, it acts as a mathematical blocker. Removing it unblocks the gradient-scaling properties.
- Optimizer Agnostic: Because the online tilt modifies the gradient directly, it works seamlessly across various standard optimizers, including vanilla SGD, SGD with Momentum, and Adam.
- Dual-Nature of the Tilt Sign: The sign of $t$ completely flips the model's philosophy. A negative tilt acts as a smooth, continuous outlier-rejection mechanism, while a positive tilt acts as an attention mechanism for rare events or minority groups.
Key Results
Robust Regression ($t = -0.5$)
When faced with a stream corrupted by 10% outliers, standard ERM variants get pulled away from the true line. Online TERM with a negative tilt completely mitigates this effect, tracking the true inlier distribution perfectly. As shown in the parameter error tracking, Online TERM variants converge steadily to near-zero error, while ERM baselines remain highly unstable and oscillatory.
Outlier Detection ($t = 0.2$)
In the binary classification task, setting a positive tilt ($t = 0.2$) successfully shifts the decision boundaries to capture rare minority samples. The confusion matrices showed a distinct increase in true positives (correctly identified outliers) and a sharp drop in false negatives compared to standard ERM, significantly improving model recall for rare events.
Limitations and Future Work
- Exploding Gradients: For positive values of $t$, the exponential factor $e^{t\ell}$ can grow extremely large if a sample incurs a high loss. This requires practitioners to carefully select and downscale their learning rates to maintain training stability.
- Manual Hyperparameter Tuning: The optimal sign and magnitude of the tilt parameter $t$ currently depend on manual selection based on the specific task goal (robustness vs. sensitivity). The authors note that developing adaptive, data-driven heuristics to dynamically tune $t$ during streaming is a vital direction for future research.
Summary updated