← Latest papers
🤖 machine learning

Rethinking the Role of Positional Encoding: Sliding-Window Transformers without PE Remain Turing Complete

This paper demonstrates that positional encodings are not strictly necessary for transformers to achieve Turing completeness, as the sliding-window mechanism itself breaks permutation symmetry and provides sufficient positional information to simulate universal computation.

Original authors: Qian Li, Xinyu Mao, Shang-Hua Teng

Published 2026-06-02
📖 5 min read🧠 Deep dive

Original authors: Qian Li, Xinyu Mao, Shang-Hua Teng

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a robot to tell a story or solve a math problem. For a long time, computer scientists believed that to do this, the robot needed a special "address book" attached to every word it read. This address book, called Positional Encoding (PE), told the robot exactly where each word was in the sentence (1st, 2nd, 3rd, etc.). Without it, the theory went, the robot would get confused because it couldn't tell the difference between "The cat chased the dog" and "The dog chased the cat."

This paper argues that you don't actually need that address book if the robot is working with a specific type of memory: a sliding window.

Here is the core idea, broken down with some everyday analogies:

1. The Old Belief: The "Static Photo"

Think of a standard Transformer model (the kind behind many AI chatbots) as a photographer taking a picture of a whole crowd. If you just hand the photographer a pile of people's faces without telling them who is standing where, they can't tell the difference between a line of people and a random pile. They need a label on each person's forehead (Positional Encoding) to know the order.

2. The New Discovery: The "Moving Bus"

The authors realized that when AI does complex, step-by-step reasoning (like solving a long math problem), it doesn't look at the whole history at once. Instead, it uses a sliding window.

Imagine the AI is sitting on a bus with a window that only shows the last 10 people who walked by.

  • The Old View: If you just look at the 10 people currently in the window, you can't tell who walked in first or who walked out last. It's just a group of 10 people.
  • The New View: The authors noticed that the bus is moving.
    • Every second, a new person steps onto the bus (enters the window).
    • Every second, the oldest person falls off the back (leaves the window).

Even if the AI can't see the "street addresses" of the people inside the bus, the act of the bus moving creates a pattern. The AI can see: "Oh, a new person just got on, and I know who just fell off because the total group changed."

3. The "Magic Histogram" (The HIST Model)

To prove this, the authors invented a theoretical robot called the HIST model.

  • This robot is blind to order. It can't say "The red shirt is 3rd."
  • It only sees a count (a histogram). It knows: "There are 3 red shirts, 2 blue shirts, and 1 green shirt in the window right now."
  • It also has a tiny memory (a "control state") to remember the last few things that happened.

The magic trick is this: By comparing the count before a new person enters and the count after, the robot can figure out exactly who just left the bus, even without seeing their name tag.

  • Before: 3 Red, 2 Blue.
  • New person enters (Blue).
  • After: 3 Red, 3 Blue.
  • Wait, the window size is fixed! If a new Blue enters, a Red must have left.
  • Conclusion: The robot knows a Red shirt just fell off the back, even though it never saw the Red shirt's position.

4. The Big Result: Turing Completeness

In computer science, being "Turing Complete" means a machine can theoretically solve any problem a computer can solve, given enough time and memory.

  • Previous belief: Transformers needed Positional Encodings to be Turing Complete.
  • This paper's proof: A Transformer with a sliding window does not need Positional Encodings. The movement of the window itself provides enough "sequential information" to simulate a universal computer.

The authors built a mathematical bridge showing that:

  1. A machine that only counts token types (the HIST model) can simulate a universal computer (specifically, a "Post Machine," which is like a computer with a queue).
  2. A standard Transformer (without Positional Encodings) can perfectly mimic this counting machine.

5. What This Means (and What It Doesn't)

The Good News:
It turns out that the "motion" of processing data step-by-step is powerful enough to create order. You don't need to manually tag every word with a number to get universal computation. The "sliding" action breaks the symmetry on its own.

The Caveats (What the paper doesn't say):

  • It's not about speed: This is a proof of possibility, not efficiency. Just because a robot can solve a problem without the address book doesn't mean it will do it quickly or easily in real life.
  • It doesn't read exact positions: The robot still can't say "The 5th word is 'apple'." It can only deduce "Someone left the group." It's a clever trick of deduction, not a direct map.
  • It needs a tiny bit of math magic: The proof relies on the robot being able to count very precisely (parity checks) to know exactly who left the window. In the real world, this might require very high-precision math, which is a technical detail the authors acknowledge.

Summary

Think of the Positional Encoding as a GPS coordinate for every word. This paper says: "You don't need a GPS if you are walking down a street and watching people enter and leave a shop. The flow of people in and out tells you the story, even if you don't know their exact street addresses."

The sliding window itself is the "GPS" for the AI, making the external address book unnecessary for the machine to be capable of universal computation.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →