Skip to main content
QUICK REVIEW

[論文レビュー] Transformers meet Neural Algorithmic Reasoners

Wilfried Bounsi, Borja Ibarz|arXiv (Cornell University)|Jun 13, 2024
Neural Networks and ApplicationsComputer Science被引用数 3
ひとこと要約

本稿では、事前学習済みのグラフニューラルネットワークベースのニューラルアルゴリズムリーダー(NAR)とTransformerを統合するハイブリッドモデル、TransNARを提案する。2段階の訓練手順により、TransformerのトークンとNARのノード埋め込みの間でクロスアテンションを可能にすることで、CLRS-Textベンチマークにおける分布外一般化性能が著しく向上し、特に形状スコアおよびCLRSスコアで20%以上の絶対的向上を達成した。これは、純粋なTransformerモデルを上回る結果である。

ABSTRACT

Transformers have revolutionized machine learning with their simple yet effective architecture. Pre-training Transformers on massive text datasets from the Internet has led to unmatched generalization for natural language understanding (NLU) tasks. However, such language models remain fragile when tasked with algorithmic forms of reasoning, where computations must be precise and robust. To address this limitation, we propose a novel approach that combines the Transformer's language understanding with the robustness of graph neural network (GNN)-based neural algorithmic reasoners (NARs). Such NARs proved effective as generic solvers for algorithmic tasks, when specified in graph form. To make their embeddings accessible to a Transformer, we propose a hybrid architecture with a two-phase training procedure, allowing the tokens in the language model to cross-attend to the node embeddings from the NAR. We evaluate our resulting TransNAR model on CLRS-Text, the text-based version of the CLRS-30 benchmark, and demonstrate significant gains over Transformer-only models for algorithmic reasoning, both in and out of distribution.

研究の動機と目的

  • 純粋なTransformerモデルがアルゴリズム的推論タスクにおいて分布外一般化性能に弱いことに対処すること。特に、分布外一般化性能に著しい劣化が生じる状況を想定する。
  • 自然言語理解と堅牢なアルゴリズム的計算のギャップを埋めるために、事前学習済みのニューラルアルゴリズムリーダー(NAR)をTransformerアーキテクチャに統合すること。
  • Transformerが未学習の入力サイズや問題構造に対しても効果的に一般化できるようにするために、構造的でGNNベースの埋め込みに根ざした推論を可能にすること。
  • 言語モデルとアルゴリズム的リーダーを組み合わせたハイブリッドアーキテクチャが、複雑な記号的推論タスクにおいて優れた性能と信頼性を示すことを実証すること。

提案手法

  • TransNARモデルは2段階の訓練手順を採用する:まずNARをグラフ構造のアルゴリズム的タスクで事前学習し、次にクロスアテンションを用いたハイブリッドTransformer-NARシステムを微調整する。
  • Transformerは、学習可能なクロスアテンション層を通じてNARのノードおよびエッジ埋め込みに注目し、デコード中に構造的でアルゴリズム的な知識を動的にアクセスできるようにする。
  • NARは、グラフ入力を用いて複数のアルゴリズムを実行できるGNNベースのモデル(例:Triplet-GMPNN)であり、サイズに依存しない堅牢な推論を提供する。
  • クロスアテンションは複数の層に適用され、シーケンス全体にわたり、高次元のNAR埋め込みを用いてTransformerのトークン表現を調整できる。
  • CLRS-30ベンチマークのテキスト版であるCLRS-Textを用い、形状スコア、パーススコア、CLRSスコアなど多面的な評価指標を用いてモデルを評価する。
  • 標準のTransformer層と交互に配置されたゲート付きクロスアテンション層を備えたハイブリッドアーキテクチャにより、言語モデルとNAR間で双方向の情報伝達が可能になる。
Figure 1 : Our TransNAR architecture, with its direct synergy of Transformers and Neural Algorithmic Reasoners, yields clear improvements in out-of-distribution reasoning across wide categories of algorithmic tasks in CLRS-Text [ 20 ] , a textual version of the CLRS-30 benchmark [ 35 ] . Here, the $
Figure 1 : Our TransNAR architecture, with its direct synergy of Transformers and Neural Algorithmic Reasoners, yields clear improvements in out-of-distribution reasoning across wide categories of algorithmic tasks in CLRS-Text [ 20 ] , a textual version of the CLRS-30 benchmark [ 35 ] . Here, the $

実験結果

リサーチクエスチョン

  • RQ1事前学習済みのニューラルアルゴリズムリーダー(NAR)をTransformerに効果的に統合することで、自然言語入力におけるアルゴリズム的推論性能が向上するか?
  • RQ2言語モデルとGNNベースのNARを融合させることで、純粋なTransformerと比較して、アルゴリズム的タスクにおける分布外一般化性能が向上するか?
  • RQ3NAR埋め込みは、出力の形状が不正である、またはパースエラーが生じるといった、LLMの一般的な失敗モードをどのように緩和するか?
  • RQ4TransformerとNAR埋め込みの間でクロスアテンション機構を適用することで、多様なアルゴリズムファミリーおよび入力サイズに対し、より堅牢で正確な推論が可能になるか?
  • RQ5現在のハイブリッドアプローチの限界は何か。特に、インデックスベースの探索や新しい境界条件を含むタスクではどうか?

主な発見

  • TransNARは、分布外設定下で複数のアルゴリズムファミリーにおいて、ベースラインのTransformerと比較してCLRSスコアで20%以上の絶対的向上を達成した。
  • 形状の正確性が著しく向上しており、LLMが出力の長さや構造を誤って生成するという主な失敗モードが軽減されていることが示された。
  • 二分探索、最大部分配列の探索、最小値探索、クイックセレクトといった、インデックスベースの探索が中心となるタスクでは、TransNARはベースラインを上回れなかった。これは、未学習のインデックス境界に関連する共通の失敗モードを示している。
  • 形状スコアは常にTransNARで高い水準を維持しており、出力をNAR埋め込みに根ざさせることで、構造的に正しい出力を生成する可能性が高まっていることが示された。
  • 両モデルにおいてパーススコアは高い水準を維持しており、主な失敗モードはパースエラーではなく、出力の構造的・意味的整合性の欠如にあることが示された。
  • 結果から、NARを拡張したLLMは、純粋なTransformerが全く失敗するような外挿領域でも、新たな分布外一般化の能力を示すことが実証された。
Figure 2 : Augmenting LLMs with algorithmic reasoning: a bird’s eye view of TransNAR. A large language model (LLM) consumes input tokens and produces output tokens, as common for a unimodal Transformer. The neural algorithmic reasoner (NAR) module is a graph neural network (GNN) pre-trained to execu
Figure 2 : Augmenting LLMs with algorithmic reasoning: a bird’s eye view of TransNAR. A large language model (LLM) consumes input tokens and produces output tokens, as common for a unimodal Transformer. The neural algorithmic reasoner (NAR) module is a graph neural network (GNN) pre-trained to execu

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。