atlas

Research map / Architectures and efficiency / Attention and transformers

Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languages

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 3 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.

Shows that masked hard-attention transformers with strict masking and no position embeddings recognize exactly the star-free languages (LTL), via an intermediate language Boolean RASP, and extends the characterization to position embeddings, non-strict masking, and depth.

Problem

Exact characterization of the formal languages recognized by transformers with hard attention and attention masking; prior work gave only upper or lower bounds.

Approach

Introduces Boolean RASP (B-RASP), a Boolean-valued restriction of RASP that compiles into masked hard-attention transformers and can be decompiled back, serving as an intermediate language to LTL so that known LTL results transfer to transformers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use strict masking without position embeddingsMasked hard-attention transformers · Languages over Σ+expressive powerMixed
Use strict masking instead of non-strict maskingMasked hard-attention transformers · Languages over Σ+expressive powerHelped
Use only future-masked rightmost-hard attentionMasked hard-attention transformers · Languages over Σ+expressive powerNo clear effect
Add past-masked, non-masked, and/or leftmost-hard attentionStrictly masked hard-attention transformers · Languages over Σ+expressive powerNo clear effect
Add rational sinusoidal position embeddingsMasked hard-attention transformers · Languages over Σ+expressive powerHelped
Add arbitrary finite-image position embeddingsMasked hard-attention transformers · Languages over Σ+expressive powerHelped
Add more self-attention layersMasked hard-attention transformers · Languages over Σ+expressive powerHelped

Surprising findings

Limitations

Experimental setup

Baselines: hao-etal-2022-formal barcelo-etal-2023 perez-etal-2021-turing

Builds on: RASP LTL Krohn-Rhodes decomposition hao-etal-2022-formal

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