Adversarial Group Fairness in Contextual Bandits: When Robust is Not Fair

Ray Telikani, Jaber valizadeh, Amir H Gandomi, Bao Quoc Vo, Ming DingNeurIPS 2026

TL;DR

Imagine an AI assigning clinical treatments that performs wonderfully on average, while quietly giving terrible recommendations to elderly patients because an attacker poisoned their specific input data. Standard "robust" AI defenses not only miss these targeted attacks—they actually make them worse by dismissing the targeted minority's data as statistical outliers. This paper introduces AnchorFair, a defense for contextual bandits that discovers hidden demographic groups on the fly and protects them from targeted sabotage without ever needing access to sensitive demographic labels.

What Problem Does This Paper Address?

Contextual bandits are the decision-making engines behind recommendation systems, dynamic pricing, and clinical trials. At each step, the algorithm observes a "context" (like a user's profile), picks an "arm" (an action, like recommending an article or treatment), and learns from the resulting reward. When relationships are complex, neural networks handle the heavy lifting—a setup called Neural Contextual Bandits (NCBs).

While we know NCBs are vulnerable to adversarial attacks, existing defenses assume the attacker wants to ruin overall system performance. The authors ask a more sinister question: What if an upstream attacker (like a compromised data broker) subtly perturbs contexts to degrade decisions only for a specific demographic subgroup, while keeping global performance metrics looking completely normal?

The authors formalize this as a Group-Targeted Suppression Attack (GTSA). Because a minority group makes up a small fraction of total traffic, an attacker can inflict linear regret (perpetually bad decisions) on that group while global averages barely budge. Complicating matters, real-world privacy laws (like GDPR) often forbid the defender from seeing protected attributes like race or age, meaning the system cannot simply monitor known groups.

Methods

Because aggregate monitoring is mathematically blind to GTSA, the authors build AnchorFair around three interlocking ideas that work without ground-truth demographic labels:

  1. Trust-Weighted Policy Anchor: Alongside the fast-learning main neural network, AnchorFair maintains a lightweight "anchor" network updated via an Exponential Moving Average (EMA). What’s new here is that the EMA rate is governed by a trust score based on agreement (KL-divergence) between the main policy and the anchor, backed up by group-level error trackers (CUSUM). In peaceful times, the anchor tracks the main policy; when an attack triggers disagreement, trust plummets and the anchor freezes, preserving a clean pre-attack memory.
  2. Prediction-Error-Aware Demographic Discovery: Since demographic labels are hidden, AnchorFair discovers latent groups using online $k$-means clustering in the anchor’s stable embedding space. Crucially, it appends the anchor's prediction error to the features being clustered. Under attack, targeted groups suffer biased prediction errors, helping separate subtle groups that look similar in raw feature space.
  3. Arm-Specific Demographic-Aware Exploration: Standard Upper Confidence Bound (UCB) exploration is modified with a targeted bonus. When a discovered group's trust score drops, AnchorFair boosts exploration specifically on the actions where the frozen anchor and the corrupted main policy disagree—effectively double-checking the exact arms whose rankings the attacker tried to invert.
The step-by-step AnchorFair algorithm

Datasets

The authors evaluate AnchorFair against five baseline algorithms (spanning standard, robust, and fair bandits) on two datasets:

  • COMPAS (Semi-synthetic): Based on the well-known recidivism risk dataset, modified here with injected structure across $G = 4$ demographic groups.
  • MovieLens: A real-world movie recommendation dataset segmented into $G = 6$ demographic groups.

Key Insights and Ideas

  • The "Robust-but-Not-Fair" Trap: This is the paper's biggest "aha" moment. Standard robust bandit algorithms (like R-NeuralUCB and BARBAR) defend the global average by down-weighting anomalous data. Under a targeted group attack, these defenses treat the sabotaged minority group as the anomaly, ignoring their signals and amplifying harm worse than having no defense at all!
  • Impossibility of Global Monitoring: With a total perturbation budget scaling with the square root of time, $\Omega(\sqrt{T})$, an attacker can inflict catastrophic $\Omega(T)$ regret on a subgroup while observable global statistics deviate by $o(1)$ (vanishingly small). If you don't look at groups, you cannot catch this.
  • One-Way Street for Errors: Clustering errors could theoretically spiral if bad clusters ruined the trust score, which in turn ruined the embeddings. AnchorFair wires its dependencies strictly in one direction—trust depends only on policy-anchor agreement, keeping the anchor stable even if clustering momentarily stumbles.

Key Results

  • Theoretical Tightness: AnchorFair provably achieves sublinear $\tilde{O}(\sqrt{T})$ regret for every group so long as the attack budget is $B = O(\sqrt{T})$—matching the information-theoretic limit above which no defense can survive.
  • Protecting the Target: Under GTSA, AnchorFair kept target-group regret amplification to $\times 1.52$ (and between $-2\%$ and $+20\%$ across varying budgets relative to benign runs). By contrast, baselines suffered $\times 2.07$ to $\times 2.45$ amplification, with robust/fair baselines spiking by $+30\%$ to $+200\%$.
  • Fairness Gap: AnchorFair achieved a per-capita regret gap across groups of 0.041 under attack, beating FairBandit (0.076), R-NeuralUCB (0.096), and BARBAR (0.134).
  • Low Overhead: Runtime scales linearly with the number of actions, taking just 1.14 ms (COMPAS) and 1.70 ms (MovieLens) per round for 30 arms, using $\le$ 0.15 MB of peak memory.

Limitations and Future Work

  • Non-Adaptive Attackers: The proofs assume the attacker’s strategy doesn't dynamically adapt to AnchorFair’s internal cluster assignments. Defending against adaptive attackers (perhaps via differential privacy on cluster centroids or randomized clustering) is left for future work.
  • Clean Cluster Geometry: The theory leans on groups being reasonably separable in embedding space after a warm-up phase, excluding messy, multimodal, or non-convex group distributions (though performance degrades gracefully if groups overlap).
  • Beyond Bandits: Testing scalability on massive numbers of groups—and extending this defense to full reinforcement learning (contextual MDPs) where state transitions also depend on demographics—are natural next steps.

Summary updated

Abstract

Neural contextual bandits support high-stakes decision systems---from clinical trial allocation to content recommendation. This paper investigates an adversarial threat, \emph{group-targeted suppression attacks} (GTSA), in which an adversary selectively degrades performance for a demographic subgroup while preserving global performance metrics. We first show that under standard aggregate monitoring, GTSA with budget $B = \Omega(\sqrt{T})$ can induce $\Omega(T)$ group regret while maintaining only $o(1)$ deviation in observable global statistics, establishing that any defense that ignores group structure is fundamentally vulnerable. To address this vulnerability, we propose \textsc{AnchorFair}, a robust mitigation framework comprising three components: (i) a trust-weighted policy anchor with provable bounded drift, (ii) representation-stable demographic discovery via online clustering in a slowly evolving embedding space, and (iii) a demographic-aware exploration mechanism that adaptively amplifies learning for underrepresented or low-trust groups. We prove that \textsc{AnchorFair} achieves sublinear group regret $\tilde{O}(\sqrt{T})$ for all groups under GTSA. Source codes are available at https://github.com/RayTelikani/AnchorFair.
BibTeX
@inproceedings{telikani2026adversarial,
  author = {Ray Telikani and Jaber valizadeh and Amir H Gandomi and Bao Quoc Vo and Ming Ding},
  title = {{Adversarial Group Fairness in Contextual Bandits: When Robust is Not Fair}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=QqqBvLrJr6},
}
Figure