Safety Of LLMs: Training Data Attribution And Efficient Search
Anastasiia Kucherenko (Postdoctoral Researcher · HES-SO Valais-Wallis)
Insomni'hack 2026 · Day 1 · Main Track
Overview
Modern discussions surrounding artificial intelligence and large language models (LLMs) in cybersecurity often focus on agentic behaviors, fine-tuning safeguards, and red-teaming exercises. However, as Dr. Anastasiia Kucherenko argues, evaluating LLM capabilities and risk must begin at the foundational level: the training data. The principle of "trash in, trash out" is magnified exponentially in massive machine learning pipelines, where unverified, copyrighted, or malicious material can be ingested without the knowledge of end-users or even the model developers themselves.

Key moments
- 0:00 Introduction and background on AI safety
- 3:40 The problem of hidden training data in LLMs
- 9:55 Training data search challenges and indexing
- 15:40 Introduction to training data attribution
- 22:15 Perplexity-based attribution and research results
- 34:00 Audience Q&A: Model transparency and unlearning
Safety Of LLMs: Training Data Attribution And Efficient Search
Speakers: Anastasiia Kucherenko (Postdoctoral Researcher, HES-SO Valais-Wallis)
Conference: Insomni'hack
YouTube: https://www.youtube.com/watch?v=oA2ObHFDD-Y
Overview
Modern discussions surrounding artificial intelligence and large language models (LLMs) in cybersecurity often focus on agentic behaviors, fine-tuning safeguards, and red-teaming exercises. However, as Dr. Anastasiia Kucherenko argues, evaluating LLM capabilities and risk must begin at the foundational level: the training data. The principle of "trash in, trash out" is magnified exponentially in massive machine learning pipelines, where unverified, copyrighted, or malicious material can be ingested without the knowledge of end-users or even the model developers themselves.
This talk explores the critical necessity of understanding training data through two primary mechanisms: efficient search over massive token corpora and training data attribution (TDA). Using the open-data Swiss LLM project Apertus as a primary case study, Kucherenko examines the computational bottlenecks involved in managing petabyte-scale training sets and presents novel research into how model perplexity can be leveraged to trace outputs back to their training origins in linear time. Ultimately, this research provides a stepping stone toward explainable AI, enabling defenders and auditors to trace whether an LLM's response stems from credible scientific literature, unverified web noise, or state-sponsored disinformation campaigns.
Background
▶ Watch: Introduction and background on AI safety (0:00)
The transparency of LLM training data remains a glaring exception in modern AI development. While commercial models guard their training pipelines as proprietary competitive advantages—leaving users in the dark regarding potential copyright violations, toxic material, or poisoned inputs—truly open-data models are exceedingly rare. Early academic research models like Pythia and the Allen AI Institute's OlmoTrace provided initial visibility, alongside the recent release of Apertus, a Swiss LLM trained on a massive corpus of 15 trillion tokens (roughly equivalent to 80 football fields of printed books).
Despite these open-data milestones, managing such vast datasets introduces severe operational friction. When the Apertus team received privacy requests to purge specific file names immediately following the model's public launch, they lacked an optimized retrieval mechanism. Relying on raw string searches across the distributed Alps cluster required 32 compute days—a window reduced to four days via eight-way parallelization. This operational delay highlights a structural vulnerability: organizations cannot efficiently cleanse or audit training corpora when rapid compliance or security remediation is required.
Furthermore, the ingestion of unfiltered web data via platforms like Common Crawl exposes models to severe security risks. Threat actors routinely leverage this vulnerability; for instance, state-sponsored campaigns have intentionally injected millions of false news articles into web crawlers to bias LLM outputs toward specific political narratives. Similarly, public web corpora frequently harbor dangerous instructions, such as chemical weapon manufacturing recipes. Without granular training data attribution and search capabilities, defenders cannot verify the provenance of model hallucinations or malicious outputs.
Key Findings
▶ Watch: Training data search challenges and indexing (9:55)
Kucherenko's research, conducted in collaboration with the Cyber Defense Campus of Switzerland and accepted at the ACL conference, yields several counter-intuitive and practically significant findings regarding model memorization and search efficiency:
- Indexing Overcomes Raw Compute Bottlenecks: Implementing Elasticsearch over the Apertus training corpus reduced search times for multi-word queries from days to under a second, making iterative security audits and toxic-language filtering computationally viable.
- Low Perplexity Does Not Equal Memorization: A prevailing hypothesis in machine learning assumed that tokens generated with very high certainty (low perplexity scores, such as probability > 0.9) were directly memorized verbatim from the training data. Kucherenko's experiments demonstrated that more than half of such low-perplexity sequences were not present in the training data at all, disproving the absolute equivalence of low perplexity and memorization.
- Noise and Template Filtering: A subset of low-perplexity matches mapped to tens of thousands of documents across diverse topics. Analysis revealed these were not topic-specific semantic phrases, but rather boilerplate legal disclaimers (e.g., source code license notices) and random alphanumeric strings.
- Meaningful Attribution Yields 15-40% Traceability: Across targeted technical domains (cryptography, genetics, and drugs), approximately 15% to 40% of low-perplexity sequences matched a small, highly relevant subset of training documents, allowing auditors to directly verify the source material behind an LLM's assertion.
Technical Deep Dive
▶ Watch: Introduction to training data attribution (15:40)
The technical core of the research addresses the computational complexity of mapping LLM outputs back to their training roots. Exhaustively comparing every generated token sequence against a multi-trillion-token corpus in an unoptimized manner results in an intractable $O(n^2)$ search explosion.
To bypass this bottleneck, the research leverages a perplexity-guided approximation combined with robust indexing frameworks. When an LLM generates a response, it evaluates each token autoregressively based on probability distributions. By filtering for sequences where tokens exhibit extremely low perplexity (specifically, where token generation probability exceeds 0.9), the system isolates regions of high model certainty without scanning the entire generation history.
For the underlying data retrieval, the lab utilized Elasticsearch and InfiniGram indices deployed on the Alps high-performance computing cluster. While exact-string matching via indexing successfully flags verbatim passages—similar to the functionality demonstrated in OlmoTrace's playground—current architectures remain constrained by exact-matching limitations. Minor lexical alterations, such as substituting synonyms (e.g., "receiver" versus "recipient") or injecting structural articles, break exact string indices, underscoring the urgent need for semantic training data attribution models.
Demo / Proof of Concept
▶ Watch: Perplexity-based attribution and research results (22:15)
The talk did not feature a live terminal demonstration or interactive proof of concept. However, Dr. Kucherenko referenced publicly accessible implementations and research artifacts, including the OlmoTrace playground (hosted by the Allen AI Institute) and the lab's open-source repository published for their ACL conference paper, which utilizes Elasticsearch and InfiniGram to perform perplexity-based sequence attribution on small research models like Pythia.
Defensive Implications
▶ Watch: Audience Q&A: Model transparency and unlearning (34:00)
For security analysts, AI red-teamers, and defenders operating enterprise LLM deployments, these findings reshape how provenance and risk are managed:
- Do Not Trust Commercial Attribution Blindly: Proprietary platforms (such as ChatGPT or Claude) often surface source citations, but their internal attribution mechanisms are opaque. Defenders must treat these UI citations as heuristic rather than cryptographic proof.
- Implement Indexing for Compliance: Organizations maintaining internal or open-weight models must establish indexed corpora (using Elasticsearch or similar search engines) to rapidly execute privacy removal requests (such as GDPR-related file name deletions) and weed out poisoned or illegal training data.
- Establish Source-Checking Protocols: Security teams should incorporate training data attribution tools into incident response workflows. When an LLM produces unexpected or suspicious outputs (such as operational cyber-attack steps or compromised code snippets), tracing the output back to training documents helps differentiate between generalized model hallucination and ingested malicious payloads.
- Prepare for Explainable AI (XAI) Standards: As regulatory bodies increasingly demand transparency regarding how automated models generate specific outputs, adopting approximation-based TDA methods offers a viable bridge toward verifiable and auditable AI systems.
Key Takeaways
- Training data is the foundational vector for estimating LLM capabilities, risks, and safety vulnerabilities ("trash in, trash out").
- Raw corpus searches are computationally prohibitive (e.g., 32 compute days for 15 trillion tokens), but enterprise indexing tools like Elasticsearch reduce search times to sub-second thresholds.
- High model certainty (low perplexity) does not automatically imply training data memorization; over half of high-probability generated sequences do not exist in the training set.
- Perplexity-guided sequence selection enables efficient, linear-time training data attribution, successfully tracing 15% to 40% of domain-specific outputs to verifiable source documents.
- Moving beyond exact string matching to semantic search remains the primary technical frontier required to achieve truly reliable training data attribution.
About the Speaker(s)
- Anastasiia Kucherenko (Postdoctoral Researcher, HES-SO Valais-Wallis): Anastasiia Kucherenko holds a PhD in Computer Science from EPFL, where her research focused on the security and privacy of distributed systems. Her current work focuses on LLM safety, training data attribution, and adversarial robustness in generative AI systems, and she is part of the safety team for Apertus, Switzerland's open-source large language model.