Source-Free Unsupervised Domain Adaptation for Question Answering via Prompt-Assisted Self-learning (2024)

Abstract: This work addresses source-free domain adaptation (SFDA) for Question Answering (QA), wherein a model trained on a source domain is adapted to unlabeled target domains without additional source data. Existing SFDA methods only focus on the adaptation phase, overlooking the impact of source domain training on model generalizability. In this paper, we argue that source model training itself is also critical for improving the adaptation performance and stability. To this end, we investigate the role of prompt learning as an effective method to internalize domain-agnostic QA knowledge, which can be integrated into source training. After source training, an interactive self-learning strategy is proposed to further fine tune both model and prompt in the model adaptation phase. This leads to the Prompt-Assisted Self-Adaptive Learning (PASAL), an innovative SFDA approach for QA. Empirical evaluation on four benchmark datasets shows that PASAL surpasses existing methods in managing domain gaps and demonstrates greater stability across various target domains, validating the significance of source domain training for effective domain adaptation.

## introduction question-answering (qa) systems have significantly advanced with the advent of pretrained language models (plms). despite this, research shows that plms often grapple with domain shifts, when training and evaluation datasets have different distributions @xcite . additionally, the success of plms is heavily reliant on humanannotated data within the relevant domain for specialized tasks @xcite . in many real-world applications, however, the expense of obtaining annotated data is substantial, making the use of unlabeled data more feasible. consequently, there is a necessity to fine-tune models-originally trained on general datasets-to spe-cific domains, despite the substantial domain gaps. in response to these challenges, unsupervised domain adaptation (uda) for qa aims to leverage knowledge from a well-labeled source domain to enhance performance in unlabeled target domains. while existing approaches @xcite @xcite @xcite show promise, they often assume ongoing access to source domain data during target domain adaptation. this reliance presents a challenge in contexts involving sensitive data. for example, clinical data is often subject to stringent privacy regulations due to patient confidentiality, thus only model trained on the source domain is available for public use after initial training @xcite . our study contributes to this domain by applying source-free unsupervised domain adaptation (sfda) to the realm of qa, eliminating the dependency on source domain data after the initial phase of model pretraining. this approach allows the adaptation process to adhere to strict privacy constraints while still leveraging the extensive knowledge gained from source domain pretraining, ensuring a balance between data privacy and the effectiveness of domain adaptation in sensitive contexts. while sfda has been explored in the field of computer vision @xcite @xcite , these studies predominantly concentrate on classification tasks, employing methods like clustering which are not directly transferable to qa tasks. furthermore, such research tends to focus solely on the target domain adaptation phase, overlooking the potential benefits of enhancing the source training phase. in contrast, we argue that improving the initial training phase can significantly boost the generalization capabilities of the model across different domains, thus facilitating more effective domain adaptation. to fulfill our objectives, it is essential for the model to internalize fundamental qa knowledge that is not bound by the specificities of individual domains, maximizing the use of source data. our research indicates that prompt learning @xcite is particularly effective in this regard. we observe that qa samples from different domains can vary significantly in vocabulary and sentence structure. consequently, fine-tuning an entire model from one domain to another often necessitates substantial adjustments in the weights of the model. however, considering the nature of prompts, which essentially frame the task description, their scope is relatively fixed once the task is defined. thus, the prompt for a qa task remains consistent across various training domains. for instance, a prompt like "please answer the question given the context" is applicable irrespective of the domain. this uniformity in prompts, despite divergent training domains, underscores their potential in streamlining domain adaptation and minimizing the need for extensive model retraining. in our work, we have innovated prompt-assisted self-adaptive learning (pasal), a methodology that seamlessly incorporates prompt learning into the domain adaptation process of qa models. initially, during the pretraining phase on the source domain, we employ a plm and augment it with an additional prompt specifically designed to assimilate key, domain-agnostic qa concepts. additionally, we train an auxiliary question generation (qg) model for creating questions from given contexts. the adaptation to the target domain employs a distinctive self-learning strategy. commencing with unlabeled data from the target domain, our qg model initially generates pseudo-questions. subsequently, the qa model, leveraging the initially trained prompt, produces corresponding pseudoanswers. these synthesized question-answer pairs initiate our iterative self-learning cycle: we begin by fine-tuning the prompt, keeping the qa model constant, to closely align with the subtleties of the target domain. following the optimization of the prompt, it then directs the focused fine-tuning of the qa model, which is conducted with the prompt remaining static. after this, the qg model also undergoes fine-tuning to refine its question-generation capabilities within the target domain. this cycle perpetuates in an alternating fashion-fine-tuning the prompt, then the qa model, and finally the qg model-in a consistent rhythm. each phase utilizes the pseudo-labeled samples, progressively honing the prompt, qa model, and qg model to foster a more robust and effective domain adaptation. the core contributions of our research are: ## problem definition the problem of uda for qa is defined as follows. given a context @xmath0, c 2 , . . . , c l 1 ) with l 1 tokens, and a query @xmath1, q 2 , . . . , q l 2 ) with l 2 tokens, the system must identify an answer @xmath2, c as+1 , . . . , c ae ) within the context c. here, a s and a e represent the starting and ending indices of the answer within c. in the scenario of sfda for qa, the source domain d s provides labeled data accessible only during the initial training phase of the model. post this phase, the data from d s becomes unavailable. conversely, the target domain d t offers unlabeled data without such restrictions. our methodology involves using n labeled samples {c i , q i , a i } n @xmath3. additionally, we employ n ′ unlabeled samples {c ′ j } n ′ @xmath4, adhering to the same qa task as in d s . we postulate that d s and d t have different data distributions. the main goal is to adapt a pre-trained model from d s to d t , ensuring the model can effectively bridge the domain gap after access to d s ceases. this adaptation is critical to enhancing the generalization ability of the model to the new domain d t , thus addressing the domain shift challenge. ## conclusion in this paper, we propose the prompt-assisted self-adaptive learning (pasal) framework, a novel approach to sfda for qa systems. by combining prompt learning with a self-learning strategy, pasal enhances adaptability across various domains while upholding data privacy. the empirical results on various benchmark datasets demonstrate the superiority of pasal over existing methods, particularly in its stability and performance across diverse target domains. the findings underscore the significance of incorporating prompt learning and self-learning strategies in the domain adaptation process, offering new avenues for future research in qa systems.