# Ehrenfeucht-Haussler Rank and Chain of Thought

Ehrenfeucht-Haussler 순위와 사고 연쇄

Pablo Barceló, Alexander Kozachinskiy, Tomasz Steifer · arXiv · 2025년 1월 22일

- **연구 문제** Boolean 함수의 rank가 hard attention을 쓰는 단일층 Transformer의 최소 CoT 단계 수와 대응하는지 규명합니다.
- **연구 방법** Boolean rank를 assignment query 결정 트리 깊이로 일반화하고, 이를 단일층 디코더의 반복 깊이와 연결합니다.
- **주요 결과** 단일 헤드에서는 rk(f)와 디코더 깊이가 같고, t-Comp와 k-thOne의 다중 헤드 rank 값을 정확히 정하며, 2-head rank-1 일관성 문제는 NP-complete입니다.

## Rank와 CoT 단계 수의 대응 문제

이 논문은 PAC 학습 이론에서 중요한 Boolean 함수의 rank를 Transformer의 계산 단계 수와 연결합니다. 기존 rank는 Ehrenfeucht와 Haussler가 결정 트리의 깊이로 정의했고, 다항 크기 결정 트리의 준다항 시간 PAC 학습 알고리즘을 얻는 데 쓰였습니다. 이 논문은 hard attention을 쓰는 단일층 Transformer가 함수를 계산할 때 필요한 Chain of Thought (CoT) 단계 수가 그 함수의 rank와 같다고 주장합니다. 여기서 CoT 단계는 디코더가 출력을 입력 뒤에 덧붙여 다음 출력을 반복 생성하는 과정을 뜻합니다. 따라서 질문은 rank라는 조합론적 양이 신경망의 반복 계산 횟수를 정확히 특징짓는지에 있습니다.

논문은 이 대응을 Boolean 함수에서 출발해 임의의 유한 알파벳 함수로 일반화합니다.

## Assignment query로 정의한 rank

Ehrenfeucht와 Haussler의 rank는 Boolean 결정 트리의 노드 rank를 재귀적으로 정의하여 얻습니다. 논문은 이를 임의의 유한 집합 위의 함수로 옮기기 위해 assignment query를 도입합니다. Assignment는 위치 i와 기호 σ의 쌍이며, 입력이 그 위치에 σ를 가질 때 일치합니다. Assignment query는 assignment 집합의 순열 τ를 정하고, 입력과 처음 일치하는 원소를 반환하는 질의입니다. 함수 f의 rank rk(f)는 f를 계산하는 assignment query 결정 트리의 최소 깊이로 정의됩니다. 논문은 Boolean 함수의 경우 이 정의가 기존 Ehrenfeucht-Haussler rank와 일치함을 Proposition 1로 보입니다.

이 일치는 두 방향의 변환, 즉 rank를 가진 트리를 깊이 r의 a-query 트리로 바꾸는 방향과 그 반대 방향으로 증명됩니다.

## 단일 헤드 디코더 깊이와 rank의 등가성

논문은 단일 헤드 hard attention 디코더의 깊이 dd(1)(f)가 rk(f)와 같음을 Theorem 1로 보입니다. 한 번의 a-query로 디코더의 다음 출력을 계산할 수 있으므로 rk(f)는 dd(1)(f) 이하입니다. 반대로 디코더의 각 출력 노드를 one-hot 위치 인코딩과 attention, ReLU 층으로 구성하면 assignment query 트리를 모사할 수 있습니다. 여기서 주목할 점은 attention이 가장 큰 점수의 원소를 고르고, 그 원소가 다음 노드를 정하는 방식으로 트리의 간선을 따라 내려간다는 것입니다. 이 결과에서 t-Comp에 대한 디코더 깊이 t와 k-thOne에 대한 디코더 깊이 k가 각각 Corollary 1과 Corollary 2로 얻어집니다.

두 corollary의 조건은 각각 n\>2t와 n≥k²+k입니다.

## 다중 헤드 rank와 통신 복잡도 하한

다중 헤드 설정에서는 H개의 a-query를 곱으로 묶은 H-degree a-query를 사용합니다. H-head rank rk(H)(f)는 이런 질의로 구성한 결정 트리의 최소 깊이입니다. Theorem 2는 rk(H)(f)가 H개 헤드를 가진 디코더 깊이 dd(H)(f)와 같다고 보입니다. 또한 Proposition 5는 H-degree 질의를 H개의 a-query로 순차 분해하여 rk(f)가 H·rk(H)(f) 이하임을 보입니다. 이 부등식만으로는 tight 하한을 얻기 어렵기 때문에, 논문은 두 참여자 통신 복잡도 도구를 씁니다. Lemma 1은 H-head rank가 r이면 임의의 입력 분할에서 r+1 라운드의 낮은 통신 프로토콜이 존재한다고 말합니다.

