Fine-Tuned Transformers Show Clusters of Similar Representations Across
Layers
- URL: http://arxiv.org/abs/2109.08406v2
- Date: Mon, 20 Sep 2021 17:21:18 GMT
- Title: Fine-Tuned Transformers Show Clusters of Similar Representations Across
Layers
- Abstract summary: We use centered kernel alignment (CKA) to measure the similarity of representations in task-tuned models across layers.
In experiments across twelve NLU tasks, we discover a consistent block diagonal structure in the similarity of representations within fine-tuned RoBERTa and ALBERT models.
We verify in experiments that the top few layers of fine-tuned Transformers can be discarded without hurting performance, even with no further tuning.
- Score: 27.68150225442148
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Despite the success of fine-tuning pretrained language encoders like BERT for
downstream natural language understanding (NLU) tasks, it is still poorly
understood how neural networks change after fine-tuning. In this work, we use
centered kernel alignment (CKA), a method for comparing learned
representations, to measure the similarity of representations in task-tuned
models across layers. In experiments across twelve NLU tasks, we discover a
consistent block diagonal structure in the similarity of representations within
fine-tuned RoBERTa and ALBERT models, with strong similarity within clusters of
earlier and later layers, but not between them. The similarity of later layer
representations implies that later layers only marginally contribute to task
performance, and we verify in experiments that the top few layers of fine-tuned
Transformers can be discarded without hurting performance, even with no further
tuning.
Related papers
- SimReg: Achieving Higher Performance in the Pretraining via Embedding Similarity Regularization [55.63565289584336]
SimReg is an embedding similarity regularization loss that explicitly encourages token representations with the same ground-truth label within each sequence to be more similar.<n>Our analysis reveals that this mechanism introduces gains by enlarging multi-classification margins, thereby enabling more efficient classification.
arXiv Detail & Related papers (2026-05-09T08:59:13Z) - Low-latency vision transformers via large-scale multi-head attention [0.0]
A learning mechanism is generalized to large-scale MHA (LS-MHA) using a single matrix value representing single-head performance.<n>Several distinct vision transformer (ViT) architectures achieve the same accuracy but differ in their LS-MHA structures.<n>The extension of this learning mechanism to natural language processing tasks has the potential to yield new insights in deep learning.
arXiv Detail & Related papers (2025-06-30T13:23:46Z) - Characterization of topological structures in different neural network architectures [0.0]
We develop methods for analyzing representations from different architectures and check how one should use them to obtain valid results.
We applied these methods for ResNet, VGG19, and ViT architectures and found substantial differences along with some similarities.
arXiv Detail & Related papers (2024-07-08T18:02:18Z) - On Layer-wise Representation Similarity: Application for Multi-Exit Models with a Single Classifier [20.17288970927518]
We study the similarity of representations between the hidden layers of individual transformers.
We propose an aligned training approach to enhance the similarity between internal representations.
arXiv Detail & Related papers (2024-06-20T16:41:09Z) - Visual Prompt Tuning in Null Space for Continual Learning [51.96411454304625]
Existing prompt-tuning methods have demonstrated impressive performances in continual learning (CL)
This paper aims to learn each task by tuning the prompts in the direction orthogonal to the subspace spanned by previous tasks' features.
In practice, an effective null-space-based approximation solution has been proposed to implement the prompt gradient projection.
arXiv Detail & Related papers (2024-06-09T05:57:40Z) - WLD-Reg: A Data-dependent Within-layer Diversity Regularizer [98.78384185493624]
Neural networks are composed of multiple layers arranged in a hierarchical structure jointly trained with a gradient-based optimization.
We propose to complement this traditional 'between-layer' feedback with additional 'within-layer' feedback to encourage the diversity of the activations within the same layer.
We present an extensive empirical study confirming that the proposed approach enhances the performance of several state-of-the-art neural network models in multiple tasks.
arXiv Detail & Related papers (2023-01-03T20:57:22Z) - HyPe: Better Pre-trained Language Model Fine-tuning with Hidden
Representation Perturbation [50.90457644954857]
We propose HyPe, a simple yet effective fine-tuning technique to alleviate problems by perturbing hidden representations of Transformers layers.
We conduct extensive experiments and analyses on GLUE and other natural language inference datasets.
Results demonstrate that HyPe outperforms vanilla fine-tuning and enhances generalization of hidden representations from different layers.
arXiv Detail & Related papers (2022-12-17T11:56:21Z) - Self-Distilled Self-Supervised Representation Learning [35.60243157730165]
State-of-the-art frameworks in self-supervised learning have recently shown that fully utilizing transformer-based models can lead to performance boost.
In our work, we further exploit this by allowing the intermediate representations to learn from the final layers via the contrastive loss.
Our method, Self-Distilled Self-Supervised Learning (SDSSL), outperforms competitive baselines (SimCLR, BYOL and MoCo v3) using ViT on various tasks and datasets.
arXiv Detail & Related papers (2021-11-25T07:52:36Z) - Similarity and Matching of Neural Network Representations [0.0]
We employ a toolset -- dubbed Dr. Frankenstein -- to analyse the similarity of representations in deep neural networks.
We aim to match the activations on given layers of two trained neural networks by joining them with a stitching layer.
arXiv Detail & Related papers (2021-10-27T17:59:46Z) - Layer Reduction: Accelerating Conformer-Based Self-Supervised Model via
Layer Consistency [31.572652956170252]
Transformer-based self-supervised models are trained as feature extractors and have empowered many downstream speech tasks to achieve state-of-the-art performance.
We experimentally achieve 7.8X parameter reduction, 41.9% training speedup and 37.7% inference speedup while maintaining comparable performance with conventional BERT-like self-supervised methods.
arXiv Detail & Related papers (2021-04-08T08:21:59Z) - IOT: Instance-wise Layer Reordering for Transformer Structures [173.39918590438245]
We break the assumption of the fixed layer order in the Transformer and introduce instance-wise layer reordering into the model structure.
Our method can also be applied to other architectures beyond Transformer.
arXiv Detail & Related papers (2021-03-05T03:44:42Z) - Going beyond p-convolutions to learn grayscale morphological operators [64.38361575778237]
We present two new morphological layers based on the same principle as the p-convolutional layer.
In this work, we present two new morphological layers based on the same principle as the p-convolutional layer.
arXiv Detail & Related papers (2021-02-19T17:22:16Z) - Train your classifier first: Cascade Neural Networks Training from upper
layers to lower layers [54.47911829539919]
We develop a novel top-down training method which can be viewed as an algorithm for searching for high-quality classifiers.
We tested this method on automatic speech recognition (ASR) tasks and language modelling tasks.
The proposed method consistently improves recurrent neural network ASR models on Wall Street Journal, self-attention ASR models on Switchboard, and AWD-LSTM language models on WikiText-2.
arXiv Detail & Related papers (2021-02-09T08:19:49Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.