Logo del repository
  1. Home
 
Opzioni

Mapping of attention mechanisms to a generalized Potts model

Rende, Riccardo
•
Gerace, Federica
•
Laio, Alessandro
•
Goldt, Sebastian
2024
  • journal article

Periodico
PHYSICAL REVIEW RESEARCH
Abstract
Transformers are neural networks that revolutionized natural language processing and machine learning. They process sequences of inputs, like words, using a mechanism called self-attention, which is trained via masked language modeling (MLM). In MLM, a word is randomly masked in an input sequence, and the network is trained to predict the missing word. Despite the practical success of transformers, it remains unclear what type of data distribution self-attention can learn efficiently. Here, we show analytically that if one decouples the treatment of word positions and embeddings, a single layer of self-attention learns the conditionals of a generalized Potts model with interactions between sites and Potts colors. Moreover, we show that training this neural network is exactly equivalent to solving the inverse Potts problem by the so-called pseudolikelihood method, well known in statistical physics. Using this mapping, we compute the generalization error of self-attention in a model scenario analytically using the replica method.
DOI
10.1103/physrevresearch.6.023057
WOS
WOS:001276240700001
Archivio
https://hdl.handle.net/20.500.11767/143211
info:eu-repo/semantics/altIdentifier/scopus/2-s2.0-85190841220
https://arxiv.org/abs/2304.07235
https://ricerca.unityfvg.it/handle/20.500.11767/143211
Diritti
open access
Soggetti
  • Settore PHYS-06/A - F...

  • Settore PHYS-04/A - F...

google-scholar
Get Involved!
  • Source Code
  • Documentation
  • Slack Channel
Make it your own

DSpace-CRIS can be extensively configured to meet your needs. Decide which information need to be collected and available with fine-grained security. Start updating the theme to match your nstitution's web identity.

Need professional help?

The original creators of DSpace-CRIS at 4Science can take your project to the next level, get in touch!

Realizzato con Software DSpace-CRIS - Estensione mantenuta e ottimizzata da 4Science

  • Impostazioni dei cookie
  • Informativa sulla privacy
  • Accordo con l'utente finale
  • Invia il tuo Feedback