ProSG: Using Prompt Synthetic Gradients to Alleviate Prompt Forgetting of RNN-like Language Models

要約

RNNのような言語モデルは、近年、自然言語処理研究者から再注目されており、いくつかのモデルが大きな進歩を遂げ、従来の変換器に匹敵する性能を示している。しかし、RNNのリカレントな性質により、この種の言語モデルは固定長の状態ベクトルの集合にしか情報を格納することができない。その結果、複雑な命令やプロンプトが与えられた場合、多くの改良と最適化が行われたにもかかわらず、依然として忘却に悩まされている。プロンプト生成はLMの主要かつ最も重要な機能であるため、生成過程における忘却の問題を解決することは極めて重要である。本論文では、生成中のプロンプト忘却を緩和することに着目し、合成勾配を用いて生成中にプロンプトを記憶するようモデルに学習させるアーキテクチャを提案する。プロンプトをモデルに記憶させるために、プロンプトをエンコードする状態を導出し、低ランク勾配近似を用いてプロンプトをモデルパラメータに一時的にハードコードすることで、プロンプトをモデルパラメータの変更に変換する。実験のためにデータセットを構築し、その結果、プロンプト生成過程における忘却の問題を解決する上で、本手法が有効であることを実証した。採択され次第、全てのコードを公開する予定である。

要約(オリジナル)

RNN-like language models are getting renewed attention from NLP researchers in recent years and several models have made significant progress, which demonstrates performance comparable to traditional transformers. However, due to the recurrent nature of RNNs, this kind of language model can only store information in a set of fixed-length state vectors. As a consequence, they still suffer from forgetfulness though after a lot of improvements and optimizations, when given complex instructions or prompts. As the prompted generation is the main and most concerned function of LMs, solving the problem of forgetting in the process of generation is no wonder of vital importance. In this paper, focusing on easing the prompt forgetting during generation, we proposed an architecture to teach the model memorizing prompt during generation by synthetic gradient. To force the model to memorize the prompt, we derive the states that encode the prompt, then transform it into model parameter modification using low-rank gradient approximation, which hard-codes the prompt into model parameters temporarily. We construct a dataset for experiments, and the results have demonstrated the effectiveness of our method in solving the problem of forgetfulness in the process of prompted generation. We will release all the code upon acceptance.

arxiv情報

著者 Haotian Luo,Kunming Wu,Cheng Dai,Sixian Ding,Xinhao Chen
発行日 2023-11-03 15:34:02+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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