Complexity of Symbolic Representation in Working Memory of Transformer Correlates with the Complexity of a Task
Alsu Sagirova, Mikhail Burtsev
TL;DR
The paper addresses the lack of explicit memory in standard Transformer architectures by introducing symbolic working memory in the decoder to store contextual knowledge as interpretable memory tokens. The proposed method interleaves memory tokens with target predictions, using a fixed memory size of $M=10$ and a final layer enlarged to $target\_vocabulary\_size+2$ to distinguish memory from target tokens, with memory reading via conventional attention. Across four Russian-to-English MT datasets of varying complexity, the approach improves translation quality and enables analysis of memory content, showing that memory stores keywords and content words, and that memory diversity correlates with task difficulty while shrinking with fine-tuning. Overall, the work demonstrates a neuro-symbolic, interpretable memory mechanism that enhances translation performance and provides insight into model decision-making, potentially aiding debugging and domain adaptation efforts.
Abstract
Even though Transformers are extensively used for Natural Language Processing tasks, especially for machine translation, they lack an explicit memory to store key concepts of processed texts. This paper explores the properties of the content of symbolic working memory added to the Transformer model decoder. Such working memory enhances the quality of model predictions in machine translation task and works as a neural-symbolic representation of information that is important for the model to make correct translations. The study of memory content revealed that translated text keywords are stored in the working memory, pointing to the relevance of memory content to the processed text. Also, the diversity of tokens and parts of speech stored in memory correlates with the complexity of the corpora for machine translation task.
