语言模型在上下文中动态构建任务表示,兼具持续感知与即时激活两种机制。
Just-in-time and distributed task representations in language models
- 通过上下文逐步形成可迁移的任务向量,但仅在特定时刻激活。
- 任务身份表示全程稳定可解码,而可迁移表示具有时空局部性。
- 适合研究模型推理机制或提示工程的读者参考。
语言模型的强大能力源于其上下文学习能力:无需权重更新,仅凭指令或示例即可推断并执行新任务。本文研究任务表示在上下文中的形成时机及演化过程。我们考察两类任务表示:可迁移表示(能将任务上下文传递给另一模型实例,无需完整提示)和高层次任务类别表示。结果表明,可迁移表示以非单调、间歇方式演变,具有双重局部性:当上下文提供更多示例时,能有效凝聚证据;但该凝聚过程表现出强时间局部性,仅在特定标记处激活——尽管任务身份始终可解码。某些情况下,可迁移表示还表现出语义局部性,捕捉如独立子任务等小范围任务范畴。因此,语言模型通过持续的敏感度与即时激活的表示共同实现新任务的动态建模。
原文摘要 · Abstract (English)
Many of language models' impressive capabilities originate from their in-context learning: based on instructions or examples, they can infer and perform new tasks without weight updates. In this work, we investigate when representations for new tasks are formed in language models, and how these representations change over the course of context. We study two different task representations: those that are ''transferrable'' -- vector representations that can transfer task contexts to another model instance, even without the full prompt -- and simpler representations of high-level task categories. We show that transferrable task representations evolve in non-monotonic and sporadic ways, while task identity representations persist throughout the context. Specifically, transferrable task representations exhibit a two-fold locality. They successfully condense evidence when more examples are provided in the context. But this evidence accrual process exhibits strong temporal locality along the sequence dimension, coming online only at certain tokens -- despite task identity being reliably decodable throughout the context. In some cases, transferrable task representations also show semantic locality, capturing a small task ''scope'' such as an independent subtask. Language models thus represent new tasks on the fly through both an inert, sustained sensitivity to the task and an active, just-in-time representation to support inference.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。