Machine learning models often need to adapt to new data after deployment due to structured or unstructured real-world dynamics. The Continual Learning (CL) framework enables continuous model adaptation, but most existing approaches either assume each task contains sufficiently many data samples or that the learning tasks are non-overlapping. In this paper, we address the more general setting where each task may have a limited dataset, and tasks may overlap in an arbitrary manner without a priori knowledge. This general setting is substantially more challenging for two reasons. On the one hand, data scarcity necessitates effective contextualization of general knowledge and efficient knowledge transfer across tasks. On the other hand, unstructured task overlapping can easily result in negative knowledge transfer. To address the above challenges, we propose an adaptive mixture-of-experts (MoE) framework over pre-trained models that progressively establishes similarity awareness among tasks. Our design contains two innovative algorithmic components: incremental global pooling and instance-wise prompt masking. The former mitigates prompt association noise through gradual prompt introduction over time. The latter decomposes incoming task samples into those aligning with current prompts (in-distribution) and those requiring new prompts (out-of-distribution). Together, our design strategically leverages potential task overlaps while actively preventing negative mutual interference in the presence of per-task data scarcity. Experiments across varying data volumes and inter-task similarity show that our method enhances sample efficiency and is broadly applicable.
翻译:机器学习模型在部署后常因结构化或非结构化的现实动态变化而需要适应新数据。持续学习框架支持模型的持续适应,但现有方法大多假设每个任务包含足够多的数据样本,或学习任务之间互不重叠。本文研究了更具一般性的场景:每个任务的数据集可能有限,且任务之间可能以任意方式重叠而无先验知识。这种通用场景面临两大挑战:一方面,数据稀缺要求有效整合通用知识并实现跨任务高效迁移;另一方面,非结构化任务重叠容易导致负向知识迁移。为应对上述挑战,我们提出一种基于预训练模型的自适应混合专家框架,该框架逐步建立任务间的相似性感知能力。我们的设计包含两个创新算法组件:增量式全局池化和实例级提示掩码。前者通过随时间逐步引入提示来缓解提示关联噪声,后者将输入任务样本分解为与当前提示对齐的分布内样本和需要新提示的分布外样本。通过协同设计,我们的方法策略性地利用潜在任务重叠,同时在每个任务数据稀缺的情况下主动防止负向相互干扰。跨不同数据量和任务间相似度的实验表明,该方法提升了样本效率且具有广泛适用性。