Language Models Need Inductive Biases to Count Inductively

要約

自然数を定義するペアノの公理という数学的レンズを通して見ても、数えることを学ぶ子供向けの認知科学文献を通して見ても、数えることは一般化の基本的な例です。
どちらの場合にも、数えることを学ぶことは無限に数えることを学ぶことを意味するという議論が当てはまります。
変圧器の「推論」を最も単純な数え方のケースに抽出しようとした論文はほとんどありませんが、長さの一般化の調査は文献全体で行われています。
NLP の「短くトレーニングし、長くテストする」パラダイムでは、長さはトレーニング文の長さを指します。
形式言語認識では、長さは入力シーケンスの長さ、またはプッシュダウン オートマトンによって引き起こされる最大スタック サイズを指します。
一般的な問題解決では、長さは演繹的推論チェーンのホップ数または再帰の深さを指します。
すべての場合において、数を数えることがタスクを成功させるための中心となります。
そして重要なことに、帰納的にカウントを一般化することが、OOD インスタンスで成功するための中心となります。
この研究は、言語モデルをカウントするためのトレーニングに関する広範な経験的結果を提供します。
私たちは、RNN、トランスフォーマー、状態空間モデル、RWKV に至るまでのアーキテクチャを実験します。
OOD 位置と OOD 語彙による一般化の制限を回避するために、慎重に設計されたタスク形式、補助タスク、および位置埋め込みを紹介します。
従来の RNN は帰納的カウントを簡単に達成できますが、Transformer はドメイン外をカウントするために位置埋め込みに依存する必要があることがわかりました。
計数はトランスフォーマーの表現力に関する多くの議論の基礎となっているため、私たちの発見はコミュニティに対し、形式的な特性評価で定義された原始関数の適用範囲を再検討することを求めています。
最後に、現代の RNN は、帰納的にカウントを一般化する点でも従来の RNN よりも大幅に性能が劣ります。
最新の RNN の並列トレーニングを可能にする設計の選択によって、反復的な性質のメリットがどのように失われてしまうのかについて説明します。

要約(オリジナル)

Counting is a fundamental example of generalization, whether viewed through the mathematical lens of Peano’s axioms defining the natural numbers or the cognitive science literature for children learning to count. The argument holds for both cases that learning to count means learning to count infinitely. While few papers have tried to distill transformer ‘reasoning’ to the simplest case of counting, investigating length generalization does occur throughout the literature. In the ‘train short, test long’ paradigm of NLP, length refers to the training sentence length. In formal language recognition, length refers to the input sequence length, or the maximum stack size induced by a pushdown automata. In general problem solving, length refers to the number of hops in a deductive reasoning chain or the recursion depth. For all cases, counting is central to task success. And crucially, generalizing counting inductively is central to success on OOD instances. This work provides extensive empirical results on training language models to count. We experiment with architectures ranging from RNNs, Transformers, State-Space Models and RWKV. We present carefully-designed task formats, auxiliary tasks and positional embeddings to avoid limitations in generalization with OOD-position and OOD-vocabulary. We find that while traditional RNNs trivially achieve inductive counting, Transformers have to rely on positional embeddings to count out-of-domain. As counting is the basis for many arguments concerning the expressivity of Transformers, our finding calls for the community to reexamine the application scope of primitive functions defined in formal characterizations. Finally, modern RNNs also largely underperform traditional RNNs in generalizing counting inductively. We discuss how design choices that enable parallelized training of modern RNNs cause them to lose merits of a recurrent nature.

arxiv情報

著者 Yingshan Chang,Yonatan Bisk
発行日 2024-05-30 15:10:37+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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