Transformers with Learnable Activation Functions

要約

アクティベーション関数は、入力データのトポロジの複雑さを軽減することに大きな影響を与える可能性があるため、モデルのパフォーマンスが向上します。
適切な活性化関数を選択することは、ニューラル モデルの設計における重要なステップです。
ただし、アクティベーション関数の選択は、Transformer ベースの言語モデルで議論または調査されることはほとんどありません。
それらの活性化関数は事前に選択され、事前トレーニングから微調整まで固定されたままです。
その結果、彼らがモデルに課した誘導バイアスは、この長いライフ サイクルの間は調整できません。
さらに、その後開発されたモデル (RoBERTa、BART、GPT-3 など) は、以前の研究 (BERT など) をフォローアップして、正当な理由なく同じアクティベーション関数を使用することがよくあります。
このホワイト ペーパーでは、Transformer アーキテクチャで学習可能な活性化関数である Rational Activation Function (RAF) を使用することの有効性を調査します。
従来の事前定義された活性化関数とは対照的に、RAF は入力データに従ってトレーニング中に最適な活性化関数を適応的に学習できます。
私たちの実験では、RAF ベースのトランスフォーマー (RAFT) が、GELU 関数を使用した通常の BERT よりも低い検証の難問を達成することが示されています。
さらに、低データおよび完全データ設定でのダウンストリーム タスクで RAFT を評価します。
私たちの結果は、RAFT が大部分のタスクと設定で対応するモデルよりも優れていることを示しています。
たとえば、RAFT は、低データ シナリオ (100 のトレーニング例が利用可能) で平均 5.71 ポイント、フルデータ設定の SQuAD で GLUE ベンチマークでバニラ BERT よりも 2.05 ポイント優れています。
学習した RAF の形状を分析すると、それらが事前トレーニング済みモデルの異なるレイヤー間で大幅に異なり、ほとんどが従来のアクティベーション関数とは大きく異なることが明らかになりました。
RAFT は、学習済みの活性化関数に従って事前トレーニング済みモデルを分析および解釈するための新しい研究方向を開きます。

要約(オリジナル)

Activation functions can have a significant impact on reducing the topological complexity of input data and therefore improve the performance of the model. Selecting a suitable activation function is an essential step in neural model design. However, the choice of activation function is seldom discussed or explored in Transformer-based language models. Their activation functions are chosen beforehand and then remain fixed from pre-training to fine-tuning. As a result, the inductive biases they imposed on models cannot be adjusted during this long life cycle. Moreover, subsequently developed models (e.g., RoBERTa, BART, and GPT-3) often follow up prior work (e.g., BERT) to use the same activation function without justification. In this paper, we investigate the effectiveness of using Rational Activation Function (RAF), a learnable activation function, in the Transformer architecture. In contrast to conventional, predefined activation functions, RAFs can adaptively learn optimal activation functions during training according to input data. Our experiments show the RAF-based Transformer (RAFT) achieves a lower validation perplexity than a vanilla BERT with the GELU function. We further evaluate RAFT on downstream tasks in low- and full-data settings. Our results show that RAFT outperforms the counterpart model across the majority of tasks and settings. For instance, RAFT outperforms vanilla BERT on the GLUE benchmark by 5.71 points on average in low-data scenario (where 100 training examples are available) and by 2.05 points on SQuAD in full-data setting. Analysis of the shapes of learned RAFs further unveils that they substantially vary between different layers of the pre-trained model and mostly look very different from conventional activation functions. RAFT opens a new research direction for analyzing and interpreting pre-trained models according to the learned activation functions.

arxiv情報

著者 Haishuo Fang,Ji-Ung Lee,Nafise Sadat Moosavi,Iryna Gurevych
発行日 2023-02-14 13:06:16+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク