LLMs Plagiarize: Ensuring Responsible Sourcing of Large Language Model Training Data Through Knowledge Graph Comparison
Devam Mondal, Carlo Lipizzi
TL;DR
This work tackles the challenge of determining whether an LLM has been trained on a given source by introducing a knowledge-graph based detector that converts both the source and an LLM-generated continuation into RDF triples to form G_S and G_C. Content similarity is evaluated by embedding and comparing one-edge walks via cosine similarity, excluding the shared first triple, while structural similarity is measured with a relative graph edit distance normGED(G_S,G_C). The approach emphasizes relational structure and higher-order idea flow, offering a transparent alternative to black-box probing and traditional token-based plagiarism checks, with a prototype and examples illustrating both content-driven and nonsensical continuations. The framework aims to improve accountability in training-data sourcing for LLMs and suggests future work to validate thresholds and develop a combined metric that robustly fuses content and structure signals for provenance assessment.
Abstract
In light of recent legal allegations brought by publishers, newspapers, and other creators of copyrighted corpora against large language model developers who use their copyrighted materials for training or fine-tuning purposes, we propose a novel system, a variant of a plagiarism detection system, that assesses whether a knowledge source has been used in the training or fine-tuning of a large language model. Unlike current methods, we utilize an approach that uses Resource Description Framework (RDF) triples to create knowledge graphs from both a source document and an LLM continuation of that document. These graphs are then analyzed with respect to content using cosine similarity and with respect to structure using a normalized version of graph edit distance that shows the degree of isomorphism. Unlike traditional plagiarism systems that focus on content matching and keyword identification between a source and a target corpus, our approach enables a broader and more accurate evaluation of similarity between a source document and LLM continuation by focusing on relationships between ideas and their organization with regards to others. Additionally, our approach does not require access to LLM metrics like perplexity that may be unavailable in closed large language model "black-box" systems, as well as the training corpus. We thus assess whether an LLM has "plagiarized" a corpus in its continuation through similarity measures. A prototype of our system will be found on a hyperlinked GitHub repository.
