Uppsats
Impact of encodings on the performance and mechanistic interpretability of MLPs trained on arithmetic
Kandidat-uppsats
KTH/Skolan för elektroteknik och datavetenskap (EECS)
Publicerad: 2024
Språk: Engelska
Sammanfattning
This study investigates if different number encodings increases the performance of multilayer perceptrons on mathematical operations. We then analyze the cause of the performance difference through mechanistic interpretability; reverse-engineering our simpler networks and extrapolating our insights to our more advanced. We trained networks on the elementary arithmetic operations (addition, subtraction, multiplication, and division) and the continuous, one-hot, binary, and distributed encodings. We also varied the network architectures and hyperparameters; systematically testing different layer depths and widths. We find that choosing the right encoding allows for higher accuracy, increased interpretability, and quicker training which reduces the compute requirements. Our results show that the continuous encoding is the optimal encoding for our domain, which was not surprising since it is the native number representation for our networks, and numbers is an ordinal domain. The networks learn the operations addition and subtraction quite easily, but struggle with the more advanced operations multiplication and division. We use our fully explained simplest networks for addition and subtraction to show why they are easier to learn, and theoretical insights as to why multiplication and division are harder. Future work can expand on our four encodings and more advanced network architectures, such as integrating it into transformers; the current state-of-the-art generalist models. They could also use interpretability tools to inspect how more complex networks learn the operations.
Information
- Författare
- Edgren, Elias, Elg, Marcus
- Lärosäte / institution
- KTH/Skolan för elektroteknik och datavetenskap (EECS)
- Publiceringsdatum
- 2024
- Uppsatstyp
- Kandidat-uppsats
- Språk
- Engelska