Sketching Language Models for Context Attribution
TL;DR - This paper introduces a sketching algorithm that estimates all leave-one-out prompt-token attributions with far fewer language-model evaluations than the naive (n)-call approach. It also proves a matching oracle-model lower bound.
- Requires (O(\sqrt{\log(1/\varepsilon)}/\varepsilon)) evaluation calls under a stability assumption.
- Applies forward differentiation to the backpropagation circuit, reducing sketch variance.
- Improves over a direct adaptation requiring (\widetilde{O}(\log(n)/\varepsilon^2)) calls.
- Experiments show stability-consistent coefficient decay and evaluate the method on a small retrieval task.