Parrot Mind: Towards Explaining the Complex Task Reasoning of Pretrained Large Language Models with Template-Content Structure
Haotong Yang, Fanxu Meng, Zhouchen Lin, Muhan Zhang
TL;DR
The paper tackles how pretrained LLMs achieve complex reasoning under pure language-modeling objectives and proposes the template-content (T-C) structure as a principled explanation. By separating output into fixed templates (task skeletons) and flexible content (problem-specific data), the authors show that the learning space for reasoning tasks becomes tractable, and extend this idea to a hierarchical form enabling task composition. They provide formal definitions, constructive proofs for the existence of T-C Transformers, and universal-approximation extensions to causal Transformers, along with empirical evidence that current LLMs exhibit T-C-like behavior and that explicit T-C learning improves performance through content-replacement data augmentation. The work offers a concrete mechanism for reasoning in large language models, with implications for data efficiency, prompt design, and the development of compositional AI systems. Overall, the T-C framework advances our understanding of how structure in language can underlie robust reasoning in AI systems, and suggests practical avenues to enhance inductive generalization and multi-step problem solving.
Abstract
The pre-trained large language models (LLMs) have shown their extraordinary capacity to solve reasoning tasks, even on tasks that require a complex process involving multiple sub-steps. However, given the vast possible generation space of all the tasks, how the pretrained model learns the reasoning ability remains an open question. We firstly propose that an intrinsic structural constraint on the generated sequence of language-based reasoning -- we called it template-content structure (T-C structure) -- is the key to explain why LLMs can solve a large number of complex reasoning problems with limited training data by showing this structure can reduce the possible space from exponential level to linear level. Furthermore, by generalizing this structure to the hierarchical case, we demonstrate that models can achieve task composition, further reducing the space needed to learn from linear to logarithmic, thereby effectively learning on complex reasoning involving multiple steps. We provide both examples and formal theory of our T-C structure. We also experimentally validate the existence of the T-C structure in some current LLMs and its effectiveness for reasoning.
