자기 검색을 통한 장거리 언어 모델링
Long-range Language Modeling with Self-retrieval
June 23, 2023
저자: Ohad Rubin, Jonathan Berant
cs.AI
초록
검색 강화 언어 모델(LMs)은 최근 많은 관심을 받고 있습니다. 그러나 일반적으로 검색기는 언어 모델의 기본 구성 요소로 함께 학습되지 않고, 이미 사전 학습된 언어 모델에 추가되는 방식으로 사용됩니다. 이는 언어 모델과 검색기가 서로 적응할 수 있는 능력을 제한합니다. 본 연구에서는 긴 텍스트 모델링 작업을 위해 처음부터 검색 강화 언어 모델을 공동으로 학습하기 위한 아키텍처 및 학습 절차인 Retrieval-Pretrained Transformer(RPT)를 제안합니다. 긴 문서에서 최근 생성된 텍스트 청크가 주어지면, 언어 모델은 쿼리 표현을 계산하고, 이를 사용하여 문서 내에서 수만 개의 토큰 이전에 위치한 이전 청크를 검색합니다. 검색된 청크의 정보는 언어 모델 표현에 통합되어 다음 목표 청크를 예측하는 데 사용됩니다. 검색기 구성 요소는 의미론적 목표로 학습되며, 여기서 목표는 참조 언어 모델에 따라 다음 청크의 확률을 증가시키는 청크를 검색하는 것입니다. RPT는 책, 코드, 수학적 글쓰기를 포함한 네 가지 장거리 언어 모델링 작업에서 평가되었으며, RPT가 강력한 베이스라인 대비 검색 품질과 이에 따른 복잡도를 전반적으로 개선함을 입증합니다.
English
Retrieval-augmented language models (LMs) have received much attention
recently. However, typically the retriever is not trained jointly as a native
component of the LM, but added to an already-pretrained LM, which limits the
ability of the LM and the retriever to adapt to one another. In this work, we
propose the Retrieval-Pretrained Transformer (RPT), an architecture and
training procedure for jointly training a retrieval-augmented LM from scratch
for the task of modeling long texts. Given a recently generated text chunk in a
long document, the LM computes query representations, which are then used to
retrieve earlier chunks in the document, located potentially tens of thousands
of tokens before. Information from retrieved chunks is fused into the LM
representations to predict the next target chunk. We train the retriever
component with a semantic objective, where the goal is to retrieve chunks that
increase the probability of the next chunk, according to a reference LM. We
evaluate RPT on four long-range language modeling tasks, spanning books, code,
and mathematical writing, and demonstrate that RPT improves retrieval quality
and subsequently perplexity across the board compared to strong baselines.