Optimal inference of a generalised Potts model by single-layer transformers with factored attention

要約

タイトル:ファクトアテンションを備えた単一レイヤートランスフォーマーによる一般化Pottsモデルの最適推論

要約:

– トランスフォーマーは、自己注意と呼ばれるメカニズムを使用するニューラルネットワークの一種であり、自然言語処理やタンパク質科学に革命をもたらした。
– トランスフォーマーの自己注意は、文中の欠損した単語を予測するために訓練されているが、このメカニズムがデータからどのように学習するかについては不明な点が残っている。
– この研究では、場所とPotts色の相互作用を持つ一般化Pottsモデルからのデータについて、トランスフォーマーを解析的・数値的に特徴づける。通常のトランスフォーマーでは、この分布を学習するには数層必要だが、ファクトアテンションを備えた単一層の自己注意が、無限サンプリングの極限でPottsモデルを正確に学習できることを解析的に示す。
– この研究では、「ファクトアテンション」と呼ばれるこの修正された自己注意が、他のスピンが与えられたときのPottsスピンの条件付き確率と同じ機能形を持つことを示し、統計物理学のレプリカ法を使用してその一般化誤差を計算し、逆Ising問題やPotts問題を解決するための疑似尤度法への正確なマッピングを導出する。

要約(オリジナル)

Transformers are the type of neural networks that has revolutionised natural language processing and protein science. Their key building block is a mechanism called self-attention which is trained to predict missing words in sentences. Despite the practical success of transformers in applications it remains unclear what self-attention learns from data, and how. Here, we give a precise analytical and numerical characterisation of transformers trained on data drawn from a generalised Potts model with interactions between sites and Potts colours. While an off-the-shelf transformer requires several layers to learn this distribution, we show analytically that a single layer of self-attention with a small modification can learn the Potts model exactly in the limit of infinite sampling. We show that this modified self-attention, that we call “factored”, has the same functional form as the conditional probability of a Potts spin given the other spins, compute its generalisation error using the replica method from statistical physics, and derive an exact mapping to pseudo-likelihood methods for solving the inverse Ising and Potts problem.

arxiv情報

著者 Riccardo Rende,Federica Gerace,Alessandro Laio,Sebastian Goldt
発行日 2023-04-14 16:32:56+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, OpenAI

カテゴリー: cond-mat.dis-nn, cond-mat.stat-mech, cs.CL, stat.ML パーマリンク