Sequential Shared-LoRA Adaptation of BERT Across Heterogeneous Text-Classification Domains: A Continual-Learning Study
M. Dyva Sugnana RaoResearch Scholar, Department of Computer Science and Engineering, JNT University, Hyderabad, Telangana, India; Associate Professor, Department of Computer Science & Engineering, BVRIT Hyderabad College of Engineering for Women, Hyderabad, Telangana, India. sugnanarao.m@bvrithyderabad.edu.in0000-0003-0456-7605
Dr.B. Vishnu VardhanSenior Professor, Department of Computer Science and Engineering, JNTUH University College of Engineering, Jagtial, Telangana, India. mailvishnu@jntuh.ac.in0000-0001-7215-8569
Continual learning through parameter-efficient continual learning allows pretrained language models to perform adaptation for various tasks with minimized resource needs. However, sequential adaptation in heterogeneous domains of text classification comes with a set of problems concerning catastrophic forgetting, interference among tasks, and unevenly required convergence. In this study, a novel Sequential Shared Low-Rank Adaptation (LoRA) framework based on a frozen BERT base architecture, a single shared LoRA adapter, and separate heads for each task is proposed. The evaluation of the method is conducted using four datasets: IMDb, AG News, SMS Spam, and CLINC150 for sentiment analysis, news classification, spam detection, and intent recognition, respectively. Task-scaled training configurations are employed to accommodate differences in sequence length and classification complexity. From experimental findings, the macro-F1 scores attained are 0.8718, 0.8427, 0.9368, and 0.6439 respectively. The sequential adaption technique has forgetting values of 0.1655 on IMDb dataset, 0.0881 on AG News dataset, and 0.1903 on SMS Spam dataset. The total backward transfer score is at -0.1479. From the ablation study performed, task-specific training is found to increase CLINC150 macro-F1 to 0.6439 compared to one-epoch uniform training from 0.0117. On the same training setting, the shared LoRA increases the macro-F1 on SMS Spam to 0.8593 from 0.4641 as opposed to independent adaption. However, on IMDb and AG News datasets, independent adapter is more favorable. Moreover, the introduced framework requires only 416,414 trainable parameters and reduces checkpoints' storage space by 74.9%. These results show that the sequential sharing of adapters offers a great deal of parameter efficiency, whereas classification accuracy and knowledge transfer depend on the specific tasks and adaptation order.