Transformers Learn Low Sensitivity Functions: Investigations and Implications

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Vasudeva, Bhavya, Fu, Deqing, Zhou, Tianyi, Kau, Elliott, Huang, Youqi, Sharan, Vatsal
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909491551797248
author Vasudeva, Bhavya
Fu, Deqing
Zhou, Tianyi
Kau, Elliott
Huang, Youqi
Sharan, Vatsal
author_facet Vasudeva, Bhavya
Fu, Deqing
Zhou, Tianyi
Kau, Elliott
Huang, Youqi
Sharan, Vatsal
contents Transformers achieve state-of-the-art accuracy and robustness across many tasks, but an understanding of their inductive biases and how those biases differ from other neural network architectures remains elusive. In this work, we identify the sensitivity of the model to token-wise random perturbations in the input as a unified metric which explains the inductive bias of transformers across different data modalities and distinguishes them from other architectures. We show that transformers have lower sensitivity than MLPs, CNNs, ConvMixers and LSTMs, across both vision and language tasks. We also show that this low-sensitivity bias has important implications: i) lower sensitivity correlates with improved robustness; it can also be used as an efficient intervention to further improve the robustness of transformers; ii) it corresponds to flatter minima in the loss landscape; and iii) it can serve as a progress measure for grokking. We support these findings with theoretical results showing (weak) spectral bias of transformers in the NTK regime, and improved robustness due to the lower sensitivity. The code is available at https://github.com/estija/sensitivity.
format Preprint
id arxiv_https___arxiv_org_abs_2403_06925
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Transformers Learn Low Sensitivity Functions: Investigations and Implications
Vasudeva, Bhavya
Fu, Deqing
Zhou, Tianyi
Kau, Elliott
Huang, Youqi
Sharan, Vatsal
Machine Learning
Artificial Intelligence
Computation and Language
Transformers achieve state-of-the-art accuracy and robustness across many tasks, but an understanding of their inductive biases and how those biases differ from other neural network architectures remains elusive. In this work, we identify the sensitivity of the model to token-wise random perturbations in the input as a unified metric which explains the inductive bias of transformers across different data modalities and distinguishes them from other architectures. We show that transformers have lower sensitivity than MLPs, CNNs, ConvMixers and LSTMs, across both vision and language tasks. We also show that this low-sensitivity bias has important implications: i) lower sensitivity correlates with improved robustness; it can also be used as an efficient intervention to further improve the robustness of transformers; ii) it corresponds to flatter minima in the loss landscape; and iii) it can serve as a progress measure for grokking. We support these findings with theoretical results showing (weak) spectral bias of transformers in the NTK regime, and improved robustness due to the lower sensitivity. The code is available at https://github.com/estija/sensitivity.
title Transformers Learn Low Sensitivity Functions: Investigations and Implications
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2403.06925