Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformers

Andy Yang, David Chiang
4/5/2024
cs.LOcs.CLcs.FL

No confident code implementation found for this paper.

Abstract

Deriving formal bounds on the expressivity of transformers, as well as studying transformers that are constructed to implement known algorithms, are both effective methods for better understanding the computational power of transformers. Towards both ends, we introduce the temporal counting logic $\textsf{K}_\text{t}$[#] alongside the RASP variant $\textsf{C-RASP}$. We show they are equivalent to each other, and that together they are the best-known lower bound on the formal expressivity of future-masked soft attention transformers with unbounded input size. We prove this by showing all $\textsf{K}_\text{t}$[#] formulas can be compiled into these transformers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yang2024counting,
  title  = {Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformers},
  author = {Andy Yang and David Chiang},
  year   = {2024},
  eprint = {2404.04393},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.04393v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.04393.svg)](https://codeofpaper.com/paper/2404.04393)

Discussion