이를 pointer chasing 하한과 결합하여 t-Comp의 H-head rank가 충분히 큰 n에서 t임을 얻습니다.

## t-Comp와 k-thOne의 엄밀한 rank 값

t-Comp는 길이 n의 정수 열을 함수 ϕ로 해석하고, ϕ를 t번 합성한 값을 1에서 평가하는 문제입니다. 이 함수의 rk(t-Comp)는 최대 t이며, Proposition 2는 n\>2t일 때 rk(t-Comp)가 정확히 t임을 조합론적 증명으로 보입니다. 다중 헤드에서는 충분히 큰 n에 대해 rk(H)(t-Comp)=t가 성립하며, 이 결과는 통신 복잡도 증명에서 나옵니다. k-thOne은 Boolean 열에서 k번째 1의 위치를 반환하고, 1이 k개보다 적으면 n+1을 반환합니다. Proposition 3은 rk(k-thOne)이 최대 k이고 n≥k²+k일 때 k임을 보입니다. Theorem 3은 k-thOne의 다중 헤드 rank가 대부분의 충분히 큰 n에서 k임을 보입니다.

다만 저자들은 이 함수에는 통신 복잡도 도구가 적용되지 않는다고 밝히며, 증명은 귀납적 조합 논증으로 이뤄집니다.

## Bounded rank 함수 클래스의 PAC 학습 가능성

PAC 학습 관점에서 논문은 일관성 문제를 중심에 둡니다. 적절한 PAC 학습은 주어진 표본과 일치하는 함수가 클래스 안에 존재하는지 찾는 일관성 문제와 동등하다고 알려져 있습니다. Theorem 4는 1-head rank가 최대 k인 함수의 일관성 문제가 임의의 유한 알파벳에서 다항 시간에 풀린다고 보입니다. 증명은 k에 대한 귀납법이며, 표본의 부분집합 Sa를 사용하여 최상위 assignment query를 찾습니다. Theorem 5는 이진 알파벳에서 2-head rank가 최대 1인 함수의 일관성 결정 문제가 NP-complete라고 보입니다. 이 증명은 2-order separability 문제에서 monotone NAE-3-SAT를 거쳐 환원합니다.

따라서 2-head rank-1 클래스는 NP ⊆ BPP가 아니라면 적절한 다항 시간 PAC 학습이 불가능합니다.

## 적용 범위와 남은 질문

이 결과는 hard attention을 쓰는 단일층 디코더에 대한 정확한 특성화입니다. 저자들은 다층 Transformer와 soft attention으로 확장하는 일이 어려운 향후 과제라고 밝힙니다. 또한 이 특성화는 차원과 정밀도 비트 수에 대한 가정을 요구하지 않는다고 설명됩니다. 다만 k-thOne에서 보듯 모든 함수에 같은 하한 도구가 통하지는 않습니다. 통신 복잡도 도구는 두 참여자 분할에서 이 함수의 2라운드 통신이 로그 수준이므로 적용되지 않습니다. 저자들은 soft attention 디코더에 대한 Chen 등의 연구와 이 논문의 차이도 언급하며, 두 설정이 같은 문제가 아니라고 설명합니다.

## 논문 정보

