arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.13191cs.CLcs.AI
收藏

分块、对齐、选择:一种面向 Transformer 的简单长序列处理方法

Chunk, Align, Select: A Simple Long-sequence Processing Method for Transformers

Tencent AI Lab(腾讯AI实验室);Shanghai Jiao Tong University(上海交通大学);Tsinghua University(清华大学)

Jiawen Xie, Pengyu Cheng, Xiao Liang, Yong Dai, Nan Du

AI总结:

本文提出一种分块、对齐、选择的简单长序列处理方法,通过块间信息对齐和强化学习驱动的隐藏状态选择策略,使预训练 Transformer 以线性复杂度处理长序列,并在长文本摘要和阅读理解任务上取得有效提升。

摘要:

尽管基于 Transformer 的模型在自然语言处理中占据主导地位,但它们仍然面临长序列处理任务的挑战,因为 Transformer 中自注意力操作的计算成本会随输入序列长度呈二次方增长。为了降低长序列处理的复杂度,我们提出了一种简单框架,使现成的预训练 Transformer 能够处理更长的序列,同时计算和内存成本仍随输入序列长度线性增长。具体而言,我们的方法将每个长序列输入划分为一批块,然后在编码步骤中对齐块间信息,最后从编码器中为解码过程选择最具代表性的隐藏状态。为了提取块间语义信息,我们在每个编码 Transformer 块中对齐各块的首尾 token 嵌入。为了学习有效的隐藏状态选择策略,我们设计了一种受强化学习启发的双重更新方案,将 Transformer 的解码器视为环境,将下游性能指标视为评估隐藏状态选择动作的奖励。我们在真实世界长文本摘要和阅读理解任务上的实证结果表明,与先前的长序列处理基线相比,该方法取得了有效改进。

英文摘要:

Although dominant in natural language processing, transformer-based models remain challenged by the task of long-sequence processing, because the computational cost of self-attention operations in transformers swells quadratically with the input sequence length. To alleviate the complexity of long-sequence processing, we propose a simple framework to enable the offthe-shelf pre-trained transformers to process much longer sequences, while the computation and memory costs remain growing linearly with the input sequence lengths. More specifically, our method divides each long-sequence input into a batch of chunks, then aligns the interchunk information during the encoding steps, and finally selects the most representative hidden states from the encoder for the decoding process. To extract inter-chunk semantic information, we align the start and end token embeddings among chunks in each encoding transformer block. To learn an effective hidden selection policy, we design a dual updating scheme inspired by reinforcement learning, which regards the decoders of transformers as environments, and the downstream performance metrics as the rewards to evaluate the hidden selection actions. Our empirical results on real-world long-text summarization and reading comprehension tasks demonstrate effective improvements compared to prior longsequence processing baselines.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