GRID让大模型在不记任务的情况下持续学习,还能省下大量内存。
GRID: Scaling Task-Agnostic Inference in Continual Prompt Tuning
- 用输出空间感知解码和梯度引导选择,统一处理所有任务。
- 在长序列任务中显著提升旧任务表现,内存占用大幅降低。
- 适合需要长期持续学习且资源有限的场景,如部署在边缘设备。
基于提示的持续学习(CL)为在任务序列中高效适应大语言模型(LLMs)提供了参数高效的方法。然而,现有方法通常依赖任务感知推理,并维护不断增长的任务专属提示集,导致(1)推理时若无法获取任务标识,早期任务性能严重下降;(2)随任务序列增长而扩展性受限。我们提出GRID,一个统一框架以解决上述问题。GRID引入输出空间感知解码机制,通过代表性输入和自动标签语义归一化增强后向迁移能力;同时采用梯度引导提示选择策略,将低信息量提示压缩为单一聚合表示,实现可扩展、内存高效的持续学习。在长序列与负迁移基准上的大量实验表明,GRID提升了后向迁移性能,达到有竞争力的前向迁移效果,并显著减少提示内存消耗,适用于编码器-解码器与仅解码器架构,包括T5、Qwen和LLaMA。源代码已公开于https://github.com/AnushkaTi/GRID。
原文摘要 · Abstract (English)
Prompt-based continual learning (CL) offers a parameter-efficient way to adapt large language models (LLMs) across task sequences. However, existing methods often rely on task-aware inference and maintain an expanding set of task-specific prompts, leading to (1) severe performance degradation on earlier tasks when task identifiers are unavailable for prompt selection at inference time, and (2) limited scalability as task sequence grows. We propose GRID, a unified framework designed to address these challenges. GRID incorporates an output-space-aware decoding mechanism that enhances backward transfer by leveraging representative inputs and automatic label semantic normalization, alongside a gradient-guided prompt selection strategy that compresses less informative prompts into a single aggregated representation for scalable, memory-efficient continual learning. Extensive experiments on long-sequence and negative-transfer benchmarks show that GRID improves backward transfer, achieves competitive forward transfer, and substantially reduces prompt memory across encoder-decoder and decoder-only architectures, including T5, Qwen, and LLaMA. Source code is available at https://github.com/AnushkaTi/GRID.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。