Grokking in the Wild: Data Augmentation for Real-World Multi-Hop Reasoning with Transformers

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Abramov, Roman, Steinbauer, Felix, Kasneci, Gjergji
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913825105641472
author Abramov, Roman
Steinbauer, Felix
Kasneci, Gjergji
author_facet Abramov, Roman
Steinbauer, Felix
Kasneci, Gjergji
contents Transformers have achieved great success in numerous NLP tasks but continue to exhibit notable gaps in multi-step factual reasoning, especially when real-world knowledge is sparse. Recent advances in grokking have demonstrated that neural networks can transition from memorizing to perfectly generalizing once they detect underlying logical patterns - yet these studies have primarily used small, synthetic tasks. In this paper, for the first time, we extend grokking to real-world factual data and address the challenge of dataset sparsity by augmenting existing knowledge graphs with carefully designed synthetic data to raise the ratio $ϕ_r$ of inferred facts to atomic facts above the threshold required for grokking. Surprisingly, we find that even factually incorrect synthetic data can strengthen emergent reasoning circuits rather than degrade accuracy, as it forces the model to rely on relational structure rather than memorization. When evaluated on multi-hop reasoning benchmarks, our approach achieves up to 95-100% accuracy on 2WikiMultiHopQA - substantially improving over strong baselines and matching or exceeding current state-of-the-art results. We further provide an in-depth analysis of how increasing $ϕ_r$ drives the formation of generalizing circuits inside Transformers. Our findings suggest that grokking-based data augmentation can unlock implicit multi-hop reasoning capabilities, opening the door to more robust and interpretable factual reasoning in large-scale language models.
format Preprint
id arxiv_https___arxiv_org_abs_2504_20752
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Grokking in the Wild: Data Augmentation for Real-World Multi-Hop Reasoning with Transformers
Abramov, Roman
Steinbauer, Felix
Kasneci, Gjergji
Computation and Language
Artificial Intelligence
Machine Learning
I.2.7; I.2.6; I.2.3; I.7
Transformers have achieved great success in numerous NLP tasks but continue to exhibit notable gaps in multi-step factual reasoning, especially when real-world knowledge is sparse. Recent advances in grokking have demonstrated that neural networks can transition from memorizing to perfectly generalizing once they detect underlying logical patterns - yet these studies have primarily used small, synthetic tasks. In this paper, for the first time, we extend grokking to real-world factual data and address the challenge of dataset sparsity by augmenting existing knowledge graphs with carefully designed synthetic data to raise the ratio $ϕ_r$ of inferred facts to atomic facts above the threshold required for grokking. Surprisingly, we find that even factually incorrect synthetic data can strengthen emergent reasoning circuits rather than degrade accuracy, as it forces the model to rely on relational structure rather than memorization. When evaluated on multi-hop reasoning benchmarks, our approach achieves up to 95-100% accuracy on 2WikiMultiHopQA - substantially improving over strong baselines and matching or exceeding current state-of-the-art results. We further provide an in-depth analysis of how increasing $ϕ_r$ drives the formation of generalizing circuits inside Transformers. Our findings suggest that grokking-based data augmentation can unlock implicit multi-hop reasoning capabilities, opening the door to more robust and interpretable factual reasoning in large-scale language models.
title Grokking in the Wild: Data Augmentation for Real-World Multi-Hop Reasoning with Transformers
topic Computation and Language
Artificial Intelligence
Machine Learning
I.2.7; I.2.6; I.2.3; I.7
url https://arxiv.org/abs/2504.20752