paper-with-me

홈 › Papers

Exploring Depth Generalization in Large Language Models for Solving Recursive Logic Tasks

2025-12-02 · Zhiyuan He arxiv

Large language models have demonstrated remarkable capabilities across many tasks, yet face significant challenges when dealing with recursive reasoning problems, those requiring the resolution of nested hierarchical structures. While prior research has extensively studied length generalization (a model's ability to handle longer sequences than seen during training), we investigate a distinct and underexplored limitation: depth generalization. Here, depth refers to the number of nested levels in a hierarchical problem, such as the layers of parentheses in a mathematical expression or the nesting of logical clauses in a Boolean formula. Our work reveals that standard transformer architectures struggle with problems involving deeper recursion than encountered during training, even when they perform well on longer but non-nested sequences. This limitation stems from their inability to maintain stack-like behavior, the capacity to track and resolve multiple levels of nested dependencies. Through systematic analysis, we demonstrate how this architectural constraint leads to rapid performance decay as the depth of the recursion increases. To address this challenge, we develop a novel looped locate-and-replace pipeline that decomposes recursive problems into manageable subcomponents. The approach employs two specialized models: a locator that identifies solvable subexpressions and a replacer that evaluates these components while preserving the overall structure. We evaluated this method in three carefully designed domains: Boolean algebra, recursive arithmetic, and propositional logic, each with a controllable depth of recursion. We show that our method effectively alleviates the performance decay when tested on out-of-distribution recursion depth.

📄 PDF Abstract BibTeX arXiv:2512.02677

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Exploring Length Generalization in Large Language Models

2022-07-11 · Cem Anil, Yuhuai Wu, Anders Andreassen, Aitor Lewkowycz 외

The ability to extrapolate from short problem instances to longer ones is an important form of out-of-distribution generalization in reasoning tasks, and is crucial when learning from datasets where longer problem instan…

Automated Theorem ProvingIn-Context LearningOut-of-Distribution Generalization

RIC: Rotate-Inpaint-Complete for Generalizable Scene Reconstruction

2023-07-21 · Isaac Kasahara, Shubham Agrawal, Selim Engin, Nikhil Chavan-Dafle 외

General scene reconstruction refers to the task of estimating the full 3D geometry and texture of a scene containing previously unseen objects. In many practical applications such as AR/VR, autonomous navigation, and rob…

3D geometryAutonomous Navigation

An Overview and Discussion on Using Large Language Models for Implementation Generation of Solutions to Open-Ended Problems

2024-12-31 · Hashmath Shaik, Alex Doboli

Large Language Models offer new opportunities to devise automated implementation generation methods that can tackle problem solving activities beyond traditional methods, which require algorithmic specifications and can …

RetrievalRetrieval-augmented Generation

GeomVerse: A Systematic Evaluation of Large Models for Geometric Reasoning

2023-12-19 · Mehran Kazemi, Hamidreza Alvari, Ankit Anand, Jialin Wu 외

Large language models have shown impressive results for multi-hop mathematical reasoning when the input question is only textual. Many mathematical reasoning problems, however, contain both text and image. With the ever-…

Mathematical Reasoning

gComm: An environment for investigating generalization in Grounded Language Acquisition

2021-05-09 · Rishi Hazra, Sonu Dixit

gComm is a step towards developing a robust platform to foster research in grounded language acquisition in a more challenging and realistic setting. It comprises a 2-d grid environment with a set of agents (a stationary…

Language Acquisition