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.
Beyond Parameters: Exploring Virtual Logic Depth for Scaling Laws
University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);University of Toronto(多伦多大学);University of Technology Sydney(悉尼技术大学);Google DeepMind(谷歌DeepMind);University of Maryland, College Park(马里兰大学学院市分校);Massachusetts Institute of Technology(麻省理工学院)
Experimenting with recursive queries in database and logic programming systems
Università della Calabria(卡拉布里亚大学)
本文考虑了大量(可能是分布式的)数据的推理问题。目前,现有的建议显示出一些局限性:{ \em(i)}由于推理通常在主存中进行的事实,可以同时处理的数据的量是有限的; { \em(ii)}与外部的交互(和独立的)DBMS不是微不足道的,在某些情况下,根本不允许;{ \em(iii)}当前实现的效率对于它们在涉及大量数据的复杂推理任务中的利用仍然是不够的。本文提供了在这种情况下的贡献,它提出了一个新的系统,称为DLV $^{DB}$,旨在解决这些问题。此外,本文报告了一个彻底的实验分析的结果,我们已经进行了比较我们的系统与几个国家的最先进的系统(包括逻辑和数据库)的一些经典的演绎问题;其他测试系统是:LDL++,XSB,Smodels和三个顶级的商业DBMS。DLV $^{DB}$在递归查询上的性能甚至明显优于商业数据库系统。逻辑程序设计理论与实践(Theory and Practice of Logic Programming,TPLP)
On the Semantics of Abstract Argumentation Frameworks: A Logic Programming Approach
University of Calabria(卡拉布里亚大学)
最近,人们对Dung的抽象论证框架(AF)的扩展框架越来越感兴趣。流行的扩展包括双极AF和具有递归攻击和必要支持的AF。虽然AF语义和部分稳定模型(PSM)的逻辑程序之间的关系已被深入研究,这是不是更一般的框架扩展AF的情况下。在本文中,我们探讨基于AF的框架和PSM之间的关系。我们表明,每一个AF为基础的框架$Δ$可以被翻译成一个逻辑程序$P_Δ$,使扩展规定的不同语义的$Δ$符合子集的PSM的$P_Δ$。我们提供了一个逻辑编程方法,其特点是,在一个优雅和统一的方式,几个AF为基础的框架的语义。这一结果还允许定义新的AF为基础的框架,如AF与递归攻击和递归演绎支持的语义。《逻辑程序设计理论与实践》(Theory and Practice of Logic Programming)
Exploring the Paradigm Shift from Grounding to Skolemization for Complex Query Answering on Knowledge Graphs
School of Computer Science and Engineering, Sun Yat-sen University(中山大学计算机科学与工程学院);School of Data Science, Lingnan University(岭南大学数据科学学院);School of Science and Technology, Hong Kong Metropolitan University(香港理工大学科技学院);Department of Computing, The Hong Kong Polytechnic University(香港理工大学计算机系)
Exploring Generalization Ability of Pretrained Language Models on Arithmetic and Logical Reasoning
Zhejiang University(浙江大学);Westlake University(西湖大学);Westlake Institute for Advanced Study(西湖高等研究院);Johns Hopkins University(约翰斯·霍普金斯大学);Imperial College London(帝国理工学院)