Lune

ICLR2025Top-tier venue

Dualformer: Controllable Fast and Slow Thinking by Learning with Randomized Reasoning Traces

DiJia Su, Sainbayar Sukhbaatar, Michael Rabbat, Yuandong Tian, Qinqing Zheng

2025Year
16Top-tier citations

Abstract

In cognition theory, human thinking is governed by two systems: the fast and intuitive System 1 and the slower but more deliberative System 2. Analogously, Large Language Models (LLMs) can operate in two reasoning modes: outputting only the solutions (fast mode) or both the reasoning chain and the final solution (slow mode). We present Dualformer, a single Transformer model that seamlessly integrates both the fast and slow reasoning modes by training on randomized reasoning traces, where different parts of the traces are strategically dropped during training. At inference time, Dualformer can be easily configured to execute in either fast or slow mode, or automatically decide which mode to engage (auto mode). It outperforms baselines in both performance and computational efficiency across all three modes: (1) in slow mode, Dualformer achieves 97.6% optimal rate on unseen 30 × 30 maze tasks, surpassing the Searchformer baseline (93.3%) trained on data with complete reasoning traces, with 45.5% fewer reasoning steps; (2) in fast mode, Dualformer achieves 80% optimal rate, significantly outperforming the Solution-Only model trained on solution-only data, which has an optimal rate of only 30%; (3) in auto mode, Dualformer achieves 96.6% optimal rate with 59.9% fewer steps than Searchformer. Moreover, Dualformer produces more diverse reasoning traces than Searchformer. For math reasoning problems, our techniques have also achieved improved performance with LLM fine-tuning, demonstrating its generalization beyond task-specific models. We open source our code at https://github.com/facebookresearch/dualformer .

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext f8072fde-d22c-4357-94ef-815d0d5e11cf

Cited by top-tier papers16

Ask how each one uses it

Builds on28

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines