Transformers can learn to perform numerical computations from examples only. I study nine problems of linear algebra, from basic matrix operations to eigenvalue decomposition and inversion, and introduce and discuss four encoding schemes to represent real numbers. On all problems, transformers trained on sets of random matrices achieve high accuracies (over 90%). The models are robust to noise, and can generalize out of their training distribution. In particular, models trained to predict Laplace-distributed eigenvalues generalize to different classes of matrices: Wigner matrices or matrices with positive eigenvalues. The reverse is not true.
Linear algebra with transformers
Transformers can accurately perform a variety of linear algebra tasks using different encoding schemes, demonstrating robustness to noise and the ability to generalize beyond their training data distribution.
- Year
- 2021
- Venue
- arXiv 2021
- Authors
- 1
- Hosting
- Abstract onlyARXIV-DEFAULT
Cite
Notes
Only stored in your browser.
Attribution
- Abstract & full text
- arxiv.org/abs/2112.01898v2ARXIV-DEFAULT
- TL;DR
- Semantic Scholar