Tracing and Manipulating intermediate values in Neural Math Problem Solvers

Yuta Matsumoto, Benjamin Heinzerling, Masashi Yoshikawa, Kentaro Inui


Abstract
How language models process complex input that requires multiple steps of inference is not well understood. Previous research has shown that information about intermediate values of these inputs can be extracted from the activations of the models, but it is unclear where that information is encoded and whether that information is indeed used during inference. We introduce a method for analyzing how a Transformer model processes these inputs by focusing on simple arithmetic problems and their intermediate values. To trace where information about intermediate values is encoded, we measure the correlation between intermediate values and the activations of the model using principal component analysis (PCA). Then, we perform a causal intervention by manipulating model weights. This intervention shows that the weights identified via tracing are not merely correlated with intermediate values, but causally related to model predictions. Our findings show that the model has a locality to certain intermediate values, and this is useful for enhancing the interpretability of the models.
Anthology ID:
2022.mathnlp-1.1
Volume:
Proceedings of the 1st Workshop on Mathematical Natural Language Processing (MathNLP)
Month:
December
Year:
2022
Address:
Abu Dhabi, United Arab Emirates (Hybrid)
Editors:
Deborah Ferreira, Marco Valentino, Andre Freitas, Sean Welleck, Moritz Schubotz
Venue:
MathNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1–6
Language:
URL:
https://aclanthology.org/2022.mathnlp-1.1
DOI:
10.18653/v1/2022.mathnlp-1.1
Bibkey:
Cite (ACL):
Yuta Matsumoto, Benjamin Heinzerling, Masashi Yoshikawa, and Kentaro Inui. 2022. Tracing and Manipulating intermediate values in Neural Math Problem Solvers. In Proceedings of the 1st Workshop on Mathematical Natural Language Processing (MathNLP), pages 1–6, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics.
Cite (Informal):
Tracing and Manipulating intermediate values in Neural Math Problem Solvers (Matsumoto et al., MathNLP 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.mathnlp-1.1.pdf
Video:
 https://aclanthology.org/2022.mathnlp-1.1.mp4