Modellazione Linguistica a Lungo Raggio con Auto-recupero
Long-range Language Modeling with Self-retrieval
June 23, 2023
Autori: Ohad Rubin, Jonathan Berant
cs.AI
Abstract
I modelli linguistici potenziati dal retrieval (LMs) hanno ricevuto molta attenzione di recente. Tuttavia, tipicamente il retriever non viene addestrato congiuntamente come componente nativa del LM, ma viene aggiunto a un LM già pre-addestrato, il che limita la capacità del LM e del retriever di adattarsi reciprocamente. In questo lavoro, proponiamo il Retrieval-Pretrained Transformer (RPT), un'architettura e una procedura di addestramento per addestrare congiuntamente un LM potenziato dal retrieval da zero per il compito di modellare testi lunghi. Dato un recente frammento di testo generato in un documento lungo, il LM calcola rappresentazioni di query, che vengono poi utilizzate per recuperare frammenti precedenti nel documento, situati potenzialmente decine di migliaia di token prima. Le informazioni dai frammenti recuperati vengono fuse nelle rappresentazioni del LM per prevedere il prossimo frammento target. Addestriamo il componente retriever con un obiettivo semantico, dove lo scopo è recuperare frammenti che aumentano la probabilità del frammento successivo, secondo un LM di riferimento. Valutiamo RPT su quattro compiti di modellazione linguistica a lungo raggio, che coprono libri, codice e scrittura matematica, e dimostriamo che RPT migliora la qualità del retrieval e successivamente la perplessità in tutti i casi rispetto a baseline solide.
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.