Online Fair Division with Contextual Bandits

Arun Verma, Indrajit Saha, Makoto Yokoo, Bryan Kian Hsiang Low · DOI

Abstract

Online fair division often involves allocating a massive number of unique items to a set of agents. Traditional methods struggle when items appear only a few times, making utility estimation difficult. This paper reframes the problem as a contextual bandit task, where item features are used to generalize utility. We propose two algorithms, OFD-UCB and OFD-TS, which balance efficiency and fairness using a weighted Gini social-evaluation function. Theoretical analysis and simulations demonstrate that these methods achieve sub-linear regret, effectively learning fair allocations in high-dimensional feature spaces.

Introduction

In modern digital ecosystems, platforms must frequently allocate resources or tasks to service providers. Consider an online food delivery service: every time a user (an "item") opens the app, the platform must recommend a restaurant (an "agent"). This process involves two competing objectives: efficiency, maximizing the satisfaction of the user and the profit of the platform, and fairness, ensuring that all restaurants receive a sustainable share of orders.

System model for online fair division where an online platform allocates sequential user requests to service providers while balancing fairness and efficiency.

Existing online fair division algorithms typically assume a small number of item types with many copies, allowing for easy utility estimation. However, in real-world scenarios with millions of unique users, building reliable estimates for specific user-agent pairs is impossible. This paper addresses this "large items, few copies" gap by assuming that utility is a function of item features (e.g., location, preferences) rather than item IDs.

Methodology

The core innovation lies in modeling online fair division as a contextual bandit problem.

The Contextual Shift

Instead of learning a static utility matrix, the authors assume utility is derived from features. In this framework:

  • Context: Represents the features of the arriving item.
  • Arms: Represent the set of agents (service providers).
  • Reward: The stochastic utility generated by the allocation.

Balancing Fairness and Efficiency

To navigate the trade-off between total utility and equitable distribution, the authors employ a "goodness function" ($G$), specifically the weighted Gini social-evaluation function. By tuning a parameter $\rho$, the platform can shift between utilitarianism (maximizing total utility) and egalitarianism (maximizing the utility of the least-satisfied agent).

Proposed Algorithms

Two primary algorithms are introduced:

  1. OFD-UCB (Online Fair Division - Upper Confidence Bound): This algorithm maintains an optimistic estimate of the utility function and selects the agent that maximizes the goodness function based on the upper bound of potential utility.
  2. OFD-TS (Online Fair Division - Thompson Sampling): A Bayesian approach that samples utility parameters from a posterior distribution, often providing more effective exploration in practice.

Key Insights and Results

A critical challenge in this setting is that fair division is history-dependent. Unlike standard bandits where rewards are independent across rounds, the "goodness" of an allocation depends on the cumulative utility an agent has received previously. Despite this complexity, the authors prove that both OFD-UCB and OFD-TS achieve sub-linear regret, meaning their performance converges to that of an optimal "Oracle" over time.

Empirical evaluations using synthetic datasets confirmed these theoretical findings. The proposed algorithms significantly outperformed random and greedy baselines. Notably, Thompson Sampling (OFD-TS) generally exhibited lower cumulative regret and better adaptation than the UCB variant. The results also showed that while regret increases with the number of agents ($N$) or feature dimensions ($d$), it decreases as the number of copies per item ($c$) increases, facilitating faster learning.

Conclusion

By integrating contextual bandits with social welfare functions, this work provides a robust framework for fair resource allocation in large-scale online platforms. While the current model focuses on Gini-based fairness and static utility functions, future research could extend these concepts to other fairness definitions like envy-freeness or non-stationary environments where preferences evolve over time.

Summary updated

BibTeX
@inproceedings{verma2026online,
  author = {Arun Verma and Indrajit Saha and Makoto Yokoo and Bryan Kian Hsiang Low},
  title = {{Online Fair Division with Contextual Bandits}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=2XMLJj67yY},
}
Figure