Nonparametric Variational Regularisation of Pretrained Transformers

Fabio Fehr, James Henderson
12/1/2023
3 citations
cs.LGcs.CL
transformer-attention

No official code found. Best implementation: idiap/nvr_transformers (1 star, Python, last commit 2025-04-11).

Abstract

The current paradigm of large-scale pre-training and fine-tuning Transformer large language models has lead to significant improvements across the board in natural language processing. However, such large models are susceptible to overfitting to their training data, and as a result the models perform poorly when the domain changes.

Show full abstract

Also, due to the model's scale, the cost of fine-tuning the model to the new domain is large. Nonparametric Variational Information Bottleneck (NVIB) has been proposed as a regulariser for training cross-attention in Transformers, potentially addressing the overfitting problem. We extend the NVIB framework to replace all types of attention functions in Transformers, and show that existing pretrained Transformers can be reinterpreted as Nonparametric Variational (NV) models using a proposed identity initialisation. We then show that changing the initialisation introduces a novel, information-theoretic post-training regularisation in the attention mechanism, which improves out-of-domain generalisation without any training. This success supports the hypothesis that pretrained Transformers are implicitly NV Bayesian models.

View on arXivView PDF

Code Implementations(1)

Code developed for the paper Nonparametric Variational Regularisation of Pretrained Transformers (COLM2024)

10PythonAug 9, 20241 years ago

Similar Papers

Cite this paper

@article{fehr2023nonparametric,
  title  = {Nonparametric Variational Regularisation of Pretrained Transformers},
  author = {Fabio Fehr and James Henderson},
  year   = {2023},
  eprint = {2312.00662},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.00662v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.00662.svg)](https://codeofpaper.com/paper/2312.00662)

Discussion