Skip to main content
QUICK REVIEW

[Paper Review] Bag of Tricks for Training Data Extraction from Language Models

Weichen Yu, Tianyu Pang|arXiv (Cornell University)|Feb 9, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper introduces a comprehensive set of practical techniques—'bag of tricks'—to significantly improve training data extraction from language models, focusing on enhanced text generation and token-level ranking strategies. Using GPT-Neo 1.3B, the proposed methods achieve up to 46.8% precision, outperforming baselines by a large margin, with key gains from confidence-based scoring and perplexity-aware token selection.

ABSTRACT

With the advance of language models, privacy protection is receiving more attention. Training data extraction is therefore of great importance, as it can serve as a potential tool to assess privacy leakage. However, due to the difficulty of this task, most of the existing methods are proof-of-concept and still not effective enough. In this paper, we investigate and benchmark tricks for improving training data extraction using a publicly available dataset. Because most existing extraction methods use a pipeline of generating-then-ranking, i.e., generating text candidates as potential training data and then ranking them based on specific criteria, our research focuses on the tricks for both text generation (e.g., sampling strategy) and text ranking (e.g., token-level criteria). The experimental results show that several previously overlooked tricks can be crucial to the success of training data extraction. Based on the GPT-Neo 1.3B evaluation results, our proposed tricks outperform the baseline by a large margin in most cases, providing a much stronger baseline for future research. The code is available at https://github.com/weichen-yu/LM-Extraction.

Motivation & Objective

  • To develop and benchmark practical, effective techniques for training data extraction from language models.
  • To address the limited effectiveness of existing extraction methods, especially in targeted, 1-eidetic memorization scenarios.
  • To identify and evaluate overlooked tricks in text generation and ranking that significantly improve extraction success rates.
  • To establish a stronger, empirically validated baseline for future research in model memorization and privacy leakage.

Proposed method

  • Employed a pipeline of text generation followed by ranking, focusing on sampling strategies and token-level criteria for improved extraction.
  • Introduced confidence-based reward mechanisms that penalize low-probability tokens and prioritize high-confidence predictions.
  • Applied perplexity-based scoring to detect and favor 'surprised' tokens—those with high perplexity that deviate from expected patterns.
  • Used cumulative probability (cumprod) as an alternative metric to assess generation likelihood, though with marginal gains.
  • Combined techniques like context windowing, beam search, and auto-tuning to explore performance interactions.
  • Evaluated methods using precision, recall, and Hamming distance on GPT-Neo 1.3B and 2.7B models with controlled ablation studies.

Experimental results

Research questions

  • RQ1How do different sampling strategies and generation configurations affect training data extraction performance?
  • RQ2What role do confidence scores and perplexity-based token selection play in identifying memorized training data?
  • RQ3Can combining multiple extraction tricks lead to consistent performance gains, or do they interfere?
  • RQ4How do model size and architecture (e.g., 1.3B vs. 2.7B) influence the effectiveness of extraction techniques?
  • RQ5What are the most effective ranking criteria—sentence-level or token-level—for identifying memorized suffixes?

Key findings

  • The proposed tricks improved precision to 46.8% on GPT-Neo 1.3B, significantly outperforming baseline methods.
  • Rewarding high-confidence tokens reduced the Hamming distance to ground truth by 17.144, indicating better alignment with target data.
  • Encouraging 'surprised' tokens via perplexity-based filtering led to marginal but measurable improvements in extraction quality.
  • Combining multiple techniques did not always improve performance and sometimes caused incompatibility, indicating non-linear interactions.
  • Larger models (GPT-Neo 2.7B) yielded better results than smaller ones, suggesting scale-dependent memorization effects.
  • The use of cumulative probability (cumprod) had minimal impact and slightly hurt recall, indicating limited utility for this task.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.