LECAT: Measuring LLM Category Learning from Pretraining Data

Jimin Mun, Maarten Sap, Yanai ElazararXiv 2026 · arXiv

TL;DR

LECAT is a new framework designed to measure how Large Language Models (LLMs) learn category knowledge (e.g., "airplanes are fast") and whether they can apply it flexibly across different contexts. The research reveals a striking "verbatim trap": while repeating rules in training data helps models memorize facts, it actually hinders their ability to handle exceptions and context-dependent nuances—a challenge that persists even as models scale up.

What Problem Does This Paper Address?

Humans don't just memorize facts; we learn categories that allow for broad, flexible inference. We know that "airplanes are fast," and we naturally extend this to "red airplanes." Crucially, we also know when the rule doesn't apply, such as with "broken airplanes."

While we know LLMs pick up factual knowledge during pretraining, we don't fully understand the mechanics of their category learning. How does the composition of pretraining data—whether it's a dry repetition of rules or a rich tapestry of examples and exceptions—shape a model's ability to generalize? The authors address this gap by investigating how different "knowledge expressions" in data affect memorization, generalization, and contextual flexibility.

Methods

The authors introduce LECAT (Learning of Category knowledge), a two-part framework:

  1. LECAT-Output (Evaluation): Uses a log-probability gap metric to measure model confidence in a feature (e.g., "fast") given a category (e.g., "airplane") and various contextual cues. It tests three behaviors:
  2. Memorization: Can the model complete the basic association?
  3. Generalization: Does the knowledge hold under irrelevant changes (invariant context) but drop under contradictions (erroneous context)?
  4. Contextual Flexibility: Does the model increase confidence when the context strengthens the association and decrease it when the context weakens it?
  5. LECAT-Data (Analysis): A classification system for training data that identifies five types of knowledge expression: verbatim repetition, instantiations (examples), exceptions, strengthening contexts, and weakening contexts.

The team applied this framework to open-source models (Pythia and OLMo 3) and conducted controlled pretraining from scratch on a 68M parameter model using synthetic data to isolate the causal effects of each data type.

Datasets

  • Evaluation Pairs: 199 curated category-feature pairs, including human-generated object properties (McRae et al.), nationality stereotypes (SeeGULL), and gender stereotypes (GEST), alongside model-generated pairs.
  • Pretraining Corpora: The authors analyzed The Pile (used for Pythia) and Dolma 3 (used for OLMo 3).
  • TinyStories (Modified): For controlled experiments, they adapted the TinyStories dataset, injecting fictional category-feature relations (e.g., "valins are poor," "pezzdens are fast") expressed through the five different data types.

Key Insights and Ideas

  • The Verbatim Trap: Verbatim statements (e.g., "A skyscraper is a tall building") are excellent for memorization but detrimental to flexibility. Models trained heavily on these "rules" struggle to adjust their confidence when faced with weakening contexts or exceptions.
  • Scale vs. Flexibility: Surprisingly, as models get larger, they become less sensitive to strengthening contexts. They memorize the "base" rule so strongly that adding a reason for the feature to be even more likely (e.g., "an airplane with a new engine") doesn't further increase their confidence.
  • Diversity is Robustness: The most robust category learning comes from a mixture of diverse expressions. Seeing a category in various contexts—including exceptions—leads to better overall performance than simple high-frequency exposure to a single rule.
  • PMI Sensitivity: Larger models appear to rely more on document-level Pointwise Mutual Information (PMI). The statistical co-occurrence of categories and features in the training data correlates more strongly with performance in 1B+ parameter models than in smaller ones.

Key Results

  • Generalization Improves with Scale: The "base-invariant" pass rate (the ability to ignore irrelevant adjectives) rose from 71.4% for Pythia-14M to 95.5% for Pythia-2.8B.
  • Flexibility Degrades with Scale: The "strengthening > base" pass rate fell from 81.9% in the smallest models to near chance (~50%) in the largest models, suggesting over-memorization of generic rules. This trend is visible in Figure 1.
Pass rate by model size showing the divergence between generalization and flexibility
  • Controlled Training Wins: In the synthetic experiments, the "All Mixture" ($D_{all}$) setting achieved the highest overall pass rate (0.51). In contrast, the verbatim repetition setting ($D_{repetition}$) had high memorization but failed miserably at contextual flexibility (scoring only 0.03 on the Strengthening > Base constraint).
Table showing pass rates for different training settings

Limitations and Future Work

  • Model Size: Due to compute limits, the controlled causal experiments were restricted to a 68M parameter model. Future work should explore if these findings hold for larger-scale controlled runs.
  • Data Complexity: While the five expression types cover significant ground, real-world data contains even more complex linguistic structures (e.g., metaphors, analogies) that LECAT does not yet capture.
  • Stereotype Mitigation: The authors note that while learning categories is essential, the same mechanisms lead to the acquisition of harmful stereotypes. Future research could use LECAT to develop data curation strategies that promote flexible category use while specifically "unlearning" biased associations.

Summary updated

Abstract

Humans know that airplanes are fast, that this extends to red airplanes, but that it does not hold for broken airplanes. How do LLMs acquire category knowledge that humans learn and apply effortlessly? We introduce LeCat, a two-part framework to analyze LLM's Learning of Category knowledge. First, we use LeCat to evaluate models on their ability to learn category knowledge, distinguishing between three cases: memorization of in-domain category knowledge, generalization to unseen instances, and ability to flexibly use knowledge in appropriate contexts. Then, we use LeCat to trace how this knowledge can be learned in pretraining from text that may encode category knowledge in various ways, such as verbatim repetition or exceptions, which we refer to as forms of "knowledge expression". We first assess open-source pretrained models using 199 curated category-feature pairs and analyze their training data. Our findings suggest that strengthening context and category-feature co-occurrence likelihood (PMI) improve learning for larger models and verbatim rule-like statements diminish flexible category learning. To systematically isolate these effects, we then train a 68M model from scratch with precise control over the categorical information each sees in their training data, confirming that verbatim repetition reduces flexible learning but mixture of diverse knowledge expressions lead to more robust category learning. Together, our findings highlight that while contextual flexibility is persistently difficult for models, how category knowledge is expressed in pretraining greatly impacts models' acquisition of robust category knowledge.
BibTeX
@misc{mun2026lecat,
  author = {Jimin Mun and Maarten Sap and Yanai Elazar},
  title = {{LECAT: Measuring LLM Category Learning from Pretraining Data}},
  year = {2026},
  eprint = {2611.18419},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18419},
}
Figure