Papers › On the Computational Power of Transformers and its Implications in Sequence Modeling

On the Computational Power of Transformers and its Implications in Sequence Modeling

16 Jun 2020CONLL 2020arXiv:2006.09286archive 2025-07-28

Satwik Bhattamishra, Arkil Patel, Navin Goyal

Transformers are being used extensively across several sequence modeling tasks. Significant research effort has been devoted to experimentally probe the inner workings of Transformers. However, our conceptual and theoretical understanding of their power and inherent limitations is still nascent. In particular, the roles of various components in Transformers such as positional encodings, attention heads, residual connections, and feedforward networks, are not clear. In this paper, we take a step towards answering these questions. We analyze the computational power as captured by Turing-completeness. We first provide an alternate and simpler proof to show that vanilla Transformers are Turing-complete and then we prove that Transformers with only positional masking and without any positional encoding are also Turing-complete. We further analyze the necessity of each component for the Turing-completeness of the network; interestingly, we find that a particular type of residual connection is necessary. We demonstrate the practical implications of our results via experiments on machine translation and synthetic tasks.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.09286")

Code

Syntology Ran 3 of 15 code samples harvested from 1 repository linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · violated contract; 2 ran · our draft was wrong.

By repository: official repository: 15 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

satwik77/Transformer-Computation-Analysis officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 3 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
2ran · our draft was wrong
12unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from satwik77/Transformer-Computation-Analysis. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

attention satwik77/Transformer-Computation-Analysis/Transformer/src/components/self_attention.py official repository ran · our draft was wrong MIT (permissive) · 20bb0ff4a2d77a03 · report
clones satwik77/Transformer-Computation-Analysis/Transformer/src/components/utils.py official repository ran · our draft was wrong MIT (permissive) · a3722169bbc81569 · report
subsequent_mask satwik77/Transformer-Computation-Analysis/Transformer/src/components/utils.py official repository ran · violated contract MIT (permissive) · 66fbf162663d4cff · report
cal_score satwik77/Transformer-Computation-Analysis/Transformer/src/utils/evaluate.py official repository unverified MIT (permissive) · 34e826973176fc38 · report
cal_score_AP satwik77/Transformer-Computation-Analysis/Transformer/src/utils/evaluate.py official repository unverified MIT (permissive) · 74e35c9e284520a1 · report
compute_bleu satwik77/Transformer-Computation-Analysis/Transformer/src/utils/bleu.py official repository unverified MIT (permissive) · ae3b0a421287c5c9 · report
get_logger satwik77/Transformer-Computation-Analysis/Transformer/src/utils/logger.py official repository unverified MIT (permissive) · ebe3d1e68daeb780 · report
get_std_opt satwik77/Transformer-Computation-Analysis/Transformer/src/utils/helper.py official repository unverified MIT (permissive) · c930b9e88eed3346 · report
greedy_decode satwik77/Transformer-Computation-Analysis/Transformer/src/components/utils.py official repository unverified MIT (permissive) · 5f0fe04ab8eb68da · report
make_model satwik77/Transformer-Computation-Analysis/Transformer/src/model.py official repository unverified MIT (permissive) · a4731b662e3d1cd8 · report
run_epoch satwik77/Transformer-Computation-Analysis/Transformer/src/model.py official repository unverified MIT (permissive) · c179d23a93633b29 · report
sent_to_idx satwik77/Transformer-Computation-Analysis/Transformer/src/utils/sentence_processing.py official repository unverified MIT (permissive) · 543b4d33c65c0c61 · report
sent_to_tensor satwik77/Transformer-Computation-Analysis/Transformer/src/utils/sentence_processing.py official repository unverified MIT (permissive) · 0a8dfa17ef60febe · report
sents_to_idx satwik77/Transformer-Computation-Analysis/Transformer/src/utils/sentence_processing.py official repository unverified MIT (permissive) · 6a992d9f1625b3ae · report
stack_to_string satwik77/Transformer-Computation-Analysis/Transformer/src/utils/evaluate.py official repository unverified MIT (permissive) · 6d3d89720d9d4bd7 · report

Tasks

Machine TranslationTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Residual Connection

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections