When GrantaGate blew up — the short story that readers flagged as written by an AI — one urgent question became clear: when a model writes, where do its words come from? Are they new, or are they repeating language the model already saw during training?
What is infini-gram and what it allows you to do
infini-gram is a search engine at scale developed by Ai2 that indexes huge text collections and counts how many times a phrase of any length appears in those corpora. Instead of stopping at whether a passage is likely machine-generated, infini-gram lets you point to where and how often snippets of the text appear in public sources.
What is that useful for in practice? To turn a detector score into textual evidence. If a detector tells you "this seems synthetic," infini-gram can show you the phrase fragments that also appear in books, blogs, or sites the model may have been trained on.
Technical methodology used by Chakrabarty's team
Tuhin Chakrabarty and his team crossed several resources: the infini-gram index, a web snapshot that the index includes, and Google Books. They searched for rare multi-word expressions and defined technical criteria to separate them from common everyday phrases.
- An expression was considered rare if it appears in no more than five Google Books volumes and does not appear in the
infini-gramweb snapshot. - With that they isolated phrases more associated with published books than with language widely distributed on the web.
The idea: if a text flagged as AI-generated contains many of those rare expressions — spread across the book — that acts as circumstantial evidence the model is rescuing language specific to books.
Concrete example
The team ran the scandal story (GrantaGate) through infini-gram. Distinctive fragments, like "sour tang of fermenting", showed up in other indexed places, for example on a fan-fiction site. It's not conclusive proof of literal copying, but it is a clear signal the text shares very specific wording with other sources.
Key quantitative results
The study compared self-published Amazon books and bestsellers with and without high AI-detection scores, and a reference set of prize-winning literature:
- Among the top 100 high-earning books with text detected as AI, rare expressions covered 43.2% of the text; among the top 100 without AI detection they covered 37.6%.
- Expanding to the top 200 reduces the difference to 4.4 percentage points in favor of books with AI-detected text.
- Compared to the prize-winning literature set, rare expressions covered on average 19.1% of the text, versus 37.2% (top sellers without AI) and 41.6% (top sellers with AI). Here the gap with prize-winning literature reaches 22.5 points.
Those numbers suggest that, at least in that subset of self-published bestsellers, books with higher AI detection tend to lean more on distinctive phrases already present in prior books.
What this tells us about detection and attribution
"Attribution is a very hard problem in machine learning, especially with LLMs," says Chakrabarty.
A detector returns a probability; it doesn't point to matching passages or their origin. infini-gram adds a layer of textual evidence: it shows phrase-by-phrase matches and their frequency in public corpora. But there are important limits:
- Finding a rare phrase in other texts is circumstantial evidence, not legal proof of direct copying.
- Models tend to avoid repeating long passages verbatim after training, but they can reuse short fragments learned during pretraining.
- Corpus coverage matters: if the origin isn't indexed,
infini-gramwon't find it.
Technically, this means infini-gram helps turn an abstract score into actionable evidence for academic investigation and for probing possible reproductions derived from training.
Practical applications and rights concerns
- Copyright research: the team is already experimenting with tracing which web pages contain snippets of copyrighted books to see if a model might have been trained on pirated copies or leaked manuscripts.
- Editorial verification: editors and platforms can use these tools to inspect whether self-published texts reuse distinctive language from earlier books.
- Model transparency: open projects like
OlmoTraceand theinfini-gramindex enable reproducibility and auditability, which are essential when attribution and rights are at stake.
Why it matters that these tools are open
Ai2 pairs infini-gram with open resources like the training of Olmo and datasets such as Dolma. Openness lets researchers replicate analyses, debate methodology, and push ethical and legal boundaries with data in plain sight.
If AI is going to write in our culture, we need public tools that let us understand what it repeats and what it adds.
In the end, infini-gram doesn't name culprits; it builds leads. And in a field where detector scores were the most concrete thing we had, moving from a number to traceable fragments changes the conversation about originality, attribution, and responsibility.
