Instruction-Driven Language Model for Text Classification via Cross-Attention Fusion and Semantic Alignment
Abstract
This paper proposes an efficient fine-tuning method based on cross-attention fusion and semantic guidance to address the problems of insufficient semantic alignment, limited task generalization, and low parameter utilization in instruction-driven language model fine-tuning for text classification. The method constructs a shared semantic space and a multi-layer feature alignment mechanism to achieve deep correlation modeling between instruction semantics and task features. Specifically, the model first encodes the instruction and text inputs separately and employs a cross-attention module to enable multi-granularity semantic interaction, thereby enhancing the guiding role of instruction information in task recognition. A gated residual fusion structure is then applied at the feature level to balance semantic relevance and task diversity, ensuring stable semantic consistency under multi-task conditions. To improve optimization efficiency, a joint loss function is designed to coordinate classification and alignment losses, enabling adaptive adjustment of parameter update directions. Experimental results show that the proposed method outperforms existing fine-tuning frameworks in instruction consistency, multi-task average performance, parameter efficiency, and task conflict suppression, verifying its stability and robustness in complex semantic environments. Further sensitivity experiments demonstrate that appropriate hyperparameter settings and contextual redundancy control effectively enhance cross-task instruction alignment, improving the model's generalization ability across diverse semantic scenarios. This study provides a unified framework that balances efficiency and stability for instruction-driven fine-tuning of language models and offers valuable insights for multi-task semantic modeling and efficient parameter adaptation.