LessWrong (30+ Karma)

“Language Models Use Trigonometry to Do Addition” by Subhash Kantamneni


Listen Later

Audio note: this article contains 182 uses of latex notation, so the narration may be difficult to follow. There's a link to the original text in the episode description.

I (Subhash) am a Masters student in the Tegmark AI Safety Lab at MIT. I am interested in recruiting for full time roles this Spring - please reach out if you're interested in working together!

TLDR 

This blog post accompanies the paper "Language Models Use Trigonometry to Do Addition." Key findings:

  • We show that LLMs represent numbers on a helix
    • This helix has circular features (sines and cosines) with periods _T = [2,5,10,100]_ and a linear component
  • To solve _a+b_, we claim that LLMs manipulate the helix for _a_ and _b_ to create the helix for _a+b_ using a form of the Clock algorithm introduced by Nanda, et al.
    • This is conceptually akin to going from _cos(a), cos(b)_ to _cos(a+b)_
    • Intuitively, it's like adding angles on a [...]

---

Outline:

(00:30) TLDR

(01:28) Motivation and Problem Setting

(02:18) LLMs Represent Numbers on a Helix

(02:23) Investigating the Structure of Numbers

(02:48) Periodicity

(03:49) Linearity

(04:39) Parameterizing Numbers as a Helix

(05:39) Fitting a Helix

(07:12) Evaluating the Helical Fit

(08:57) Relation to the Linear Representation Hypothesis

(10:28) Is the helix the full story?

(12:15) LLMs Use the Clock Algorithm to Compute Addition

(14:23) Understanding MLPs

(16:24) Zooming in on Neurons

(17:07) Modeling Neuron Preactivations

(18:53) Understanding MLP Inputs

(20:34) Interpreting Model Errors

(24:11) Limitations

(25:49) Conclusion

The original text contained 9 footnotes which were omitted from this narration.

---

First published:

February 5th, 2025

Source:

https://www.lesswrong.com/posts/E7z89FKLsHk5DkmDL/language-models-use-trigonometry-to-do-addition-1

---

Narrated by TYPE III AUDIO.

---

Images from the article:

Apple Podcasts and Spotify do not show images in the episode description. Try Pocket Casts, or another podcast app.

...more
View all episodesView all episodes
Download on the App Store

LessWrong (30+ Karma)By LessWrong


More shows like LessWrong (30+ Karma)

View all
Making Sense with Sam Harris by Sam Harris

Making Sense with Sam Harris

26,337 Listeners

Conversations with Tyler by Mercatus Center at George Mason University

Conversations with Tyler

2,442 Listeners

The Peter Attia Drive by Peter Attia, MD

The Peter Attia Drive

9,188 Listeners

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas by Sean Carroll | Wondery

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas

4,152 Listeners

ManifoldOne by Steve Hsu

ManifoldOne

92 Listeners

Your Undivided Attention by The Center for Humane Technology, Tristan Harris, Daniel Barcay and Aza Raskin

Your Undivided Attention

1,603 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

9,899 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

95 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

502 Listeners

Hard Fork by The New York Times

Hard Fork

5,470 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

16,097 Listeners

Moonshots with Peter Diamandis by PHD Ventures

Moonshots with Peter Diamandis

539 Listeners

No Priors: Artificial Intelligence | Technology | Startups by Conviction

No Priors: Artificial Intelligence | Technology | Startups

133 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

95 Listeners

BG2Pod with Brad Gerstner and Bill Gurley by BG2Pod

BG2Pod with Brad Gerstner and Bill Gurley

514 Listeners