Abstract: Fact tracing seeks to identify specific training examples that serve as the knowledge source for a given query. Existing approaches to fact tracing rely on assessing the similarity between each training sample and the query along a certain dimension, such as lexical similarity, gradient, or embedding space. However, these methods fall short of effectively distinguishing between samples that are merely relevant and those that actually provide supportive evidence for the information sought by the query. This limitation often results in suboptimal effectiveness. Moreover, these approaches necessitate the examination of the similarity of individual training points for each query, imposing significant computational demands and creating a substantial barrier for practical applications. This paper introduces FASTTRACK, a novel approach that harnesses the capabilities of Large Language Models (LLMs) to validate supportive evidence for queries and at the same time clusters the training database towards a reduced extent for LLMs to trace facts. Our experiments show that FASTTRACK substantially outperforms existing methods in both accuracy and efficiency, achieving more than 100% improvement in F1 score over the state-of-the-art methods while being 33x faster than TracIn.
Introduction
As Large Language Models (LLMs) are increasingly deployed in high-stakes domains like healthcare and finance, the risk of "hallucinations"—generating plausible but factually incorrect information—becomes a critical liability. Fact tracing, or training data attribution (TDA), aims to mitigate this by identifying the specific training samples that led to a model's assertion.
Existing methods generally fall into two categories, both with significant drawbacks:
- Similarity-based (Lexical/Embedding): These methods (e.g., BM25) identify samples that are lexically or semantically similar to the query. However, relevance does not equate to support; a sample can mention the same entities as a query while providing no evidence or even contradicting the fact.
- Gradient-based (e.g., TracIn): These calculate the influence of a training point on the model's loss. While theoretically grounded, they are computationally expensive, slow, and fragile, often failing if training data formatting differs from the query.
FASTTRACK bridges this gap by providing a method that is both computationally tractable for massive datasets and semantically aware enough to distinguish between mere relevance and actual supportiveness.
Methods: The FASTTRACK Pipeline
FASTTRACK introduces a two-stage "coarse-to-fine" pipeline designed to optimize both speed and accuracy.
1. Offline: Semantic Clustering
To avoid the "needle in a haystack" problem of searching millions of documents, the training corpus is first organized into a hierarchical tree using k-means clustering on text embeddings. Unlike standard clustering, FASTTRACK utilizes an LLM to analyze each cluster and assign semantic keywords. This transforms the raw training database into a searchable, indexed structure.
2. Online: LLM as a Tracer
When a query is provided, the system retrieves the most relevant clusters using fuzzy keyword matching. It then employs an LLM (such as GPT-4) to perform a fine-grained binary "supportiveness" check on the samples within those clusters. To ensure efficiency, FASTTRACK uses batch prompting, allowing the LLM to evaluate multiple candidate texts in a single inference run, which significantly reduces API costs and latency.
Experimental Setup
The authors evaluated FASTTRACK on two primary benchmarks:
- FTRACE-TREx: A dataset of 27k queries and 1M masked training examples (cloze-style sentences) designed to test the retrieval of basic factual knowledge.
- VITAMINC: A more challenging dataset built from Wikipedia revisions. It contains contrastive pairs where one context supports a claim and another refutes it, specifically testing the ability to handle conflicting information.
Key Results and Insights
FASTTRACK demonstrates a significant leap in performance over traditional methods. On the VITAMINC dataset, FASTTRACK achieved an F1 score of 0.91, compared to 0.55 for BM25 and 0.48 for embedding-based methods. On FTRACE-TREx, it more than doubled the performance of the best existing baseline.
Beyond accuracy, the computational efficiency is a major highlight. FASTTRACK is 33x faster than TracIn when evaluating 100 queries against a 10k corpus. This efficiency is largely due to the hierarchical indexing and batching strategies. The research also highlights the "fragility" of traditional TDA methods like TracIn, which are highly dependent on specific model checkpoints and phrasing, whereas FASTTRACK's reasoning-based approach is more robust.
Limitations and Future Work
While highly effective, FASTTRACK's accuracy is currently capped by the reasoning capabilities of the underlying "Tracer" LLM. For instance, models may still struggle with complex logical reasoning involving dates or temporal contexts. Additionally, while batching reduces costs, using frontier models like GPT-4 remains more expensive than simple lexical search. Future work may involve fine-tuning smaller, specialized "tracing models" to provide supportiveness-aware logic at a lower cost.
Summary updated