atlas

Research map / Architectures and efficiency / Attention and transformers

Compositional Reasoning with Transformers, RNNs, and Chain of Thought

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Efficient language transformers · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Compares transformers, RNNs, and chain-of-thought transformers on Compositional Reasoning Questions (tree-structured evaluation like Boolean formulas), proving each needs a size-growing resource (depth, hidden dimension, or CoT tokens) and giving matching constructions.

Problem

Which neural architectures (deep transformers, RNNs, transformers with chain of thought) can solve compositional reasoning over tree structures such as Boolean formula evaluation, and what resources each needs as input size grows.

Approach

Defines Compositional Reasoning Questions (CRQs) as tree-structured argmax-of-inner-product evaluation, proves NC1-hardness, and shows a trade-off: transformers need depth logarithmic in tree depth, RNNs need logarithmic hidden dimension under a memory-rank (post-order, stack-friendly) input ordering, and CoT transformers need n CoT tokens with constant depth.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase transformer depth to match the CRQ tree depthTransformer · CRQs with at most n nodes and depth at most Lsolvability: depth L-1Helped
Keep transformer depth constantTransformer · CRQs of size nsolvability: depth LHurt
Order RNN inputs by memory-rank sortRNN · CRQs with binary treeshidden dimension: O(n) -> O(d\log(n))Helped
Use the bad ordering of nodesRNN · CRQs on a balanced binary tree of size nhidden state size: \Omega(n) bitsHurt
Add n chain-of-thought tokens in reverse BFS orderTransformer · CRQs with n nodessolvability: nHelped
Limit chain-of-thought tokens to O(log(n))Constant-depth transformer · CRQs of size nsolvability: O(\log(n))Hurt
Use logarithmic hidden dimension rather than constant hidden dimensionRNN · CRQs with a suitable input orderingsolvability: O(\log n)Helped

Surprising findings

Experimental setup

Baselines: Feng et al. arithmetic chain-of-thought

Builds on: chain of thought NC1-completeness of Boolean formula evaluation TC0 characterization of transformers

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy