Inverse Linear Bandits via Linear Programs

Ziqing Song, Lin F. Yang, Ruosong Wang

TL;DR

Can you figure out what someone values just by watching the choices they make while learning, without ever seeing the payoffs they receive? This paper shows how to reverse-engineer the underlying reward function of a stochastic linear bandit algorithm from a single sequence of its chosen actions. By framing the agent's exploration history as a clever Linear Program, the authors extract the true reward parameters with near-optimal accuracy—no peeking at internal algorithm states or individual rewards required.

What Problem Does This Paper Address?

Designing reward functions for Reinforcement Learning (RL) is notoriously tricky, which gave rise to Inverse Reinforcement Learning (IRL): inferring rewards by watching an expert. Traditionally, IRL assumes the expert is already optimal. Paradoxically, watching perfection is uninformative: if an expert always picks the single best option, you learn very little about how all the other options compare, leading to non-identifiability (many reward functions could explain the same behavior) and high sample complexity.

Watching a learning agent is much richer. Its early exploratory mistakes and gradual shift toward exploitation reveal the relative quality of different actions. Consider auditing a recommendation engine: privacy rules might hide individual user clicks (the rewards), leaving you only with system logs of which items were displayed (the actions) and perhaps an overall quarterly click-through rate.

Prior work tackled this "inverse linear bandit" problem, where expected rewards are a linear function of action features ($\langle a, \theta^* \rangle$), and the goal is to recover the hidden vector $\theta^*$. However, the existing state-of-the-art estimator had major blind spots: it only worked if the demonstrator ran one specific algorithm (Phased Elimination), required knowing the demonstrator's internal states and hyperparameters, needed strict geometric assumptions on the action set, and threw away all data except the final phase of learning.

Methods

The authors introduce a unified framework that works across general action sets without needing internal algorithm details, accommodating two classic bandit algorithms: Phased Elimination (which tests actions in epochs and discards suboptimal ones) and LinUCB (which picks actions optimistically using upper confidence bounds).

Instead of least-squares regression—which struggles to blend early, noisy exploration with late, precise exploitation—the authors use Linear Programming (LP):

  • Every pull is a linear constraint: If a low-regret bandit algorithm chooses action $a_t$ at round $t$, that action could not have looked too bad at the time. Its true expected reward $\langle a_t, \theta^* \rangle$ must lie between the optimal reward $\mu^*$ and $\mu^*$ minus a shrinking uncertainty margin.
  • Adaptive tightening: Because the observer doesn't know the demonstrator's exact hyperparameters, the LP introduces a global scaling variable $C \ge 0$ for the uncertainty margins and minimizes $C$, automatically finding the tightest confidence bounds consistent with the entire action trajectory.
  • A unified estimator: Phased Elimination's uncertainty shrinks like $\sqrt{d^2/t}$ ($d$ is feature dimension), while LinUCB's shrinks with the empirical feature covariance ($\sqrt{d}\|a_t\|_{V_{t-1}^{-1}}$). By taking the maximum of these two terms inside the LP constraints, a single estimator (Algorithm 6) seamlessly handles demonstrations from either algorithm without knowing which one generated the data.
  • Breaking symmetry: The method only requires the action sequence and a coarse approximation $\mu$ of the best possible reward (obtainable from aggregate statistics, like total average revenue), which is mathematically necessary to anchor the reward scale.

Datasets

The authors evaluate their algorithms on:

  • Synthetic environments: 4,000 action vectors sampled from the surfaces of unit $\ell_1$, $\ell_2$, and $\ell_5$ balls in dimensions $d \in \{8, 16\}$.
  • Semi-synthetic real-world datasets: Demonstrations constructed by sampling 6,000 users and 4,000 items (with associated ratings) from MovieLens 25M and the Amazon Reviews digital music subset. No new benchmark datasets are introduced.

Key Insights and Ideas

  • Suboptimal choices are features, not bugs: By turning every historical action into an inequality constraint, an LP naturally weights early exploratory pulls (loose bounds) alongside late exploitative pulls (tight bounds), using 100% of the trajectory rather than discarding early epochs.
  • Actions carry almost as much signal as rewards: Surprisingly, the authors prove an information-theoretic lower bound showing that any inverse learner's error is bounded by $\Omega(\|a\|_{\bar{V}^{-1}})$—and this fundamental limit holds even if the learner could see the exact rewards. Watching the sequence of actions alone captures nearly the same structural information!
  • Partial histories work fine: If you miss the beginning of the learning process and only observe the tail end of the log, the LP still works without extra penalty; it simply scales with the covariance of the actions you actually observed.

Key Results

  • Theoretical optimality: The LP estimators match the information-theoretic lower bound up to polynomial factors in dimension $d$ and $\log T$ (where $T$ is demonstration length).
  • Outperforming prior work: Across all synthetic ($d \in \{8, 16\}$) and semi-synthetic (MovieLens, Amazon) benchmarks under Phased Elimination, the proposed LP estimators consistently achieve lower relative parameter error ($\|\hat{\theta} - \theta^*\|_2 / \|\theta^*\|_2$) than the Guha et al. (2024) baseline.
  • Zero cost for unification & rivaling forward learners: On Phased Elimination data, the unified estimator matches the specialized estimator with virtually no empirical penalty. On LinUCB demonstrations ($d=8$), the unified inverse estimator—seeing zero individual rewards—tracks the decreasing error curve of the forward LinUCB estimator (which does see every reward) remarkably closely.

Limitations and Future Work

  • Algorithm scope: The theoretical guarantees rely on confidence-bound mechanics (LinUCB and Phased Elimination). Extending this framework to randomized exploration like Thompson Sampling, or to nonlinear reward settings, remains open.
  • Polynomial gaps: While near-optimal, there are still polynomial factors in $d$ and $\log T$ (e.g., $\sqrt{d^7 \log^7 T}$ when concentrating LinUCB's empirical covariance) between the upper and lower bounds that future work could tighten.
  • Aggregate side-information: To recover exact rewards rather than rewards up to an additive shift, the learner needs an approximate estimate of the optimal reward $\mu^*$.

Summary updated

Abstract

Inverse reinforcement learning (IRL) is a well-established paradigm for circumventing the need for explicit reward. In this paper, we study the problem of estimating the reward function from a single sequence of actions (i.e., a demonstration) of a stochastic linear bandit algorithm. Our main result is a unified approach for inverse linear bandits, based on the idea of formulating a linear program by tightly characterizing the confidence intervals of pulled actions. We show that the estimation error of our algorithms matches the information-theoretic lower bound, up to polynomial factors in $d$ and $\log T$, where $d$ is the dimensionality of the feature space and $T$ is the length of the demonstration. Compared to prior approaches, our approach (i) gives a unified reward estimator that works when the demonstrator employs LinUCB or Phased Elimination, two popular algorithms for stochastic linear bandits, while existing estimator only works for Phased Elimination; (ii) does not require access to hyperparameters or internal states of the demonstrator algorithm as required by prior work; and (iii) works for general action sets, while existing estimator requires assumptions on the density and geometry of the action set. We further demonstrate the practicality of our new approach by validating our new algorithms on synthetic data and demonstrations constructed from real-world datasets, where our estimators significantly outperform existing ones.
BibTeX
@inproceedings{song2026inverse,
  author = {Ziqing Song and Lin F. Yang and Ruosong Wang},
  title = {{Inverse Linear Bandits via Linear Programs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=tSF5baGOM3},
}
Figure