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

连续潜在上下文使Transformer实现高效的在线学习

Continuous Latent Contexts Enable Efficient Online Learning in Transformers

Georgia Institute of Technology(佐治亚理工学院);University of California, Berkeley(加州大学伯克利分校);Columbia University(哥伦比亚大学)

Emile Anand, Abdullah Ateyeh, Xinyuan Cao, Max Dabagia

AI总结:

本文研究连续潜在上下文是否能提升Transformer的在线学习能力,通过构造常深Transformer实现加权多数算法和Q学习,并在合成数据上优于大模型。

摘要:

大型语言模型(LLMs)在上下文学习中表现出强大的能力:给定标记示例,它们可以生成良好预测而无需参数更新。然而,许多交互设置超越静态预测,进入在线决策,需要在反馈下适应长时间多轮任务。最近,具有潜在链式思维的连续Transformer架构在离线迭代任务如定向图可达性中表现出潜力。受此启发,我们研究连续潜在上下文是否能更有效实现在线学习。我们给出了常深Transformer的显式构造,通过将算法状态存储为特征嵌入的线性组合,使用少量潜在上下文令牌实现两个基础在线决策过程——加权多数算法和Q学习。我们进一步训练了一个具有潜在上下文的小型GPT-2风格Transformer,使用多课程目标训练,不直接监督潜在状态。在长合成在线预测序列中,该模型优于包括Qwen-3-14B和DeepSeek-V3在内的大型模型。我们的结果表明,连续潜在上下文为Transformer实现在线学习算法提供了简单有效的持久状态。

英文摘要:

Large language models (LLMs) exhibit a strong capacity for in-context learning: Given labeled examples, they can generate good predictions without parameter updates. However, many interactive settings go beyond static prediction to online decision-making, in which effective behavior demands adaptation over long multi-turn horizons in response to feedback, and efficient algorithms in these domains must use compact representations of what they have learned. Recently, continuous transformer architectures with latent chain of thought have shown promise for offline iterative tasks such as directed graph-reachability. Motivated by this, we study whether continuous latent context tokens equip transformers to more effectively realize online learning. We give explicit constructions of constant-depth transformers that implement two foundational online decision-making procedures -- the weighted majority algorithm and $Q$-learning -- by storing their algorithmic state as linear combinations of feature embeddings, using a small number of latent context tokens. We further train a small GPT-2-style transformer with latent contexts using a multi-curriculum objective that does not directly supervise the latent states. On long synthetic online prediction sequences, this model outperforms comparable discrete-state baselines, while comparisons with prompted LLMs show that textual state summaries can also improve adaptation. Our results suggest that continuous latent contexts provide a simple and effective persistent state for transformers to implement online learning algorithms.

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

↑