Abstract
Large Language Models (LLMs) often memorize training data verbatim, raising significant legal and privacy concerns. This paper introduces the Adversarial Compression Ratio (ACR), a metric that defines memorization as the ability to elicit long training sequences from significantly shorter prompts. Using the MiniPrompt optimization algorithm, the authors demonstrate that current "unlearning" techniques often create only an "illusion of compliance," leaving the underlying data retrievable through adversarial means.
The Challenge of Defining Memorization
As LLMs ingest the entire public internet, the line between "learning concepts" and "verbatim memorization" has become a legal and technical battlefield. Existing definitions of memorization are often flawed:
- Discoverable Memorization: Prompting with the first half of a sentence is too easy to evade. A simple system prompt saying "don't repeat training data" makes a model appear to have forgotten the string, even if the information remains in its weights.
- Extractable Memorization: Finding any prompt that works is too restrictive. If the prompt is the string itself, every model "memorizes" everything.
- Counterfactual Memorization: Comparing models trained with vs. without a specific datum is computationally impossible for giant models.
To address these gaps, the authors propose a metric that is adversarial (hard to fool), intuitive (based on compression), and practical (doesn't require retraining).
Adversarial Compression and the ACR Metric
The core idea is Adversarial Compression. If an LLM can generate a 100-token sequence from a 5-token prompt, it has effectively "compressed" that information into its weights. The ACR Metric is defined as the ratio of the output length to the length of the shortest possible prompt that elicits that exact output.
Since finding the absolute shortest prompt is an NP-hard search problem, the authors developed the MiniPrompt Algorithm. This uses Greedy Coordinate Gradient (GCG)—an optimization technique typically used for jailbreaking—to find short, adversarial prompts. If the ACR is high (the prompt is much shorter than the output), the string is considered memorized. If the model can only produce the string when given a prompt nearly as long as the string itself, it likely hasn't memorized it.
Experimental Setup
The researchers evaluated their metric across several categories to validate its robustness:
- Famous Quotes: 100 highly-repeated strings (e.g., Shakespeare) likely to be memorized.
- Wikipedia: Random sentences from the training set.
- Associated Press (Nov 2023): News articles published after the models were trained, serving as a "never-seen" control group.
- TOFU & Harry Potter: Datasets used to test "unlearning" (forgetting specific authors or fictional worlds).
Key Insights: The Illusion of Unlearning
The most striking finding is that popular "unlearning" methods (like gradient ascent or in-context instructions) often fail to actually remove data. Instead, they create an "illusion of compliance" where the model refuses standard requests but still harbors the data in its weights.
As shown in the figure above, even as standard "Completion" performance drops to zero across unlearning steps, the "Compression" metric (ACR) remains high. MiniPrompt can find nonsense-looking 2-token prompts that force the model to spit out forbidden quotes or private information it was instructed to forget.
Key Results and Scaling
- Validation: For Pythia-1.4B, the average ACR for Famous Quotes was 1.17 (with 47% of quotes being "compressible"), while the ACR for post-training news was 0.00. This proves LLMs specifically compress data they were exposed to during training.
- Memorization Scales with Size: Consistent with prior work, larger models (tested on the Pythia family up to 12B parameters) show higher ACRs and memorize a larger portion of their training sets.
- Harry Potter Case Study: After applying an unlearning technique designed to make Llama-2 "forget" Harry Potter, the authors could still elicit the target text. In fact, 50% of the Harry Potter content remained compressible even after the unlearning process.
Conclusion and Limitations
While ACR provides a robust new lens for studying memorization, it is computationally intensive. Running GCG optimization for MiniPrompt can take hours of GPU time for larger models. Furthermore, while the authors used a threshold of 1 for simplicity (any prompt shorter than the output), defining the exact legal or technical threshold for "harmful" compression remains an open question for future debate and policy.
Summary updated