AI
New system scales plagiarism detection for billion-snippet AI code training datasets
Researchers propose a hybrid vector-search-plus-fingerprinting approach to efficiently track whether LLMs reproduce training code verbatim.
Large language models trained on vast code repositories can inadvertently reproduce snippets from their training data without attribution, creating legal and ethical friction around copyright and license compliance. Finding exact or near-identical matches in billion-scale code corpora has remained a challenge: traditional plagiarism detectors like Winnowing work well but require comparing each query against the entire training set, a computationally expensive process at scale.
The approach#
Researchers have introduced SourceTracker, a 300-million-parameter neural encoder built to retrieve semantically similar code passages, paired with HybridSourceTracker (HST), a two-stage pipeline that combines the strengths of both modern and classical techniques. The system first uses vector search to quickly narrow down a small pool of candidate matches, then applies Winnowing—a classical fingerprint-based method—to re-rank those candidates with high precision on exact matches.
Testing and results#
The team trained and evaluated their approach on a 10-million-snippet subset of TheStackV2, testing both exact reproductions and realistic variations where function arguments and variable names were renamed. On a 100,000-snippet search space with adapted queries, the hybrid method matched Winnowing's accuracy for short 30-token fragments while achieving up to 5.4% higher performance on longer passages (60+ tokens). Critically, the system maintains logarithmic-time query complexity—making it practical for billion-scale datasets where classical fingerprinting alone becomes prohibitively slow.
An auxiliary evaluation using an LLM-based judge found that many retrieved results ranked outside the ground truth were still substantially similar to their source snippets, suggesting the tool surfaces genuinely useful attribution candidates even when exact matches elude detection.
Why it matters#
As LLMs become embedded in developer toolchains, mechanisms to transparently track and credit training sources become more important for legal compliance and community trust. The work demonstrates that marrying vector embeddings with fingerprint verification can achieve both speed and precision, provided training corpora remain accessible for inspection.

