A Little Leak Will Sink a Great Ship: Survey of Transparency for Large Language Models from Start to Finish

Masahiro Kaneko, Timothy BaldwinarXiv 2024

Abstract

Large Language Models (LLMs) are trained on massive web-crawled corpora. This poses risks of leakage, including personal information, copyrighted texts, and benchmark datasets. Such leakage leads to undermining human trust in AI due to potential unauthorized generation of content or overestimation of performance. We establish the following three criteria concerning the leakage issues: (1) leakage rate: the proportion of leaked data in training data, (2) output rate: the ease of generating leaked data, and (3) detection rate: the detection performance of leaked versus non-leaked data. Despite the leakage rate being the origin of data leakage issues, it is not understood how it affects the output rate and detection rate. In this paper, we conduct an experimental survey to elucidate the relationship between the leakage rate and both the output rate and detection rate for personal information, copyrighted texts, and benchmark data. Additionally, we propose a self-detection approach that uses few-shot learning in which LLMs detect whether instances are present or absent in their training data, in contrast to previous methods that do not employ explicit learning. To explore the ease of generating leaked information, we create a dataset of prompts designed to elicit personal information, copyrighted text, and benchmarks from LLMs. Our experiments reveal that LLMs produce leaked information in most cases despite less such data in their training set. This indicates even small amounts of leaked data can greatly affect outputs. Our self-detection method showed superior performance compared to existing detection methods.

Introduction

As Large Language Models (LLMs) become increasingly integrated into daily life, the transparency of their training data has become a critical concern. These models are often trained on vast, opaque datasets crawled from the web, leading to a "black box" problem. This lack of transparency creates significant risks, specifically the leakage and subsequent regurgitation of Personally Identifiable Information (PII), copyrighted works, and the very benchmarks used to evaluate model performance.

This study formalizes the problem by analyzing the relationship between three critical factors: the Leakage Rate (prevalence in training data), the Output Rate (ease of generation), and the Detection Rate (ability to identify training data). By quantifying these relationships across 25 different models, we aim to provide a clearer picture of how training data contamination impacts model behavior.

Methodology

Our research framework evaluates leakage across three categories: Personal Information (PI), Copyrighted Text (CT), and Benchmarks (BM).

  1. Quantifying Leakage: We sampled 5 million instances from the pre-training corpora of six major LLM families. PII was identified using regular expressions and Named Entity Recognition (NER), while copyrighted content was verified via automated web searches of Google Books, News, and Scholar.
  2. Measuring Output: We developed a dataset of prompts designed to elicit leaked information. The output rate was determined by comparing the model's likelihood of generating leaked text against a standard refusal response.
  3. Novel Self-Detection: We propose a "Self-Detection" method that leverages the model's internal knowledge. Unlike traditional statistical methods that rely on loss or perplexity thresholds, our approach uses few-shot learning to ask the model directly: "Is this text in your training data?"

Results

Leakage Prevalence

Our analysis of the sampled training data revealed significant disparities in leakage across categories. While PII is highly prevalent, benchmark data is comparatively rare, yet still present.

Leakage rates for PI, CT, and BM across LLM families.

On average, the sampled training data contained 75.1% PII, 19.0% copyrighted text, and a mere 0.1% benchmark data. Despite these varying rates, the impact on model output is surprisingly uniform.

The Output Rate Paradox

A key finding of this study is the "Drop in the Ocean" effect: the Output Rate remains high even when the Leakage Rate is extremely low. Across almost all models, the output rate for leaked data hovered around 54-55%, regardless of whether the leakage rate was high (PII) or low (Benchmarks). This suggests that LLMs are incredibly efficient at memorizing and reproducing even rare occurrences in their training sets.

Self-Detection Performance

Our proposed self-detection method consistently outperformed established statistical baselines such as LOSS, PPL/zlib, and Min-K%.

Comparison of detection methods across different leakage categories.

As shown in the figure above, Self-Detection achieved higher accuracy across all categories. Interestingly, while output rates are independent of leakage volume, detection rates are not; models are generally better at identifying leaked PII (high leakage rate) than leaked benchmarks (low leakage rate). This implies that higher exposure during training provides more "features" for the model to recognize a string as part of its training history.

Discussion and Conclusion

Our findings highlight a significant challenge for AI safety and transparency: even minimal data contamination can lead to substantial unauthorized generation. We also observed that instruction tuning acts as a "band-aid"; while it may lower the output rate by teaching the model not to respond to certain prompts, the leaked information remains embedded in the model's weights and can still be detected.

Future work should explore more advanced prompting techniques, such as Chain-of-Thought, to further improve self-detection accuracy. Additionally, expanding the scope of leakage types to include proprietary code or private logs will be essential for a comprehensive understanding of LLM transparency.

Summary updated

BibTeX
@misc{kaneko2024little,
  author = {Masahiro Kaneko and Timothy Baldwin},
  title = {{A Little Leak Will Sink a Great Ship: Survey of Transparency for Large Language Models from Start to Finish}},
  year = {2024},
  eprint = {2403.16139},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.16139},
}
Figure