
Researcher @ ByteDance Seed. Prev @OhioState @MSFTResearch
San Jose, CA
Joined May 2021
- Tweets139
- Following523
- Followers1.6K
- Likes300
Pinned Tweet
LLMs exhibit the Reversal Curse, a basic generalization failure where they struggle to learn reversible factual associations (e.g., "A is B" -> "B is A"). But why?
Our new work uncovers that it's a symptom of the long-standing binding problem in AI, and shows that a model design based on JEPA can, for the first time to our knowledge, break the curse without side-stepping it through data augmentation or non-causal objectives.
This skill also unlocks a new kind of parametric memory integration that enables models to tackle large-scale arithmetic reasoning problems via parametric forward-chaining, outperforming frontier LLMs (o3-mini-high, Gemini-2.0-Flash-Thinking) based on non-parametric memory and prolonged explicit reasoning.
Will attend #NeurIPS2024 Dec 10-14 and present our work studying Transformer's grokking in implicit reasoning. Excited to meet old and new friends!
Thanks @_akhaliq for sharing our work. Very proud to introduce my star student @BoshiWang2's new work @osunlp: Grokked Transformers are Implicit Reasoners: A Mechanistic Journey to the Edge of Generalization
Can transformers reason? Are transformers fundamentally limited in compositionality and systematic generalization? I think our work’s findings can contribute to meaningful debates over these questions.
Key findings (with mixed results):
(1) Figure 1 below: We focus on two representative reasoning types: composition and comparison, and show that transformers can learn implicit reasoning, but only through grokking. The levels of generalization vary across reasoning types: when faced with OOD examples, transformers fail to systematically generalize for composition but succeed for comparison.
(2) Figure 2 below: What happens during grokking? Why does grokking happen? Why does the model fail in OOD generalization for composition but succeed for comparison? We conduct a mechanistic analysis of the model's internals throughout training, and find: 1) the gradual formation of the generalizing circuit throughout grokking, and 2) the connection between systematicity and the circuit’s configuration, i.e., the way atomic knowledge and rules are stored and applied within the circuit:
The comparison task emits a ``parallel circuit'' that is learned by the transformer during grokking, which allows atomic facts to be stored and retrieved in the same region and enables systematicity to happen. For composition, the model does acquire the composition rule through grokking, but it does not have any incentive to store atomic facts in the upper layers that do not appear as the second hop during training.
Connections with existing research:
1. We find the speed of improvement in generalization correlates with the ratio between inferred and atomic facts in training (critical data distribution), and depends little on the absolute size of the training data. This seems to contradict the hypothesis of critical data size in prior work such as arxiv.org/abs/2309.02390 by Varma et al.
2. Our work provides a mechanistic understanding of existing findings that transformers seem to reduce compositional reasoning to linearized pattern matching (arxiv.org/abs/2305.18654 Dziri et al. @nouhadziri) and that LLMs show positive evidence in first-hop reasoning but not the second (arxiv.org/abs/2402.16837 Yang et al. @soheeyang_).
3. Why is implicit reasoning with parametric memory of knowledge and rules practically important? To show its potential, we demonstrate that on a complex reasoning task with a large search space, a fully grokked transformer can achieve near-perfect accuracy while GPT-4 Turbo and Gemin-1.5-Pro are close to random guessing.
😀Fun fact about the title:
We went back and forth many times and created ~10 candidate titles. Another title I personally liked very much is “Grokking of Implicit Reasoning: What Happens Inside Transformers?” But that does not deliver our key conclusion and our mechanistic analysis approach. Finally, Boshi came up with this title, which sounds very romantic (although perhaps less scientific) to me, but captures most aspects of our paper very well.
P.S. @wangboshi is truly intellectually stimulating to work with. If you have related internship/collaboration opportunities, feel free to reach out! Joint work with @xiangyue96 @ysu_nlp
Can OpenAI o1 tackle hard reasoning problems? We tested it on the complex reasoning task in our Grokked Transformers paper. It turns out that o1-preview also struggles a lot like earlier LLMs; on the other hand, a grokked transformer can nail it near-perfectly.
Thanks @_akhaliq for sharing our work. We study whether transformers can implicitly reason over their parametric knowledge, a skill that even the most capable LLMs nowadays struggle with.
We find that transformers can learn implicit reasoning, but only through grokking, i.e., extended training far beyond overfitting. Further controlled experiments and analysis of the model internals reveal 1) the underlying mechanisms behind grokking, such as the formation of the generalizing circuit and its relative efficiency with the memorizing circuit, and 2) connection between the acquired systematicity level and the configuration of the generalizing circuit.
First of all, why does implicit reasoning matter? While explicit verbalized reasoning could improve downstream performance, ultimately, it is the model’s ability to reason implicitly that determines how well it can acquire structured and compressed representations of facts and rules from data. Deficiency in such a skill would lead to redundant knowledge storage, difficulty in propagating knowledge updates, and importantly, fundamentally impede the model from systematic generalization over knowledge.
1
8
682
Thanks @_akhaliq for sharing our work!
Tool augmentation is essential for LLMs, but a critical aspect that has surprisingly been understudied is simply how accurately an LLM uses the tools being integrated. We propose Simulated Trial-and-Error (STE), a biologically-inspired method enabling LLMs to better master tools through 1) simulation, 2) learning from execution feedback, and 3) short/long-term memory mechanisms.
Given a tool (e.g., an API with its specification), STE leverages an LLM to simulate plausible scenarios for using the tool. It then iteratively interacts with the API to fulfill the scenario by synthesizing, executing, and observing the feedback from API calls. Two memory mechanisms are designed to improve the quality of the exploration: 1) a short-term memory consisting of recent fine-grained trial and error trajectories helps the model learn from previous failures and explore the tool in further depth; 2) a long-term memory of distilled experiences from past episodes helps maintain progressive learning over a long horizon. After exploration, the trials are then utilized to enhance the tool-use ability of an LLM via either fine-tuning or in-context learning (ICL).
1
4
322
Are LLMs reasoning based on deep understandings of truth and logic? Can LLMs hold & defend their own "reasoning"?
Our #EMNLP23 findings paper (arxiv.org/pdf/2305.13160v2.p…) explores testing LLMs' reasoning by engaging them in a debate that probes deeper into their understanding.
Chain-of-Thought (CoT) prompting improves large LMs on complex reasoning. But what aspects of the CoT prompt matter? Are valid reasoning steps important?
Check out our paper: arxiv.org/abs/2212.10001! Work w/ @sewon__min, @xiangdeng1, @mickeysjm, You Wu, @LukeZettlemoyer, @hhsun1
My talk is at 3:15pm, Hall A - Room B. Stop by if interested!
While Pretrained LMs internalize a great amount of knowledge, they still fall short of using their knowledge for multi-step reasoning. How can we guide PLMs to do this?
Excited to share our #EMNLP22 work (arxiv.org/abs/2203.08383), w/ Xiang Deng, @hhsun1 at @osunlp. [1/6]
7
While Pretrained LMs internalize a great amount of knowledge, they still fall short of using their knowledge for multi-step reasoning. How can we guide PLMs to do this?
Excited to share our #EMNLP22 work (arxiv.org/abs/2203.08383), w/ Xiang Deng, @hhsun1 at @osunlp. [1/6]
Code: github.com/sunlab-osu/IterPr…
We propose to augment the PLM with a “prompter”, which learns to iteratively prompt the PLM to generate the next piece of knowledge during each reasoning step. [2/6]














