Softmax Transformers are Turing-Complete

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Jiang, Hongjian, Hahn, Michael, Zetzsche, Georg, Lin, Anthony Widjaja
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914170257014784
author Jiang, Hongjian
Hahn, Michael
Zetzsche, Georg
Lin, Anthony Widjaja
author_facet Jiang, Hongjian
Hahn, Michael
Zetzsche, Georg
Lin, Anthony Widjaja
contents Hard attention Chain-of-Thought (CoT) transformers are known to be Turing-complete. However, it is an open problem whether softmax attention Chain-of-Thought (CoT) transformers are Turing-complete. In this paper, we prove a stronger result that length-generalizable softmax CoT transformers are Turing-complete. More precisely, our Turing-completeness proof goes via the CoT extension of the Counting RASP (C-RASP), which correspond to softmax CoT transformers that admit length generalization. We prove Turing-completeness for CoT C-RASP with causal masking over a unary alphabet (more generally, for letter-bounded languages). While we show this is not Turing-complete for arbitrary languages, we prove that its extension with relative positional encoding is Turing-complete for arbitrary languages. We empirically validate our theory by training transformers for languages requiring complex (non-linear) arithmetic reasoning.
format Preprint
id arxiv_https___arxiv_org_abs_2511_20038
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Softmax Transformers are Turing-Complete
Jiang, Hongjian
Hahn, Michael
Zetzsche, Georg
Lin, Anthony Widjaja
Formal Languages and Automata Theory
Machine Learning
Logic in Computer Science
Hard attention Chain-of-Thought (CoT) transformers are known to be Turing-complete. However, it is an open problem whether softmax attention Chain-of-Thought (CoT) transformers are Turing-complete. In this paper, we prove a stronger result that length-generalizable softmax CoT transformers are Turing-complete. More precisely, our Turing-completeness proof goes via the CoT extension of the Counting RASP (C-RASP), which correspond to softmax CoT transformers that admit length generalization. We prove Turing-completeness for CoT C-RASP with causal masking over a unary alphabet (more generally, for letter-bounded languages). While we show this is not Turing-complete for arbitrary languages, we prove that its extension with relative positional encoding is Turing-complete for arbitrary languages. We empirically validate our theory by training transformers for languages requiring complex (non-linear) arithmetic reasoning.
title Softmax Transformers are Turing-Complete
topic Formal Languages and Automata Theory
Machine Learning
Logic in Computer Science
url https://arxiv.org/abs/2511.20038