Data Attribution in Large Language Models via Bidirectional Gradient Optimization

Frédéric Berdoz, Luca A. Lanzendörfer, Kaan Bayraktar, Roger Wattenhofer
6/3/2026
cs.LGcs.CL

No official code found. Best implementation: ETH-DISCO/DABGO (2 stars, MIT, last commit 2026-02-15).

Abstract

Large Language Models (LLMs) are increasingly deployed across diverse applications, raising critical questions for governance, accountability, and data provenance. Understanding which training data most influenced a model's output remains a fundamental open problem. We address this challenge through training data attribution (TDA) for auto-regressive LLMs by expanding upon the inverse formulation: How would training data be affected if the model had seen the generated output during training? Our method perturbs the base model using bidirectional gradient optimization (gradient ascent and descent) on a generated text sample and measures the resulting change in loss across training samples. Our framework supports attribution at arbitrary data granularity, enabling both factual and stylistic attribution. We evaluate our method against baselines on pretrained models with known datasets, and show that it outperforms previous work on influence metrics, thereby enhancing model interpretability, an essential requirement for accountable AI systems.

View on arXivView PDF

Code Implementations(1)

ETH-DISCO/DABGOCommunity70%
MIT

Data Attribution in Large Language Models via Bidirectional Gradient Optimization

21Nov 6, 20258 months agoMIT

Similar Papers

Cite this paper

@article{berdoz2026data,
  title  = {Data Attribution in Large Language Models via Bidirectional Gradient Optimization},
  author = {Frédéric Berdoz and Luca A. Lanzendörfer and Kaan Bayraktar and Roger Wattenhofer},
  year   = {2026},
  eprint = {2606.04928},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.04928v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.04928.svg)](https://codeofpaper.com/paper/2606.04928)

Discussion