TL;DR
- In ICL, the prompt is a choice. Which demonstrations you pick, how many, and in what order all move the prediction, even when the task stays the same.
- Ling et al. split total uncertainty into an aleatoric term (from demonstration choice) and an epistemic term (what’s left once the demo set is fixed), estimated purely by resampling prompts.
- The split beats plain entropy at tracking correctness, but it only sees the model from the outside and costs many forward passes per query.
A third source of randomness
Predictive entropy, ensembling, MC dropout: the standard uncertainty toolkit for LLMs assumes randomness lives in two places. One is the model’s parameters. The other is noise in generation.
In-context learning quietly adds a third. The demonstrations in the prompt are picked. Swap which ones, change how many, reorder them, and the prediction can shift on a task that hasn’t changed at all.
That wobble isn’t the model being unsure. It’s the prompt construction doing something, and a single-prompt entropy score can’t tell the two apart.
Splitting the blame
Ling et al. decompose an ICL prediction’s total uncertainty into two parts. The aleatoric part comes from randomness in which demonstrations were chosen. The epistemic part is whatever uncertainty remains once that choice is held fixed.
It’s the same law-of-total-variance move Kendall and Gal made for vision:
\[\text{Var}[\text{total}] = \underbrace{\text{Var}[\text{demonstration-set choice}]}_{\text{aleatoric}} + \underbrace{\mathbb{E}\big[\text{residual variance} \mid \text{fixed demo set}\big]}_{\text{epistemic}}\]The twist is that ICL has no training step, so there are no posterior samples to draw and no gradients to lean on. The estimator has to work entirely through the prompt:
- Resample demonstration sets. Draw many sets from the task’s labeled pool.
- Run the model on each prompt. One forward pass per resampled demonstration set.
- Measure spread across sets. How much the outputs move between prompts becomes the aleatoric term.
- Measure entropy within each prompt. Predictive entropy under a fixed prompt stands in for the epistemic term.
No gradients, no internals. Every quantity comes from what the model outputs under a perturbed prompt, so the method works on any black-box LLM.
What the split buys you
Across multiple LLMs and classification/QA benchmarks, the decomposed estimate lines up with actual correctness and calibration better than undecomposed baselines like plain entropy on a single fixed prompt.
The aleatoric term also does what it promises. For a fixed model and task, it tracks how much accuracy moves when you swap the demonstration set. A real share of what looks like “the model is uncertain” turns out to be “the prompt happened to be built this way.”
Some of what we call model uncertainty in ICL is really prompt uncertainty, and now it has its own term.
Outside in vs. inside out
The catch is in how the estimate is built. Uncertainty is only ever seen indirectly, through how much the final answer wobbles under perturbation. A reliable estimate takes many forward passes for every query.
This paper
Watch the output wobble
- Access: black-box, outputs only
- Cost: many forward passes per query
- Measures: output movement under prompt perturbation
Reading internals
Look at the task representation
- Access: white-box, activations
- Cost: can be closer to one pass
- Measures: the task representation itself
For me, this is the closest prior work to what we ended up building. Reading it carefully is what made the next step feel inevitable.
If function vectors give a fairly direct handle on how the model internally reads the task, can the aleatoric/epistemic split come from there? That would replace watching the output wobble across a hundred resampled prompts with reading the model’s own task representation.
Key takeaways
- ICL adds a new uncertainty source: the choice of demonstrations.
- Ling et al. separate it as an aleatoric term, leaving an epistemic term for a fixed demo set, via the law of total variance.
- The estimator is gradient-free and black-box: resample prompts, measure spread across them and entropy within them.
- It tracks correctness better than plain entropy, but costs many forward passes and never looks inside the model.