The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks

Ziqian Zhong, Ziming Liu, Max Tegmark, Jacob Andreas
6/30/2023
cs.LG

Official code: fjzzq2002/pizza (20 stars, MIT, last commit 2023-11-24).

Abstract

Do neural networks, trained on well-understood algorithmic tasks, reliably rediscover known algorithms for solving those tasks? Several recent studies, on tasks ranging from group arithmetic to in-context linear regression, have suggested that the answer is yes. Using modular addition as a prototypical problem, we show that algorithm discovery in neural networks is sometimes more complex. Small changes to model hyperparameters and initializations can induce the discovery of qualitatively different algorithms from a fixed training set, and even parallel implementations of multiple such algorithms. Some networks trained to perform modular addition implement a familiar Clock algorithm; others implement a previously undescribed, less intuitive, but comprehensible procedure which we term the Pizza algorithm, or a variety of even more complex procedures. Our results show that even simple learning problems can admit a surprising diversity of solutions, motivating the development of new tools for characterizing the behavior of neural networks across their algorithmic phase space.

View on arXivView PDF

Code Implementations(1)

fjzzq2002/pizzaOfficial100%
MIT

Code repository for "The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks"

206Python, Jupyter NotebookOct 26, 20232 years agoMIT

Similar Papers

Cite this paper

@article{zhong2023clock,
  title  = {The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networks},
  author = {Ziqian Zhong and Ziming Liu and Max Tegmark and Jacob Andreas},
  year   = {2023},
  eprint = {2306.17844},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.17844v2},
  journal = {NEURIPS 2023 2023}
}

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/2306.17844.svg)](https://codeofpaper.com/paper/2306.17844)

Discussion