- **저자**: Pablo Barceló, Alexander Kozachinskiy, Tomasz Steifer
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 1월 22일
- **등록일**: 2026년 10월 30일
- **수정일**: 2025년 8월 11일
- **버전**: v2
- **arXiv**: 2501.12997
- **분류**: cs.LG · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2501.12997v2) · [원문 PDF ↗](https://arxiv.org/pdf/2501.12997v2)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

The notion of \\emph{rank} of a Boolean function has been a cornerstone in PAC learning theory, enabling quasipolynomial-time learning algorithms for polynomial-size decision trees. We present a novel characterization of rank, grounded in the well-known Transformer architecture. We show that the rank of a function $f$ corresponds to the minimum number of \\emph{Chain of Thought} (CoT) steps required by a single-layer Transformer with hard attention to compute $f$. Based on this characterization we establish tight bounds on the number of CoT steps required for specific problems, showing that \\(\\ell\\)-fold function composition necessitates exactly \\(\\ell\\) CoT steps. Furthermore, we analyze the problem of identifying the position of the \\(k\\)-th occurrence of 1 in a Boolean sequence, proving that it requires \\(k\\) CoT steps. Finally, we introduce the notion of the multi-head rank that captures multi-head single-layer transformers, and perform the analysis of PAC-learnability of the classes of functions with bounded multi-head rank.

## 원문 인용

Pablo Barceló, Alexander Kozachinskiy, Tomasz Steifer (2025). Ehrenfeucht-Haussler Rank and Chain of Thought. arXiv:2501.12997v2. https://arxiv.org/abs/2501.12997v2

**BibTeX**

```
@misc{barcel2025ehrenfeucht,
  title = {{Ehrenfeucht-Haussler Rank and Chain of Thought}},
  author = {Pablo Barceló and Alexander Kozachinskiy and Tomasz Steifer},
  year = {2025},
  eprint = {2501.12997},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.12997v2}
}
```

## 이 논문의 용어

- [soft attention](https://refivu.com/terms/273692c14df4-soft-attention)
- [hard attention](https://refivu.com/terms/9e84a6134e5d-hard-attention)
- [Chain of Thought (CoT)](https://refivu.com/terms/b8bf39e3e115-chain-of-thought-cot)
- [decoder](https://refivu.com/terms/abbe67dbdbd5-decoder)
- [communication complexity](https://refivu.com/terms/1ebd5ef1883d-communication-complexity)

## 다른 논문 해설

- [What Characterizes Effective Reasoning? Revisiting Length, Review, and Structure of CoT](https://refivu.com/papers/43bea187-421a-4e06-a02f-919fc67071e0-what-characterizes-effective-reasoning-revisiting-length.md)
- [Teaching Transformers Causal Reasoning through Axiomatic Training](https://refivu.com/papers/6619489a-beeb-475b-beb3-a75c121f0ef3-teaching-transformers-causal-reasoning-through-axiomatic.md)
- [Plantain: Plan-Answer Interleaved Reasoning](https://refivu.com/papers/384622e7-377a-495a-9a0f-a608b143e26f-plantain-plan-answer-interleaved-reasoning.md)
- [ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization](https://refivu.com/papers/a06a3885-1bec-4cd1-9955-82991ae54672-ecco-evidence-driven-causal-reasoning-for-compiler.md)
- [Thoughtbubbles: an Unsupervised Method for Parallel Thinking in Latent Space](https://refivu.com/papers/d2d7e8f7-1ee5-47be-866d-499ed5f06d3e-thoughtbubbles-an-unsupervised-method-for-parallel-thinking.md)
- [Models Under SCOPE: Scalable and Controllable Routing via Pre-hoc Reasoning](https://refivu.com/papers/736e75c9-b8ce-45cc-9326-2b88a2807feb-models-under-scope-scalable-and-controllable-routing-via.md)
- [Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuning](https://refivu.com/papers/1df651fe-a060-4bd5-bae0-8e9931bfa576-vulnerability-aware-alignment-mitigating-uneven-forgetting.md)
- [Finite-Time Global Optimality Convergence in Deep Neural Actor-Critic Methods for Decentralized Multi-Agent Reinforcement Learning](https://refivu.com/papers/7cb21181-7f21-4d9d-a1ab-072b74b80f38-finite-time-global-optimality-convergence-in-deep-neural.md)
- [Understanding Nonlinear Implicit Bias via Region Counts in Input Space](https://refivu.com/papers/4f651ef8-f538-4406-8e71-5b281c8afaea-understanding-nonlinear-implicit-bias-via-region-counts-in.md)
- [LEAPS: A discrete neural sampler via locally equivariant networks](https://refivu.com/papers/18f47342-603c-4a46-8dcc-4336d46c678b-leaps-a-discrete-neural-sampler-via-locally-equivariant.md)
- [Accelerating Linear Recurrent Neural Networks for the Edge with Unstructured Sparsity](https://refivu.com/papers/b2a9f6b3-8ba3-44da-96ae-f86807c7d69e-accelerating-linear-recurrent-neural-networks-for-the-edge.md)
- [Sparse Spectral Training and Inference on Euclidean and Hyperbolic Neural Networks](https://refivu.com/papers/fe14dce1-7320-4b0a-850d-c59ef71afe28-sparse-spectral-training-and-inference-on-euclidean-and.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/cd83075a-e02f-4d42-b023-d9aff551bfbf-ehrenfeucht-haussler-rank-and-chain-of-thought)
