<RETURN_TO_BASE

Meta’s Breakthrough Framework Reveals How Language Models Memorize Data at the Bit Level

Meta and collaborators developed a novel framework to accurately quantify how much language models memorize training data, estimating GPT models store around 3.6 bits per parameter and providing new insights into memorization versus generalization.

The Complexity of Memorization in Language Models

Modern language models, such as those with billions of parameters trained on trillions of tokens, have sparked debate regarding their memorization capabilities. Traditional techniques like data extraction and membership inference struggle to clearly separate memorization from generalization, leaving questions about how much models truly retain from their training data.

Shortcomings of Previous Measurement Methods

Earlier methods often assessed memorization at the dataset level, missing the nuances of instance-specific memorization. Compression-based language modeling and fact memorization studies provided partial insights but lacked scalability and precision, particularly for deep transformer models.

Introducing a New Method to Measure Model Memorization

A collaborative research effort by Meta FAIR, Google DeepMind, Cornell University, and NVIDIA introduced a novel framework to quantify how much information models retain about specific data points. They distinguish between unintended memorization—the information a model holds about the training data—and generalization, which reflects learning about the underlying data distribution. By isolating memorization, they estimated that GPT-family models store approximately 3.6 bits of information per parameter. Additionally, they formulated scaling laws linking model capacity, data size, and membership inference effectiveness by training hundreds of transformer models.

Experimental Setup and Training Details

The researchers trained hundreds of GPT-2 based models varying from 100K to 20M parameters, with depths between 1 and 8 layers and hidden sizes from 32 to 512. Training involved one million steps with batch sizes of 2048 using bfloat16 precision on a single NVIDIA A100 GPU. Models were trained on synthetic sequences and deduplicated 64-token sequences from the FineWeb dataset to minimize generalization effects.

Key Insights on Model Capacity

  • Models consistently stored between 3.5 and 3.6 bits per parameter across configurations.
  • A double descent phenomenon was observed where test loss initially worsened near capacity but improved as generalization kicked in.
  • Higher precision training (float32) marginally increased capacity to about 3.83 bits per parameter compared to bfloat16's 3.51.

Distinguishing Memorization from Generalization

Switching datasets from synthetic to real text revealed that:

  • Unintended memorization at the sample level increased with model size.
  • Memorization decreased as the size of the training dataset grew.
  • Accurate memorization estimates require dataset deduplication and baseline compression rates from an oracle model.

Scaling Laws for Membership Inference

The team modeled the success of loss-based membership inference using the ratio of model capacity to dataset size, finding:

  • Membership inference becomes less reliable as datasets increase in size.
  • Predictive scaling laws remain accurate within 1-2% for models up to 1.5 billion parameters.

Implications for Future Research

This principled approach provides a clear framework to measure memorization versus generalization in language models, enhancing understanding of how transformers encode training data. These insights pave the way for improved model evaluation, privacy safeguards, and interpretability in AI systems.

For full details, refer to the original research paper.

🇷🇺

Сменить язык

Читать эту статью на русском

Переключить на Русский