← Latest papers
🤖 machine learning

Bergson: An Open Source Library for Data Attribution

Bergson is an open-source library developed by EleutherAI that scales data attribution techniques to large language models and pre-training datasets by natively supporting on-disk gradient storage, multi-node distributed training, and providing the first open-source implementations of the MAGIC, SOURCE, and TrackStar methods.

Original authors: Lucia Quirke, Louis Jaburi, David Johnston, William Z. Li, Gonçalo Paulo, Guillaume Martres, Girish Gupta, Stella Biderman, Nora Belrose

Published 2026-06-11
📖 5 min read🧠 Deep dive

Original authors: Lucia Quirke, Louis Jaburi, David Johnston, William Z. Li, Gonçalo Paulo, Guillaume Martres, Girish Gupta, Stella Biderman, Nora Belrose

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 have built a giant, incredibly smart robot chef. This chef has learned to cook by reading millions of cookbooks (the training data). Sometimes, the chef makes a dish that tastes terrible, or perhaps it learns a weird trick it shouldn't know. You want to know: "Which specific page in which specific cookbook caused this?"

This is the problem of Data Attribution. It's like trying to trace a specific flavor in a soup back to the exact pinch of salt added three hours ago.

The paper introduces Bergson, a new open-source "kitchen toolkit" designed to help researchers solve this tracing problem for giant AI models. Here is how it works, using simple analogies:

1. The Problem: The "Black Box" Kitchen

Usually, when an AI learns, it's a black box. You put data in, and a model comes out. If the model does something weird, you can't easily tell why.

  • The Challenge: Modern AI models are so huge (like a library with billions of books) and the training process is so complex that figuring out which "book" caused a specific behavior is incredibly hard. It used to require so much computer memory that it was impossible to do for big models. Also, many of the best tools to do this were locked behind closed doors (not open-source).

2. The Solution: The Bergson Toolkit

Bergson is a library (a collection of software tools) that acts like a super-powered detective kit for AI. It lets researchers "rewind" the AI's training to see which data points had the biggest impact.

Think of it as a Time-Travel Camera for the training process. It offers three main ways to look back in time:

  • The "Perfect Replay" (MAGIC): Imagine you could record every single second of the chef's training. Then, you could hit "rewind" and play it back exactly, step-by-step, to see exactly what happened. This is the most accurate method, but it requires a lot of storage space. Bergson makes this possible even for huge models by using a clever trick: it only saves "snapshots" (checkpoints) at specific moments and fills in the gaps mathematically, saving space while keeping the picture clear.
  • The "Snapshot Approximation" (SOURCE): Sometimes, you can't record every second. Instead, you take a photo every hour. You assume the chef didn't change much between photos. This is faster and uses less memory, but it's a bit less precise. Bergson includes this method too.
  • The "Fingerprint Scanner" (TrackStar & Influence Functions): Instead of rewinding the whole movie, this method looks at the "fingerprint" left on the model's brain at the very end. It asks, "If I remove this specific ingredient, how much does the final dish change?" It's very fast and works well for huge datasets, though it's an estimate rather than a perfect replay.

3. Key Features of the Toolkit

The paper highlights several "quality of life" features that make this toolkit easy to use:

  • The "Disk Drive" Trick: Instead of trying to hold all the data in the computer's tiny, fast memory (RAM), Bergson stores the "fingerprints" on the hard drive. This means you can analyze massive models without crashing your computer.
  • The "Search Engine" (FAISS): When you ask, "Which data caused this error?", Bergson doesn't check every single book one by one. It uses a super-fast search engine (like Google for data) to instantly find the top 10 most likely culprits.
  • The "Adapter" Shortcut: Sometimes, you don't need to retrain the whole chef; you just need to tweak a small part of the recipe. Bergson supports "LoRA" (Low-Rank Adaptation), which lets you trace the impact of just a small add-on to the model, making the process much cheaper and faster.
  • The "Judge" Feature: What if you want to know why the chef is being rude? You can't measure "rudeness" with a simple math formula. Bergson allows you to use a second AI (a "Judge") to rate the chef's behavior, and then traces that rating back to the training data.

4. What They Actually Tested (The Case Studies)

The authors didn't just build the tool; they used it to solve three specific puzzles:

  1. The "Biosecurity" Puzzle: They wanted to find the specific words in the training data that taught the AI dangerous biological knowledge (like how to make a virus). They used Bergson to highlight specific words. When they re-trained the AI but ignored those specific words, the AI became much safer.
  2. The "Rude Robot" Puzzle: They used the "Judge" feature to find data that made the AI generate misaligned or weird behavior. By filtering out that data, they made the AI behave better.
  3. The "Style" Puzzle: They wanted to know if the AI learned facts (like "Alice works at Fermilab") separately from the style it used to say it (like Shakespearean English vs. Legal jargon). They found that Bergson could successfully ignore the style and find the specific training data that taught the fact, proving the tool can separate "what" was learned from "how" it was said.

5. The Bottom Line

The paper claims that Bergson is the first open-source library that can handle these "time-travel" tracing tasks for the largest AI models currently in existence. It combines the most accurate methods (perfect replays) with the fastest methods (fingerprint scanning) and gives researchers the tools to debug, understand, and curate the data that makes AI smart.

In short: Bergson turns the mystery of "Why did the AI do that?" into a solvable detective story.

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 →