[Paper Review] The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectives
This paper investigates how training objectives—machine translation (MT), left-to-right language modeling (LM), and masked language modeling (MLM)—shape the evolution of token representations in Transformers. Using canonical correlation analysis and mutual information estimation, it reveals that LM layers progressively lose past context while forming future predictions, whereas MLM layers first generalize by forgetting token identity before reconstructing it at higher layers, explaining MLM's superior pretraining performance.
We seek to understand how the representations of individual tokens and the structure of the learned feature space evolve between layers in deep neural networks under different learning objectives. We focus on the Transformers for our analysis as they have been shown effective on various tasks, including machine translation (MT), standard left-to-right language models (LM) and masked language modeling (MLM). Previous work used black-box probing tasks to show that the representations learned by the Transformer differ significantly depending on the objective. In this work, we use canonical correlation analysis and mutual information estimators to study how information flows across Transformer layers and how this process depends on the choice of learning objective. For example, as you go from bottom to top layers, information about the past in left-to-right language models gets vanished and predictions about the future get formed. In contrast, for MLM, representations initially acquire information about the context around the token, partially forgetting the token identity and producing a more generalized token representation. The token identity then gets recreated at the top MLM layers.
Motivation & Objective
- To understand how learning objectives shape the evolution of token representations across Transformer layers.
- To investigate the information flow dynamics between layers under different objectives (MT, LM, MLM).
- To explain why masked language modeling (MLM) outperforms left-to-right language modeling (LM) in pretraining, based on representation evolution.
- To analyze how representations encode and forget information about token identity, context, position, and syntax across layers.
Proposed method
- Employs mutual information estimation to measure how much token identity and output labels are preserved in representations at each layer.
- Uses canonical correlation analysis (CCA) to quantify the degree of influence between representations of different tokens and the extent of representation transformation across layers.
- Measures the importance of neighboring tokens, positions, and CCG supertags for each representation using similarity-based analysis.
- Compares representation evolution across three objectives—MT, LM, and MLM—while keeping model architecture and data fixed.
- Applies t-SNE visualization to examine spatial reordering of token representations (e.g., 'is') based on CCG tags across layers.
- Analyzes information compression and prediction trade-offs in representations from a bottleneck learning perspective.
Experimental results
Research questions
- RQ1How does the representation of a token evolve across layers under different training objectives (MT, LM, MLM)?
- RQ2What type of information (e.g., token identity, context, syntax) is preserved, lost, or acquired during this evolution?
- RQ3Why does masked language modeling (MLM) lead to better pretraining performance than left-to-right language modeling (LM), despite similar architectures?
- RQ4How do interactions between tokens change across layers, and how do they differ by objective?
- RQ5To what extent do representations encode information about past versus future context in different objectives?
Key findings
- In left-to-right language models (LM), information about the past is progressively lost from bottom to top layers, while representations increasingly encode predictions about future tokens.
- For masked language modeling (MLM), representations initially forget the token identity and generalize by encoding contextual information, only reconstructing the identity at higher layers.
- Canonical correlation analysis shows that representations in MLM models undergo significant transformation, with strong inter-layer influence, especially in early layers where context is encoded.
- The importance of neighboring tokens increases in MLM up to the second layer, then decreases, indicating a two-stage process of context encoding and token reconstruction.
- CCG supertag importance degrades in higher layers for both LM and MLM, but the pattern differs: LM accumulates syntactic structure of the past, while MLM focuses on context before reconstruction.
- t-SNE visualization confirms that representations of the same word (e.g., 'is') are reordered across layers based on syntactic structure (CCG tags), with distinct clustering patterns emerging in MLM and LM.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.