Prevediamo frase per frase
Let's Predict Sentence by Sentence
May 28, 2025
Autori: Hyeonbin Hwang, Byeongguk Jeon, Seungone Kim, Jiyeon Kim, Hoyeon Chang, Sohee Yang, Seungpil Won, Dohaeng Lee, Youbin Ahn, Minjoon Seo
cs.AI
Abstract
I modelli linguistici autoregressivi (LM) generano un token alla volta, mentre il ragionamento umano opera su astrazioni di livello superiore - frasi, proposizioni e concetti. Questo contrasto solleva una domanda centrale: i LM possono imparare a ragionare su unità semantiche strutturate piuttosto che su sequenze grezze di token? In questo lavoro, indaghiamo se i LM preaddestrati possano essere elevati a tali spazi di ragionamento astratto basandosi sulle loro rappresentazioni apprese. Presentiamo un framework che adatta un LM preaddestrato a livello di token per operare nello spazio delle frasi, prevedendo autoregressivamente gli embedding continui delle frasi successive. Esploriamo due paradigmi di embedding ispirati dall'apprendimento di rappresentazioni classico: 1) embedding semantici, appresi tramite auto-codifica per preservare il significato superficiale; e 2) embedding contestuali, addestrati tramite la previsione della frase successiva per codificare la struttura anticipatoria. Valutiamo entrambi sotto due regimi di inferenza: Discretizzato, che decodifica ogni embedding previsto in testo prima di ricodificarlo; e Continuo, che ragiona interamente nello spazio degli embedding per una maggiore efficienza. In quattro domini - matematica, logica, senso comune e pianificazione - gli embedding contestuali sotto inferenza continua mostrano prestazioni competitive con il Chain-of-Thought (CoT) riducendo in media i FLOP al momento dell'inferenza della metà. Presentiamo anche i primi segni di scalabilità e adattamento modulare. Infine, per visualizzare le traiettorie latenti, introduciamo SentenceLens, uno strumento diagnostico che decodifica gli stati intermedi del modello in frasi interpretabili. Insieme, i nostri risultati indicano che i LM preaddestrati possono effettivamente transitare verso un ragionamento astratto e strutturato all'interno di spazi di embedding latenti.
English
Autoregressive language models (LMs) generate one token at a time, yet human
reasoning operates over higher-level abstractions - sentences, propositions,
and concepts. This contrast raises a central question- Can LMs likewise learn
to reason over structured semantic units rather than raw token sequences? In
this work, we investigate whether pretrained LMs can be lifted into such
abstract reasoning spaces by building on their learned representations. We
present a framework that adapts a pretrained token-level LM to operate in
sentence space by autoregressively predicting continuous embeddings of next
sentences. We explore two embedding paradigms inspired by classical
representation learning: 1) semantic embeddings, learned via autoencoding to
preserve surface meaning; and 2) contextual embeddings, trained via
next-sentence prediction to encode anticipatory structure. We evaluate both
under two inference regimes: Discretized, which decodes each predicted
embedding into text before re-encoding; and Continuous, which reasons entirely
in embedding space for improved efficiency. Across four domains - mathematics,
logic, commonsense, and planning - contextual embeddings under continuous
inference show competitive performance with Chain-of-Thought (CoT) while
reducing inference-time FLOPs on average by half. We also present early signs
of scalability and modular adaptation. Finally, to visualize latent
trajectories, we introduce SentenceLens, a diagnostic tool that decodes
intermediate model states into interpretable sentences. Together, our results
indicate that pretrained LMs can effectively transition to abstract, structured
reasoning within latent embedding spaces.