← Latest papers
💻 computer science

Context Attribution with Multi-Armed Bandit Optimization

This paper proposes a novel framework for context attribution in retrieval-augmented generation that formulates the problem as a combinatorial multi-armed bandit task, utilizing Linear Thompson Sampling to efficiently identify influential context segments with up to 30% fewer model queries while matching or exceeding the attribution quality of existing methods.

Original authors: Deng Pan, Keerthiram Murugesan, Ting Hua, Nuno Moniz, Nitesh Chawla

Published 2026-04-23
📖 4 min read☕ Coffee break read

Original authors: Deng Pan, Keerthiram Murugesan, Ting Hua, Nuno Moniz, Nitesh Chawla

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery. You have a massive file cabinet filled with thousands of documents (the context), and a very smart but sometimes confused assistant (the AI) who writes a report based on those files.

Your job is to figure out: Which specific pages in that file cabinet actually helped the assistant write the report?

This is the problem of Context Attribution. If the assistant makes a mistake, you need to know if it was because of a specific bad page, or if it just made things up out of thin air.

The Old Way: The "Shotgun" Approach

Traditionally, researchers tried to solve this by playing a game of "What If?"

  • "What if I remove page 1? Does the report change?"
  • "What if I remove page 2? Does the report change?"
  • "What if I remove page 3?"

To get a good answer, they had to test almost every possible combination of pages. If you have 100 pages, there are billions of combinations. This is like trying to find a needle in a haystack by pulling out every single piece of hay one by one. It takes forever, costs a lot of money (because asking the AI to rewrite the report is expensive), and is often impossible for long documents.

The New Way: CAMAB (The "Smart Detective")

The paper introduces a new method called CAMAB. Instead of randomly testing pages, it treats the problem like a Slot Machine (or a "Multi-Armed Bandit").

Here is how it works, using a simple analogy:

1. The Slot Machine Analogy

Imagine you are in a casino with 100 slot machines (each machine represents a page of text). You only have a limited number of coins (a budget) to play.

  • The Goal: Find the machines that pay out the most (the pages that are most important to the AI's answer).
  • The Problem: You can't play every machine. You have to be smart.

2. The "Smart Detective" Strategy (Thompson Sampling)

CAMAB uses a clever strategy called Linear Thompson Sampling. Think of it as a detective who learns as they go:

  • Round 1: The detective picks a random group of pages to test.
  • Round 2: Based on the results, the detective thinks, "Hmm, pages 5 and 12 seemed really helpful. Let's try them again, but maybe mix in page 3 to see if it helps too."
  • Round 3: The detective stops wasting time on pages that clearly didn't matter and focuses heavily on the ones that seem to be the "winners."

Instead of testing everything, CAMAB learns which pages are important very quickly and stops wasting time on the useless ones.

Why is this a big deal?

  1. It's Fast and Cheap: Because it stops testing useless pages early, it uses up to 30% fewer questions (queries) to get the same answer. In the real world, asking an AI a question costs money and time. Saving 30% is huge.
  2. It Works with "Black Box" AI: You don't need to see the AI's internal brain (which is often hidden). You just need to see the final answer and how confident the AI is in its words.
  3. It Finds the "Teamwork": Sometimes, two pages only make sense when read together. CAMAB is smart enough to notice that "Page A and Page B work well together" even if they don't look important on their own.

The Result

The researchers tested this on three different types of tasks (answering trivia, summarizing news, and finding facts in different languages).

  • The Result: CAMAB found the important pages just as well as the old, slow methods, but it did it much faster and with fewer tries.
  • The Analogy: If the old method was like reading every book in a library to find the one quote you need, CAMAB is like having a librarian who knows exactly which shelf to go to, grabs the right book, and hands it to you in seconds.

In a Nutshell

CAMAB is a smart, efficient way to figure out what an AI is actually reading. It stops the AI from wasting time guessing and helps us trust its answers by pinpointing exactly which facts it used to build its story. It's the difference between guessing in the dark and using a flashlight that gets brighter the more you look.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →