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:
- 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:
- Memorization: Can the model complete the basic association?
- Generalization: Does the knowledge hold under irrelevant changes (invariant context) but drop under contradictions (erroneous context)?
- Contextual Flexibility: Does the model increase confidence when the context strengthens the association and decrease it when the context weakens it?
- 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.
- 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).
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