Saved in:
Bibliographic Details
Main Authors: Pan, Dayan, Fu, Zhaoyang, Wang, Jingyuan, Han, Xiao, Zhu, Yue, Zhao, Xiangyu
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.17705
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911221981118464
author Pan, Dayan
Fu, Zhaoyang
Wang, Jingyuan
Han, Xiao
Zhu, Yue
Zhao, Xiangyu
author_facet Pan, Dayan
Fu, Zhaoyang
Wang, Jingyuan
Han, Xiao
Zhu, Yue
Zhao, Xiangyu
contents Large Language Models (LLMs) possess remarkable generalization capabilities but struggle with multi-task adaptation, particularly in balancing knowledge retention with task-specific specialization. Conventional fine-tuning methods suffer from catastrophic forgetting and substantial resource consumption, while existing parameter-efficient methods perform suboptimally in complex multi-task scenarios. To address this, we propose Contextual Attention Modulation (CAM), a novel mechanism that dynamically modulates the representations of self-attention modules in LLMs. CAM enhances task-specific features while preserving general knowledge, thereby facilitating more effective and efficient adaptation. For effective multi-task adaptation, CAM is integrated into our Hybrid Contextual Attention Modulation (HyCAM) framework, which combines a shared, full-parameter CAM module with multiple specialized, lightweight CAM modules, enhanced by a dynamic routing strategy for adaptive knowledge fusion. Extensive experiments on heterogeneous tasks, including question answering, code generation, and logical reasoning, demonstrate that our approach significantly outperforms existing approaches, achieving an average performance improvement of 3.65%. The implemented code and data are available to ease reproducibility at https://github.com/Applied-Machine-Learning-Lab/HyCAM.
format Preprint
id arxiv_https___arxiv_org_abs_2510_17705
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Contextual Attention Modulation: Towards Efficient Multi-Task Adaptation in Large Language Models
Pan, Dayan
Fu, Zhaoyang
Wang, Jingyuan
Han, Xiao
Zhu, Yue
Zhao, Xiangyu
Artificial Intelligence
Computation and Language
Large Language Models (LLMs) possess remarkable generalization capabilities but struggle with multi-task adaptation, particularly in balancing knowledge retention with task-specific specialization. Conventional fine-tuning methods suffer from catastrophic forgetting and substantial resource consumption, while existing parameter-efficient methods perform suboptimally in complex multi-task scenarios. To address this, we propose Contextual Attention Modulation (CAM), a novel mechanism that dynamically modulates the representations of self-attention modules in LLMs. CAM enhances task-specific features while preserving general knowledge, thereby facilitating more effective and efficient adaptation. For effective multi-task adaptation, CAM is integrated into our Hybrid Contextual Attention Modulation (HyCAM) framework, which combines a shared, full-parameter CAM module with multiple specialized, lightweight CAM modules, enhanced by a dynamic routing strategy for adaptive knowledge fusion. Extensive experiments on heterogeneous tasks, including question answering, code generation, and logical reasoning, demonstrate that our approach significantly outperforms existing approaches, achieving an average performance improvement of 3.65%. The implemented code and data are available to ease reproducibility at https://github.com/Applied-Machine-Learning-Lab/HyCAM.
title Contextual Attention Modulation: Towards Efficient Multi-Task Adaptation in Large Language Models
topic Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2510.17705