Doc 1 Pg 1 Ln 1 Pos 1

================================================================================

[June 16, 2025]

How Language Models Do Math: With a Corkscrew Wristwatch, Apparently

* * *

I am a highly visual spatial thinker. Turns out language models are too.

Researchers at Berkley recently figured out language models add numbers visually - using a corkscrew calculator wristwatch.

A traditional computer is designed to add a + b using patterns with 1s and 0s.

A language model isn't explicitly designed to solve a + b, but it tries anyway - with maddeningly varied degrees of success.

So what is a language model actually doing when it adds a + b?

It creates its own calculator - a clock face.

Imagine you designed a wristwatch to help you do simple math with the numbers 0-9 around the dial.

Now you want to solve 2 + 3.

You point to the 2 then count up by 3, landing at 5 - the correct answer.

Then say you designed a new 'diver' model of your watch with the numbers on a rotating bezel.

Now when you want to add 2 + 3, you rotate the bezel to align the 2 at the 'noon' position, then rotate it again three times, then you see the 5 in the noon position. Again, the correct answer.

This is how a language model does math.

But what about 12+15? This is where it gets interesting.

Imagine 0-9 (in the ones position) is still around your clock face. But where do the 0-9 in the tens position go?

You designed a new model of your watch with a three-dimensional rotating bezel that looks like a metal spring that sits on top of your watch face - like you're wearing a corkscrew on your wrist.

Looking directly at your watch, it looks like a regular 2D watch face with the 0-9s in the ones position displayed clockwise and the 0-9 in the tens position extending up the corkscrew toward your face.

So when you look at your watch and add 2 + 13, you again rotate the bezel. But now, your corkscrew bezel rotates in three dimensions. 

You start with the 2 and rotate it 13 times to get to 15, the correct answer. (Never mind if the cork screw would go into your wrist).

Corkscrew Math
[Figure 1: Screwy math.]
How about numbers in the 100s position. Well, we're still not sure exactly. Maybe your corkscrew rotates in its own corkscrew in a fourth dimension. The wildest part? We didn't program language models to think this way. We asked it to do math and it came up with its own abacus. But is it accurate? Eh, kinda. It's still a language model, which is still a slot machine for words. So are language models bad at math? Sort of. Turns out their brains are visual, like mine, and, for me, that means whipping my trusty HP12c to do math. For them, they show up with a bonkers corkscrew calculator wristwatch.
  [Subscribe to more posts like this]
  
  
    
================================================================================