Neural nets learn modular addition via a 'pizza algorithm' distinct from the 'clock', with phase transitions

burny_tech · x · 2026-12-02

Ziming Liu (MIT, KAN author) reports new interpretability findings: when networks learn modular addition, besides Neel Nanda's well-known 'clock algorithm' (tokens embedded on a circle, angle sum via multiplication), a distinct 'pizza algorithm' can emerge — averaging the two embedding vectors, then applying nonlinearities, with predictions spread over two slices of the circle. Plots show attention rate, gradient symmetricity and distance irrelevance separate the two mechanisms, and phase transitions can occur between pizza and clock solutions.

Original post →

More from Research

Research channel →