Rote Learning Considered Useful: Generalizing over Memorized Data in LLMs

Qinyuan Wu, Soumi Das, Mahsa Amani, Bishwamittra Ghosh, Mohammad Aflah Khan, Krishna P. Gummadi, Muhammad Bilal Zafar

TL;DR

Conventional wisdom dictates that rote memorization in Large Language Models (LLMs) is a barrier to true generalization, but this paper flips that assumption on its head. By introducing a two-phase "memorize-then-generalize" framework, the authors demonstrate that LLMs can effectively reinterpret rote-memorized facts through a tiny set of meaningful prompts. Surprisingly, deeper initial memorization actually enhances downstream generalization and reasoning, though it also opens up new avenues for malicious data exploitation.

What Problem Does This Paper Address?

In machine learning, rote learning—verbatim memorization through repetition—is traditionally viewed as the enemy of generalization. For LLMs, overfitting on training data is widely believed to degrade downstream performance, causing models to fail when faced with paraphrased prompts or different languages. Consequently, standard training regimes strictly limit the number of training epochs to prevent models from simply "parroting" data.

However, factual knowledge inherently requires some degree of memorization. This paper tackles a fundamental question: Is rote-memorized knowledge truly a dead end for generalization, or can an LLM learn to flexibly retrieve and reason over facts that were initially learned entirely by rote?

Methods

The authors propose a novel "memorize-then-generalize" framework to decouple memorization from generalization:

  1. Phase 1: Rote Memorization: The LLM is trained via unsupervised next-token prediction to memorize factual subject-object pairs using a synthetic, semantically meaningless key token (e.g., Gene Finley [X] Cody Ross). At this stage, [X] acts merely as an arbitrary placeholder for an unlearned relation.
  2. Phase 2: Generalization: The model undergoes supervised fine-tuning (SFT) on a small subset of the memorized facts, but this time using semantically meaningful natural language prompts (e.g., Who is Gene Finley's mother?).

This approach allows the model to map the abstract relational structure learned in Phase 1 onto natural language semantics. The authors evaluate generalization across three increasingly difficult dimensions: unseen subject-object associations, unseen prompt variants, and entirely unseen languages.

Datasets

To avoid contamination from pre-existing knowledge in pre-trained LLMs, the authors constructed a fully synthetic dataset of fictional facts.

The dataset covers five relations adapted from the T-REx dataset: author, capital, educated at, genre, and mother. For each relation, GPT-4 was used to generate 100 fictional subject-object pairs (e.g., fictional people and universities) along with 100 alternative distractor objects for multiple-choice evaluation. They also generated 20 diverse natural language prompts per relation (10 for training, 10 for testing) and translated them into German, Spanish, Chinese, and Japanese to test cross-lingual robustness.

Key Insights and Ideas

  • "Memorize More, Generalize Better": Contrary to the belief that overfitting destroys generalization, models trained for more epochs in the rote-learning phase consistently achieved better generalization performance after Phase 2 fine-tuning. Deeply embedded facts act as stable semantic anchors.
  • Minimal Supervision Suffices: The model doesn't need a massive, diverse dataset to learn generalization. Training on just one well-memorized fact paired with one meaningful prompt is enough to unlock generalization across all other unseen facts and paraphrased prompts for that relation.
  • Structural Alignment in Latent Space: Internal representation analysis shows that during rote learning, the LLM naturally clusters facts by their abstract relations. Phase 2 fine-tuning then shifts these clusters, pulling the representation of the meaningless key token closer to the semantically meaningful prompts.
  • The Dual Generalization Risk: This mechanism is a double-edged sword. While it enables highly efficient knowledge injection, it also poses a security risk: an adversary can easily "repurpose" benign memorized facts into harmful contexts (e.g., twisting "A is B's mother" to respond to malicious prompts like "A is abusing B") with minimal fine-tuning.

Key Results

  • High Generalization Accuracy: After Phase 1 training on Qwen2.5-1.5B, the model achieved an average generation accuracy of 0.36. After just one epoch of Phase 2 training using 50 facts and a single prompt, accuracy on unseen facts jumped to 0.76, and scaled up to 0.95 with more training prompts, as illustrated in the training matrix: Effective generalization with minimal training, facts, and prompts
Effective generalization with minimal training, facts, and prompts
  • Clear Semantic Shifts: Object probabilities on held-out facts surged dramatically during the generalization phase, while remaining near zero for unrelated prompts, confirming that the model learned the underlying semantics rather than surface-level patterns: Object Probability vs Epoch
Figure 3: LLMs generalize to held-out facts and unseen prompts. Phase-1: Epochs 1–20; Phase-2: Epochs 21–25. Results are averaged over 5 relations, each with 1 training prompt, 3 unrelated prompts, and 10 test prompts.
  • Cross-Lingual Transfer: Even when fine-tuned purely on English prompts, multi-lingual LLMs successfully transferred the learned relations to German, Spanish, Chinese, and Japanese, provided the entity names remained consistent: Generalization with multilingual prompts
Figure 4: Generalization with multilingual prompts. Phase-1: memorize 100 facts per relation. Phase-2: fine-tune on 50 facts and 10 English prompts per relation. We report the generation accuracy averaged over 5 relations. Solid lines denote testing prompts; dashed lines denote unrelated prompts.
  • Reasoning Boost: Rote memorization surprisingly aided complex reasoning. For reversal reasoning ("Who is the child of Y?"), accuracy rose from 0 to 0.26. For 2-hop compositional reasoning, accuracy increased from 0.14 (no memorization) to 0.36.

Limitations and Future Work

  • Language Proximity Bias: While cross-lingual generalization works, performance is noticeably better on languages syntactically closer to English (like Spanish and German) than those further away (like Chinese and Japanese).
  • Entity Name Dependency: Generalization drops significantly if entity names are translated into other languages rather than kept consistent with their English forms during testing.
  • Scope of Domains: The study focuses primarily on factual subject-relation-object triplets. The authors note that future work should explore whether these memorize-then-generalize dynamics hold true in more abstract domains like mathematical problem-solving, scientific reasoning, and code generation.

Summary updated

BibTeX
@inproceedings{wu2026rote,
  author = {Qinyuan Wu and Soumi Das and Mahsa Amani and Bishwamittra Ghosh and Mohammad Aflah Khan and Krishna P. Gummadi and Muhammad Bilal Zafar},
  title = {{Rote Learning Considered Useful: Generalizing over Memorized Data in LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=JpEZIM0qAZ},
}
Figure