Skip to yearly menu bar Skip to main content

Workshop: MATH-AI: Toward Human-Level Mathematical Reasoning

What is my math transformer doing? Three results on interpretability and generalization

Francois Charton


We investigate the failure cases and out-of-distribution behavior of transformers trained on matrix inversion, eigen decomposition and eigenvalue calculation. We show that incorrect model predictions still retain deep mathematical properties of the solution (e.g. correct eigenvalues, unit norm of eigenvectors), and that almost all model failures can be attributed to, and predicted from, properties of the problem or solution. This demonstrates that, when in doubt, math transformers do not hallucinate crazy solutions (as was sometimes proposed) but remain roughly right''. We also show that the careful choice of a training dataset can accelerate training, while allowing the model to generalize way out of its training distribution, invalidating the idea that transformersmerely interpolate'' from memorized examples.

Chat is not available.