Manuscript Offprint
arXiv:2610.40091Upcycling Language Models for Multiple Specialized Domains
Abstract
Effective multi-domain adaptation of large language models requires prioritizing relevant domain knowledge while minimizing interference from irrelevant domains. Existing approaches commonly use Low-Rank Adaptation (LoRA) to train a separate adapter for each domain and combine these adapters within one model. However, they either weight adapters equally regardless of the input domain or dynamically weight adapters while still activating all of them including irrelevant ones. Additionally, while efficient, their low-rank structure limits performance. In contrast, upcycling is a model expansion method that adds experts and a router to a dense Transformer layer offering larger capacity than LoRA approaches. In this paper, we propose Domain-Specialized Upcycling (DS-UPCYCLING) for multi-domain adaptation. We introduce a new domain-aware supervision that allows the router to effectively learn to distinguish domains by selecting the appropriate experts. During fine-tuning on each new domain, we update only the corresponding expert and router while freezing all other parameters. Experiments show that our method achieves the highest average performance across the adapted domains compared to baselines while retaining general performance. With just 256 examples per domain for router supervision, DS-Upcycling achieves 90–98% routing accuracy after adaptation compared with 43–70% for routers trained without our approach.
1 Introduction
Large language models (LLMs) have demonstrated strong capabilities across a wide range of general tasks (Grattafori et al., 2024; Yang et al., 2025a). However, domains involving consequential decisions such as biomedicine (Luo et al., 2022; Singhal et al., 2023) and law (Niklaus et al., 2024, 2025) require specialized knowledge beyond general capabilities that is induced via fine-tuning on domain

Figure 1: Illustration of Upcycling. Upcycling converts a pre-trained dense transformer layer into a sparse Mixture-of-Experts (MoE) layer.
specific data. Multi-domain adaptation extends this specialization to multiple domains, aiming to integrate their specialized knowledge within a single model (Chen et al., 2023; Sukhbaatar et al., 2024).
Multi-domain adaptation methods suffer from catastrophic forgetting of general-domain capabilities (Li et al., 2024; Luo et al., 2025) and cross-domain interference (Chen et al., 2023; Sukhbaatar et al., 2024). Low-Rank Adaptation (LoRA) has been applied to address these challenges by freezing pre-trained weights and learning parameter updates through pairs of low-rank matrices (Hu et al., 2022). Additionally, separate adapters are trained for each domain and then combined within one model for adaptation. However, these approaches either weight adapters equally regardless of the input domain (Chitale et al., 2023; Wang et al., 2023; Asadi et al., 2024) or dynamically weight adapters while still activating all of them including irrelevant ones (Dou et al., 2024). Beyond these limitations, LoRA's adaptation performance is further constrained by its low-rank structure (Biderman et al., 2024; Pletenev et al., 2025).
Upcycling is a model expansion method that adds full multi-layer perceptron (MLP) experts and a router to a dense Transformer layer resulting in sparse Mixture-of-Experts (MoE) architecture (Figure 1). The new experts learn domain-specific knowledge without low-rank constraints. The router activates a subset of experts for each input and assigns weights to the selected experts. This offers a natural way to prioritize relevant domain knowledge and exclude irrelevant domain knowledge through selective expert activation (Fedus et al., 2022; Komatsuzaki et al., 2023). Despite these advantages, upcycling for multiple domain adaptation remains largely underexplored. A few recent studies have explored multilingual adaptation (Zhou et al., 2025; Zhang et al., 2025), but they rely on language-specific signals for router guidance that are not transferable to domains within a specific language (e.g., law or biomedical).
In this work, we propose Domain-Specialized Upcycling (DS-Upcycling) for multi-domain adaptation (Figure 2). We first train the router with a domain-aware objective using only a small number of examples from each domain. This encourages general inputs to use the original MLP and discourages specialized inputs from using irrelevant experts. During adaptation to each domain, we update only its corresponding expert and the router while freezing all other parameters. These domain-specific expert updates promote specialization by concentrating learning within the corresponding expert and limiting cross-domain interference. Our main contributions are as follows:
• We propose DS-Upcycling for multi-domain adaptation. It outperforms existing baselines across specialized and general domains in two different model families.
• Our domain-aware router supervision uses just 256 examples per domain, requiring to only instantiating the routers.
• Our ablation study validates the contribution of each DS-Upcycling component. DS-Upcycling achieves 90–98% routing accuracy on specialized domains compared with 43–70% for routers trained without it.
2.1 Multi-domain Adaptation
LLM adaptation faces catastrophic forgetting of general-domain capabilities (Li et al., 2024; Luo et al., 2025) and cross-domain interference (Chen et al., 2023; Sukhbaatar et al., 2024). To address these challenges, LoRA-based methods freeze pretrained weights and learn updates through pairs of low-rank matrices (Hu et al., 2022). A common strategy trains one adapter per domain and combines their outputs with equal weights (Chitale et al., 2023; Wang et al., 2023; Asadi et al., 2024). However, equal weighting prevents the model from prioritizing the adapter most relevant to the input domain. LoRAMoE addresses this limitation through a router that dynamically weights adapters (Dou et al., 2024). Yet it activates all adapters for every input and therefore cannot exclude irrelevant ones. Despite their efficiency, LoRA-based methods remain constrained by their low-rank architecture (Biderman et al., 2024; Pletenev et al., 2025). LLaMA-Pro instead inserts and trains additional transformer layers while freezing pre-trained parameters (Wu et al., 2024). Although it outperforms LoRA in specialized domains, its added layers are shared across domains and remain vulnerable to cross-domain interference. In contrast, our method trains full MLP experts for individual domains and selectively activates them.
2.2 Model Upcycling
Pre-training. Most upcycling work focuses on expert initialization for pre-training on large-scale general data. Komatsuzaki et al. (2023) find that duplicating the dense MLP performs best. However, identical initialization can hinder subsequent expert specialization (Wei et al., 2024; Nakamura et al., 2025). To address this issue, Muennighoff et al. (2025) randomly replace some weights in each copied expert. Nakamura et al. (2025) instead partially re-initialize experts using Gaussian distributions matched to pre-trained weight statistics. These methods use >200B tokens to train randomly initialized routers. However, they face two limitations in multi-domain adaptation. First, domain-specific datasets are much smaller than pre-training corpora and may be insufficient for randomly initialized routers to learn to distinguish domains from data alone. Second, making experts different at initialization does not ensure that they specialize in distinct domains unless subsequent training explicitly guides this specialization. Our method uses domain-aware router supervision to guide expert selection and domain-specific expert updates to promote specialization despite identical initialization.

Figure 2: Illustration of DS-Upcycling. Step 1: Extract domain-specific hidden states. Step 2: Domain-aware router supervision favors the general expert for inputs from the general domain and suppresses irrelevant experts for inputs from specialized domains. Step 3: During adaptation to each specialized domain, update only its corresponding expert and the router while freezing all other parameters.
Domain Adaptation. Upcycling methods outperform other methods on multilingual adaptation (Zhou et al., 2025). Zhou et al. (2025) refine the router with language priors, and Zhang et al. (2025) add a language classifier to guide routing, with the latter requiring architectural changes beyond a standard MoE layer. Therefore, both methods are not transferable to domain adaptation within the same language. They depend on the language of an input being identifiable, so that routing can be tied to language identity. Specialized domains such as legal and biomedical in English, share the same script and much of the same vocabulary and offer no comparable surface-level signals. In contrast, our method requires neither domain-specific priors nor architectural changes beyond a standard MoE layer and applies to arbitrary domains.
3 Domain-Specialized Upcycling
We propose Domain-Specialized Upcycling (DS-Upcycling), a new upcycling framework designed for multi-domain adaptation (Figure 2). It consists of three main steps: (1) domain-specific representation extraction, (2) domain-aware router supervision, and (3) domain-specific experts updates.
3.1 Preliminaries
MoE. A sparse MoE layer contains n MLP experts and a router with projection matrix . For input x, the router assigns expert weights:
Top-k retains the largest logits and sets the rest to (Fedus et al., 2022). The output is the weighted sum of selected experts.
Upcycling. Given a dense Transformer M, upcycling retains the original MLP in each selected layer l and adds n - 1 new MLP experts and a router. All other modules remain unchanged:
3.2 Representation Extraction
To extend upcycling to multi-domain adaptation, we extract hidden states from each domain for domain-aware router supervision before adaptation. Given specialized-domain datasets and a general-domain dataset , we sample a small set of examples from each and pass them through the dense model .
Let denote the set of layers to be upcycled. For each layer , let denote the hidden states extracted immediately before the MLP from examples in . We pair each hidden state with its domain label to construct the router training set:
3.3 Domain-aware Router Supervision
Each upcycled layer contains the original dense MLP as its general expert and specialized experts corresponding to the target domains. For each layer , we train a separate router on . This supervision requires only instantiating the routers, without involving the dense model. For a hidden state from domain , we define the domain-aware objective as:
where is the routing probability assigned to the general expert and is the total routing probability assigned to specialized experts for domains other than . For general-domain inputs, the objective encourages selection of the general expert. For specialized-domain inputs, it suppresses irrelevant experts while allowing both the corresponding specialized expert and the general expert to contribute.
3.4 Expert Initialization
We initialize each specialized expert by copying the dense MLP following Komatsuzaki et al. (2023). This is motivated by findings from prior work on expanding pre-trained models showing that initializing the expanded model to produce the same outputs as the original model benefits subsequent adaptation (Wu et al., 2024; Cao et al., 2026b). For each upcycled layer , the original MLP is copied to each specialized expert , .
All experts initially produce identical outputs and the selected experts' routing weights sum to one. Their weighted output therefore matches the original MLP regardless of router selection.
3.5 Domain-specific Expert Updates
DS-Upcycling has two training stages. First, each router is trained independently on the extracted hidden states using the domain-aware objective ( 3.3). Second, the upcycled model is adapted to each target domain. Inspired by prior work (Wang et al., 2024; Li et al., 2025), we update only the router and expert d in each upcycled layer during adaptation to while freezing all other parameters. Restricting each expert's updates to its corresponding domain promotes expert specialization. This mitigates cross-domain interference while preserving the general expert's pre-trained knowledge.
4 Experimental Setup
4.1 Base Models
We use the pre-trained versions of Llama-3.1-8B (Grattafiori et al., 2024) and Qwen-3-8B (Yang et al., 2025a) as base models.
4.2 Baselines
We compare DS-Upcycling with a broad range of methods grouped into two categories: (1) dense baselines and (2) upcycling baselines. Implementation and hyper-parameter details are provided in Appendices A and B.
Dense Baselines. These methods retain the dense Transformer layer architecture. (1) Simple FT updates all model parameters without architectural changes. (2) LoRA trains a separate adapter for each domain and combines their outputs with equal weights (Chitale et al., 2023; Wang et al., 2023; Asadi et al., 2024). (3) LoRAMoE uses a router to dynamically weight all adapter outputs (Dou et al., 2024). (4) LLaMA-Pro inserts new dense Transformer layers after each group of pre-trained layers and trains only the new layers (Wu et al., 2024).
Upcycling Baselines. These methods use upcycling to convert dense Transformer layers into sparse MoE layers. They randomly initialize routers and update all parameters during adaptation but differ in expert initialization. (1) Random Init randomly initializes all weights of each new expert (Fedus et al., 2022). (2) Duplication initializes each new expert by copying the dense MLP (Komatsuzaki et al., 2023). (3) Random Perturb copies the dense MLP and randomly re-initializes a subset of its weights (Muennighoff et al., 2025). (4) Partial Init copies the dense MLP and re-initializes a subset of its weights using Gaussians matched to their original distribution (Nakamura et al., 2025).
| Methods | Biomedical | Legal | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| MedMCQA | MedQA | Bio-MMLU | PubMedQA | Average | Law-MMLU | CaseHOLD | ECtHR | Average | ||
| Llama-3.1-8B | ||||||||||
| Dense | Simple FT | |||||||||
| LoRA | ||||||||||
| LoRAMoE | ||||||||||
| LLaMA-Pro | ||||||||||
| Upcycling | Random Init. | |||||||||
| Duplication | ||||||||||
| Random Perturb. | ||||||||||
| Partial Init. | ||||||||||
| DS-Upcycling (Ours) | ||||||||||
| Qwen-3-8B | ||||||||||
| Dense | Simple FT | |||||||||
| LoRA | ||||||||||
| LoRAMoE | ||||||||||
| LLaMA-Pro | ||||||||||
| Upcycling | Random Init. | |||||||||
| Duplication | ||||||||||
| Random Perturb. | ||||||||||
| Partial Init. | ||||||||||
| DS-Upcycling (Ours) | ||||||||||
Table 1: Performance on specialized domains. Bold/underlined denote best/second-best results per task. Green / Red indicates scores above/below the untrained base model. When our method ranks first, * marks significant improvements over the second-best method (paired t-test, p < 0.05).
4.3 Training Data
We evaluate DS-Upcycling and all baselines in legal and biomedical domains as they are widely explored in prior NLP research (Gu et al., 2021; Luo et al., 2022; Singhal et al., 2023; Chalkidis et al., 2019; Zheng et al., 2021; Henderson et al., 2022; Niklaus et al., 2024). Both domains require specialized knowledge beyond general capabilities. We sample uniformly across task subsets within each dataset to obtain balanced training sets of 393K examples per domain.
Legal. We use the English subset of LawInstruct that covers diverse legal tasks (Niklaus et al., 2025).
Biomedical. We train on MedINST (Han et al., 2024) using the task subsets included in MultiMedQA (Singhal et al., 2022).
For domain-aware router supervision, we extract hidden states from 256 randomly selected examples per domain ( ). Legal and biomedical examples come from their respective training datasets. General-domain examples come from Alpaca-GPT4 (Peng et al., 2023).
4.4 Evaluation Tasks
We use the legal, biomedical and general-domain benchmarks from Williams et al. (2026). The general benchmarks assess catastrophic forgetting. For all datasets, we report the mean and standard deviation across three random seeds.
Biomedical. We use PubMedQA (Jin et al., 2019), MedQA (Jin et al., 2021), MedMCQA (Pal et al., 2022) tasks, and relevant subsets from MMLU (Hendrycks et al., 2021) such as anatomy, clinical knowledge, college medicine, medical genetics, professional medicine, and college biology.
Legal. We use CaseHOLD (Zheng et al., 2021) and ECtHR (Task A) (Chalkidis et al., 2019) from LexGLUE (Chalkidis et al., 2022) and Legal-MMLU, covering jurisprudence, professional law, and international law (Hendrycks et al., 2021).
General. We use ARC (Clark et al., 2018), BoolQ (Clark et al., 2019), HellaSwag (Zellers et al., 2019), LAMBADA (Paperno et al., 2016), OpenBookQA (Banerjee et al., 2019), PIQA (Bisk et al., 2020), RTE (Dagan et al., 2005), StoryCloze (Mostafazadeh et al., 2016) and WinoGrande (Sakaguchi et al., 2021).
5 Results
5.1 Domain-specific Performance
Table 1 presents the results in the biomedical and legal domains.
| Methods | ARC-C | ARC-E | BoolQ | HellaSwag | LAMBADA | OpenBookQA | PIQA | RTE | WinoGrande | StoryCloze | Average | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-3.1-8B | 51.370.00 | 81.500.14 | 82.080.05 | 60.020.04 | 67.240.03 | 33.200.00 | 80.090.11 | 70.520.42 | 73.720.28 | 78.140.10 | 67.790.08 | |
| Dense | Simple FT | 32.910.26 | 61.500.10 | 68.630.26 | 42.550.02 | 34.170.11 | 24.200.00 | 69.060.25 | 56.200.21 | 61.140.23 | 65.650.11 | 51.600.04 |
| LoRA | 52.100.21 | 80.640.11 | 80.370.08 | 57.400.04 | 65.080.06 | 37.600.20 | 77.770.08 | 61.130.21 | 71.950.09 | 79.240.08 | 66.330.00 | |
| LoRAMoE | 53.730.18 | 82.440.13 | 82.680.12 | 58.840.04 | 71.320.04 | 35.730.12 | 77.780.03 | 65.820.21 | 73.590.12 | 77.280.08 | 67.920.03 | |
| LLaMA-Pro | 53.190.20 | 79.690.14 | 81.830.05 | 55.740.01 | 70.880.10 | 35.670.12 | 78.620.00 | 66.430.36 | 71.060.12 | 76.090.17 | 66.920.06 | |
| Upcycling | Random Init. | 33.790.15 | 64.720.11 | 70.370.03 | 41.840.01 | 31.740.07 | 23.530.12 | 69.910.22 | 54.990.42 | 60.430.09 | 67.500.00 | 51.880.07 |
| Duplication | 35.550.10 | 61.950.00 | 74.030.11 | 42.750.06 | 38.550.07 | 23.730.12 | 68.990.09 | 52.590.21 | 61.250.21 | 68.280.14 | 52.770.01 | |
| Random Perturb. | 33.390.05 | 63.440.02 | 74.860.05 | 42.160.02 | 35.020.07 | 25.330.23 | 68.590.08 | 54.150.00 | 60.830.20 | 66.490.10 | 52.430.04 | |
| Partial Init. | 34.300.17 | 64.170.15 | 70.170.02 | 42.570.03 | 33.640.09 | 24.000.00 | 68.480.23 | 58.600.21 | 62.460.09 | 66.980.18 | 52.540.03 | |
| DS-Upcycling (Ours) | 52.280.10 | 83.010.11 | 83.300.03* | 59.920.01 | 69.190.03 | 34.400.20 | 79.520.13 | 73.530.42* | 74.400.12 | 78.670.20 | 68.820.04* | |
| Qwen-3-8B | 52.700.25 | 81.820.00 | 83.080.07 | 58.850.01 | 66.090.07 | 32.400.53 | 79.180.14 | 74.970.21 | 72.400.12 | 78.400.10 | 67.990.03 | |
| Dense | Simple FT | 55.030.23 | 82.250.06 | 84.130.16 | 53.840.06 | 59.160.04 | 29.730.12 | 76.680.03 | 66.310.21 | 68.850.33 | 73.750.21 | 64.970.06 |
| LoRA | 63.960.34 | 88.120.11 | 86.770.05 | 57.870.02 | 68.620.07 | 32.930.42 | 79.630.13 | 67.750.21 | 71.610.25 | 79.090.07 | 69.630.06 | |
| LoRAMoE | 62.680.05 | 87.350.09 | 86.480.08 | 58.450.08 | 67.490.12 | 33.870.12 | 79.870.11 | 64.980.00 | 73.900.51 | 77.920.25 | 69.300.10 | |
| LLaMA-Pro | 59.950.26 | 85.540.05 | 85.330.14 | 56.180.06 | 58.480.03 | 32.870.42 | 77.710.03 | 73.160.21 | 73.220.33 | 76.090.27 | 67.850.08 | |
| Upcycling | Random Init. | 56.480.23 | 83.660.10 | 86.270.03 | 53.950.03 | 58.790.08 | 33.470.31 | 76.840.28 | 69.550.21 | 69.690.28 | 73.530.11 | 66.220.06 |
| Duplication | 54.410.05 | 82.700.04 | 85.120.07 | 54.110.05 | 59.560.10 | 30.600.00 | 76.410.06 | 70.400.00 | 71.400.12 | 74.230.10 | 65.890.02 | |
| Random Perturb. | 56.140.37 | 83.320.12 | 85.730.12 | 53.830.02 | 56.210.14 | 30.800.20 | 75.990.14 | 68.950.36 | 69.590.09 | 73.970.23 | 65.450.09 | |
| Partial Init. | 56.680.13 | 83.420.04 | 86.000.02 | 53.450.05 | 55.430.02 | 31.800.20 | 76.550.05 | 69.550.21 | 69.140.21 | 73.200.18 | 65.520.03 | |
| DS-Upcycling (Ours) | 62.370.23 | 87.090.09 | 87.060.03* | 58.920.05 | 66.630.07 | 33.730.31 | 79.620.19 | 72.800.21 | 73.320.08 | 79.260.14* | 70.080.10* |
Table 2: Performance on general domain. Bold/underlined denote best/second-best results per task. Green / Red indicates scores above/below the untrained base model. When our method ranks first, * marks significant improvements over the second-best method (paired t-test, p < 0.05).
Dense Baselines. LoRAMoE performs best among these approaches and improves average performance in both domains. However, these improvements are accompanied by declines on MedQA (Llama: 60.36 → 57.27; Qwen: 65.54 → 62.32) and Law-MMLU (Llama: 67.98 → 67.49; Qwen: 74.77 → 71.79). Its domain-level gains do not consistently extend to individual tasks. One possible explanation is interference among tasks within each domain. Prior work has found that adapting low-rank adapters to multiple tasks can improve performance on some tasks while degrading others (Yang et al., 2025b). DS-Upcycling instead allows full MLP experts to learn domain-specific updates without low-rank constraints. This greater capacity may help accommodate the different requirements of tasks within each domain. Our method achieves the highest biomedical (Llama: 68.42; Qwen: 73.34) and legal (Llama: 68.96; Qwen: 72.15) averages across all methods, significantly outperforming the respective second-best baselines (paired t-test, p < 0.05). These domain-level gains are accompanied by improvements over the corresponding base model on every specialized-domain task.
Upcycling Baselines. Upcycling baselines fail to consistently improve performance across spe- cialized domains. For Llama-3.1-8B, even their highest biomedical (Duplication: 66.18 → 50.97) and legal (Random Init.: 60.30 → 56.62) averages fall below those of the base model. For Qwen-3-8B, all upcycling baselines improve the legal average but reduce the biomedical average. These results show that expert initialization alone may not ensure the reliable expert selection and specialization needed for multi-domain adaptation. For expert selection, prior multilingual upcycling studies have found that explicit routing guidance improves adaptation performance (Zhou et al., 2025; Zhang et al., 2025). For expert specialization, prior MoE research has shown that concentrating task-specific updates within relevant experts supports effective adaptation (Wang et al., 2024; Li et al., 2025). DS-Upcycling combines domain-aware router supervision to guide expert selection with domain-specific expert updates to concentrate each domain's learning within its corresponding expert. We further examine their contributions through routing analysis (§6.1), expert specialization analysis (§6.2), and ablations of both components (§6.3).
5.2 General Performance
Table 2 presents the results on general-domain tasks. Overall, existing baselines struggle to consistently preserve general-domain capabilities.
Dense Baselines. LoRAMoE is the only dense method that improves average performance in both model families (Llama: 67.92; Qwen: 69.30). However, it still degrades five out of ten tasks on Llama-3.1-8B and three out of ten on Qwen-3-8B. RTE performance declines substantially in both cases (Llama: ; Qwen: ). One possible explanation is that freezing pre-trained parameters does not prevent domain-specific adapter updates from affecting general-domain performance. Although LoRAMoE freezes pre-trained weights, it still combines all adapter outputs for general-domain inputs. DS-Upcycling uses domain-aware router supervision to favor the general expert for these inputs, thereby reducing interference from specialized domains. Our ablation study supports this interpretation, showing that removing domain-aware router supervision reduces general-domain performance on both model families (§6.3). DS-Upcycling achieves the highest general-domain averages (Llama: 68.82; Qwen: 70.08) across all methods, significantly outperforming the respective second-best baselines (paired t-test, ). Only two tasks decline slightly on Llama-3.1-8B (HellaSwag: ; PIQA: ). For Qwen-3-8B, only RTE declines (). These results indicate that DS-Upcycling preserves general-domain capabilities more effectively.
Upcycling Baselines. All upcycling baselines reduce average general-domain performance on both model families. Even their highest averages fall below those of the base models (Llama-3.1-8B, Duplication: ; Qwen-3-8B, Random Init.: ). Updating all parameters during specialized-domain adaptation may alter pre-trained knowledge. Duplication falls to 52.77 for Llama and 65.89 for Qwen despite initially matching the dense model's outputs. Preserving initial outputs alone might be insufficient to retain general-domain capabilities after adaptation. DS-Upcycling instead freezes pre-trained parameters and updates only the corresponding expert and router during adaptation to each domain. Our ablation further supports the contribution of domain-specific expert updates to retaining general-domain performance (§6.3). Even with the general expert frozen, updating all specialized experts lowers general-domain averages on both model families. In general, we observe that freezing pre-trained parameters and restricting expert updates to their corresponding domains help mitigate general-domain catastrophic forgetting.
6 Analysis
6.1 Routing Quality
To evaluate whether domain-aware router supervision (§3.3) helps routers distinguish input domains, we compare DS-Upcycling with upcycling baselines that randomly initialize their routers. We sample 128 additional examples per domain (general, legal and biomedical) with no overlap with those used for router supervision. We measure routing accuracy in the upcycled models before and after adaptation by checking if the expert corresponding to the input domain is among the selected experts.
Table 3 reports routing accuracy across domains. For Duplication, routing accuracy remains largely unchanged across all three domains after adaptation (Llama general: , legal: , and biomedical: ). The other upcycling baselines become strongly biased toward the general domain while routing accuracy on legal and biomedical inputs declines substantially (Random Init. on Llama general: , legal: , and biomedical: ). This pattern shows that training on domain-specific data alone does not enable randomly initialized routers to reliably select the corresponding specialized experts. This routing failure contributes to the specialized-domain performance degradation observed in §5.1.
| Methods | General | Legal | Biomedical | ||||
|---|---|---|---|---|---|---|---|
| Before | After | Before | After | Before | After | ||
| Llama | Random Init. | 68.31 | 99.62 | 62.94 | 51.00 | 61.06 | 42.69 |
| Duplication | 63.75 | 62.62 | 69.31 | 69.56 | 63.00 | 63.56 | |
| Random Perturb. | 63.56 | 99.94 | 69.44 | 48.25 | 73.88 | 57.56 | |
| Partial Init. | 63.75 | 99.81 | 69.31 | 53.75 | 63.00 | 45.62 | |
| DS-Upcycling (Ours) | 100.00 | 100.00 | 99.06 | 98.12 | 97.62 | 95.37 | |
| Qwen | Random Init. | 55.28 | 99.33 | 75.83 | 46.50 | 72.39 | 54.56 |
| Duplication | 69.89 | 68.94 | 73.44 | 69.89 | 62.06 | 64.44 | |
| Random Perturb. | 65.72 | 99.61 | 69.78 | 49.83 | 74.28 | 55.22 | |
| Partial Init. | 64.61 | 99.72 | 70.61 | 45.39 | 71.00 | 55.22 | |
| DS-Upcycling (Ours) | 100.00 | 100.00 | 89.78 | 91.44 | 97.72 | 89.94 | |
Table 3: Routing accuracy before and after adaptation across general, legal, and biomedical domains.
In contrast, DS-Upcycling achieves high routing accuracy across all three domains and maintains it after adaptation. This routing stability indicates that domain-aware router supervision enables consistent selection of appropriate experts across domains. This explains the consistent specialized-domain performance gains achieved by our method.
6.2 Expert Specialization
We next evaluate whether restricting each expert's updates to its corresponding domain ( ) promotes specialization despite identical initialization. Following prior work (Li et al., 2017), we compute the cosine similarity between the biomedical and legal experts' parameter updates as: .
Table 4 shows the results. Lower similarity indicates less aligned update directions and serves as an indicator of expert specialization. Duplication yields high update similarity across both model families. This suggests that its experts have similar parameter updates despite being intended for different domains. Other upcycling baselines achieve lower similarity but alter the pre-trained model's outputs at initialization. This can hinder subsequent adaptation (Wu et al., 2024; Cao et al., 2026b) and contribute to the general-domain degradation observed in §5.2. In contrast, DS-Upcycling starts from the same copied weights as Duplication yet achieves low update similarity comparable to the other upcycling baselines. Restricting each expert's updates to its corresponding domain therefore enables identically initialized experts to specialize in distinct domains.
| Methods | Similarity ↓ | |
|---|---|---|
| Llama | Random Init. | 0.03% |
| Duplication | 36.83% | |
| Random Perturb. | 0.21% | |
| Partial Init. | 0.38% | |
| DS-Upcycling (Ours) | 0.59% | |
| Qwen | Random Init. | 0.01% |
| Duplication | 31.06% | |
| Random Perturb. | 0.46% | |
| Partial Init. | 1.07% | |
| DS-Upcycling (Ours) | 0.76% |
Table 4: Cosine similarity between biomedical and legal expert parameter updates after adaptation.
6.3 Ablation Study
Domain-Aware Router Supervision ( ). We compare DS-Upcycling with a variant that randomly initializes routers without domain-aware supervision while keeping all other components unchanged. Table 5 shows that domain-aware router supervision improves average performance in five of the six settings spanning two model families and three domains. The only exception is the biomedical domain on Qwen-3-8B where the average decreases slightly from 73.46 to 73.34. These results validate the contribution of domain-aware router supervision to effective multi-domain adaptation.
| Methods | Bio | Leg | Gen | |
|---|---|---|---|---|
| Llama | DS-Upcycling | |||
| w/o DA Router Superv. | ||||
| w/o DS Expert Upd. | ||||
| Qwen | DS-Upcycling | |||
| w/o DA Router Superv. | ||||
| w/o DS Expert Upd. |
Table 5: Ablation results. “w/o DA Router Superv.” and “w/o DS Expert Upd.” evaluate the contributions of domain-aware router supervision ( 3.3) and domain-specific expert updates ( 3.5), respectively. Detailed results are presented in Tables 6 and 7 in Appendix C.
Domain-Specific Expert Updates ( ). We evaluate our strategy of restricting each expert's updates to its corresponding domain by comparing DS-Upcycling with a variant that updates all specialized experts during adaptation to each domain. Table 5 shows that restricting updates to the corresponding expert improves average performance across all six settings. These results validate the effectiveness of promoting expert specialization through domain-specific expert updates.
7 Conclusion
In this work, we proposed DS-Upcycling for adapting pre-trained language models to multiple specialized domains. It adds full MLP experts to learn domain-specific knowledge without low-rank constraints and a router to selectively activate relevant experts. Domain-aware router supervision encourages the selection of the general expert for general-domain inputs and suppresses irrelevant experts for specialized-domain inputs. Domain-specific expert updates promote specialization by updating only the corresponding expert and router during adaptation to each domain while freezing all other parameters. Our experiments show that DS-Upcycling offers the highest average performance across specialized and general domains. After adaptation, it achieves 90–98% routing accuracy on specialized domains compared with 43–70% for existing upcycling baselines. Our analysis suggest that domain-aware router supervision and domain-specific expert updates help prioritize relevant domain knowledge while minimizing interference from irrelevant domains. These findings highlight the potential of upcycling for effective multi-domain adaptation.
Limitations
DS-Upcycling demonstrates strong multi-domain adaptation performance and mitigates forgetting. Unlike low-rank adaptation methods, DS-UPCYCLING allocates full MLP experts to prevent the expressivity bottlenecks common in multi-task LoRA. Consequently, while inference computation and latency remain bounded by sparse Top-2 activation, the total static parameter footprint stored in GPU memory scales linearly with the number of instantiated domains. An interesting avenue for future work is to integrate our approach with post-adaptation expert quantization or pruning. This would optimize the storage footprint in memory-constrained serving environments supporting multiple domains.
References
Nader Asadi, Mahdi Beitollahi, Yasser H. Khalil, Yinchuan Li, Guojun Zhang, and Xi Chen. 2024. Combining pre-trained IoRA modules improves few-shot adaptation of foundation models to new tasks. In ICML 2024 Workshop on Foundation Models in the Wild.
Pratyay Banerjee, Kuntal Kumar Pal, Arindam Mitra, and Chitta Baral. 2019. Careful selection of knowledge to solve open book question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 6120–6129, Florence, Italy. Association for Computational Linguistics.
Dan Biderman, Jacob Portes, Jose Javier Gonzalez Ortiz, Mansheej Paul, Philip Greengard, Connor Jennings, Daniel King, Sam Havens, Vitaliy Chiley, Jonathan Frankle, Cody Blakeney, and John Patrick Cunningham. 2024. LoRA learns less and forgets less. Transactions on Machine Learning Research. Featured Certification.
Yonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao, and Yejin Choi. 2020. PIQA: Reasoning about Physical Commonsense in Natural Language. In Thirty-Fourth AAAI Conference on Artificial Intelligence.
Mingzi Cao, Xingwei Tan, Mahmud Elahi Akhter, Marco Valentino, Maria Liakata, Xi Wang, and Nikolaos Aletras. 2026a. Fundamental reasoning paradigms induce out-of-domain generalization in language models. In Findings of the Association for Computational Linguistics: ACL 2026, pages 33025–33046, San Diego, California, United States. Association for Computational Linguistics.
Mingzi Cao, Xi Wang, and Nikolaos Aletras. 2026b. Optimal transport depth up-scaling. Preprint, arXiv:2508.08011.
Ilias Chalkidis, Ion Androutsopoulos, and Nikolaos Aletras. 2019. Neural legal judgment prediction in English. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4317–4323, Florence, Italy. Association for Computational Linguistics.
Ilias Chalkidis, Abhik Jana, Dirk Hartung, Michael Bommarito, Ion Androutsopoulos, Daniel Katz, and Nikolaos Aletras. 2022. LexGLUE: A benchmark dataset for legal language understanding in English. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 4310–4330, Dublin, Ireland. Association for Computational Linguistics.
Wuyang Chen, Yanqi Zhou, Nan Du, Yanping Huang, James Laudon, Zhifeng Chen, and Claire Cui. 2023. Lifelong language pretraining with distribution-specialized experts. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 5383–5395. PMLR.
Rajas Chitale, Ankit Vaidya, Aditya Kane, and Archana Santosh Ghotkar. 2023. Task arithmetic with IoRA for continual learning. In Workshop on Advancing Neural Network Training: Computational Efficiency, Scalability, and Resource Optimization (WANT@NeurIPS 2023).
Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. 2019. BoolQ: Exploring the surprising difficulty of natural yes/no questions. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 2924–2936, Minneapolis, Minnesota. Association for Computational Linguistics.
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. 2018. Think you have solved question answering? try arc, the ai2 reasoning challenge. Preprint, arXiv:1803.05457.
Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The pascal recognising textual entailment challenge. In Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment, MLCW'05, page 177–190, Berlin, Heidelberg. Springer-Verlag.
Tri Dao. 2024. FlashAttention-2: Faster attention with better parallelism and work partitioning. In The Twelfth International Conference on Learning Representations.
Shihan Dou, Enyu Zhou, Yan Liu, Songyang Gao, Wei Shen, Limao Xiong, Yuhao Zhou, Xiao Wang, Zhiheng Xi, Xiaoran Fan, Shiliang Pu, Jiang Zhu, Rui Zheng, Tao Gui, Qi Zhang, and Xuanjing Huang.
- LoRAMoE: Alleviating world knowledge forgetting in large language models via MoE-style plugin. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1932–1945, Bangkok, Thailand. Association for Computational Linguistics.
William Fedus, Barret Zoph, and Noam Shazeer. 2022. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39.
Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, and 5 others. 2024. A framework for few-shot language model evaluation.
Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, and et al. 2024. The Llama 3 Herd of Models. Preprint, arXiv:2407.21783.
Yu Gu, Robert Tinn, Hao Cheng, Michael Lucas, Naoto Usuyama, Xiaodong Liu, Tristan Naumann, Jianfeng Gao, and Hoifung Poon. 2021. Domain-specific language model pretraining for biomedical natural language processing. ACM Trans. Comput. Healthcare, 3(1).
Wenhan Han, Meng Fang, Zihan Zhang, Yu Yin, Zirui Song, Ling Chen, Mykola Pechenizkiy, and Qingyu Chen. 2024. MedINST: Meta dataset of biomedical instructions. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 8221–8240, Miami, Florida, USA. Association for Computational Linguistics.
Peter Henderson, Mark Krass, Lucia Zheng, Neel Guha, Christopher D Manning, Dan Jurafsky, and Daniel Ho. 2022. Pile of law: Learning responsible data filtering from the law and a 256gb open-source legal dataset. In Advances in Neural Information Processing Systems, volume 35, pages 29217–29234. Curran Associates, Inc.
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. 2021. Measuring Massive Multitask Language Understanding. In International Conference on Learning Representations.
Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations.
Di Jin, Eileen Pan, Nassim Oufattole, Wei-Hung Weng, Hanyi Fang, and Peter Szolovits. 2021. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. Applied Sciences, 11(14).
Qiao Jin, Bhuwan Dhingra, Zhengping Liu, William Cohen, and Xinghua Lu. 2019. PubMedQA: A dataset for biomedical research question answering. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 2567–2577, Hong Kong, China. Association for Computational Linguistics.
Aran Komatsuzaki, Joan Puigcerver, James Lee-Thorp, Carlos Riquelme Ruiz, Basil Mustafa, Joshua Ainslie, Yi Tay, Mostafa Dehghani, and Neil Houlsby. 2023. Sparse upcycling: Training mixture-of-experts from dense checkpoints. In The Eleventh International Conference on Learning Representations.
Hongyu Li, Liang Ding, Meng Fang, and Dacheng Tao. 2024. Revisiting catastrophic forgetting in large language model tuning. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 4297–4308, Miami, Florida, USA. Association for Computational Linguistics.
Jiwei Li, Will Monroe, and Dan Jurafsky. 2017. Understanding neural networks through representation erasure. Preprint, arXiv:1612.08220.
Junzhuo Li, Bo Wang, Xiuze Zhou, and Xuming Hu. 2025. Dynamic expert specialization: Towards catastrophic forgetting-free multi-domain MoE adaptation. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 18478–18493, Suzhou, China. Association for Computational Linguistics.
Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon, and Tie-Yan Liu. 2022. Biogpt: generative pre-trained transformer for biomedical text generation and mining. Briefings in Bioinformatics, 23(6):bbac409.
Yun Luo, Zhen Yang, Fandong Meng, Yafu Li, Jie Zhou, and Yue Zhang. 2025. An empirical study of catastrophic forgetting in large language models during continual fine-tuning. IEEE Transactions on Audio, Speech and Language Processing, 33:3776–3786.
Nasrin Mostafazadeh, Nathanael Chambers, Xiaodong He, Devi Parikh, Dhruv Batra, Lucy Vanderwende, Pushmeet Kohli, and James Allen. 2016. A corpus and cloze evaluation for deeper understanding of commonsense stories. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 839–849, San Diego, California. Association for Computational Linguistics.
Niklas Muennighoff, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Jacob Morrison, Sewon Min, Weijia Shi, Evan Pete Walsh, Oyvind Tafjord, Nathan Lambert, Yuling Gu, Shane Arora, Akshita Bhagia, Dustin Schwenk, David Wadden, Alexander Wettig, Binyuan Hui, Tim Dettmers, Douwe Kiela, and
5 others. 2025. OLMoe: Open mixture-of-experts language models. In The Thirteenth International Conference on Learning Representations.
Taishi Nakamura, Takuya Akiba, Kazuki Fujii, Yusuke Oda, Rio Yokota, and Jun Suzuki. 2025. Drop-upcycling: Training sparse mixture of experts with partial re-initialization. In International Conference on Learning Representations, volume 2025, pages 84370–84397.
Joel Niklaus, Veton Matoshi, Matthias Stürmer, Ilias Chalkidis, and Daniel Ho. 2024. MultiLegalPile: A 689GB multilingual legal corpus. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15077–15094, Bangkok, Thailand. Association for Computational Linguistics.
Joel Niklaus, Lucia Zheng, Arya D. McCarthy, Christopher Hahn, Brian M Rosen, Peter Henderson, Daniel E. Ho, Garrett Honke, Percy Liang, and Christopher D Manning. 2025. LawInstruct: A resource for studying language model adaptation to the legal domain. In Findings of the Association for Computational Linguistics: NAACL 2025, pages 127–152, Albuquerque, New Mexico. Association for Computational Linguistics.
Ankit Pal, Logesh Kumar Umapathi, and Malaikannan Sankarasubbu. 2022. Medmcqa: A large-scale multi-subject multi-choice dataset for medical domain question answering. In Proceedings of the Conference on Health, Inference, and Learning, volume 174 of Proceedings of Machine Learning Research, pages 248–260. PMLR.
Denis Paperno, Germán Kruszewski, Angeliki Lazari-dou, Ngoc Quan Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernández. 2016. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1525–1534, Berlin, Germany. Association for Computational Linguistics.
Baolin Peng, Chunyuan Li, Pengcheng He, Michel Galley, and Jianfeng Gao. 2023. Instruction tuning with gpt-4. Preprint, arXiv:2304.03277.
Sergey Pletenev, Maria Marina, Daniil Moskovskiy, Vasily Konovalov, Pavel Braslavski, Alexander Panchenko, and Mikhail Salnikov. 2025. How much knowledge can you pack into a LoRA adapter without harming LLM? In Findings of the Association for Computational Linguistics: NAACL 2025, pages 4309–4322, Albuquerque, New Mexico. Association for Computational Linguistics.
Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2021. Winogrande: an adversarial winograd schema challenge at scale. Commun. ACM, 64(9):99–106.
Karan Singhal, Shekoofeh Azizi, Tao Tu, S. Sara Mahdavi, Jason Wei, Hyung Won Chung, Nathan Scales, Ajay Tanwani, Heather Cole-Lewis, Stephen Pfohl, Perry Payne, Martin Seneviratne, Paul Gamble, Chris Kelly, Nathaneal Scharli, Aakanksha Chowdhery, Philip Mansfield, Blaise Aguera y Arcas, Dale Webster, and 11 others. 2022. Large language models encode clinical knowledge. Preprint, arXiv:2212.13138.
Karan Singhal, Tao Tu, Juraj Gottweis, Rory Sayres, Ellery Wulczyn, Le Hou, Kevin Clark, Stephen Pfohl, Heather Cole-Lewis, Darlene Neal, Mike Schaekermann, Amy Wang, Mohamed Amin, Sami Lachgar, Philip Mansfield, Sushant Prakash, Bradley Green, Ewa Dominowska, Blaise Aguera y Arcas, and 12 others. 2023. Towards expert-level medical question answering with large language models. Preprint, arXiv:2305.09617.
Sainbayar Sukhbaatar, Olga Golovneva, Vasu Sharma, Hu Xu, Xi Victoria Lin, Baptiste Roziere, Jacob Kahn, Shang-Wen Li, Wen tau Yih, Jason E Weston, and Xian Li. 2024. Branch-train-mix: Mixing expert LLMs into a mixture-of-experts LLM. In First Conference on Language Modeling.
Xiao Wang, Tianze Chen, Qiming Ge, Han Xia, Rong Bao, Rui Zheng, Qi Zhang, Tao Gui, and Xuanjing Huang. 2023. Orthogonal subspace learning for language model continual learning. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10658–10671, Singapore. Association for Computational Linguistics.
Zihan Wang, Deli Chen, Damai Dai, Runxin Xu, Zhuoshu Li, and Yu Wu. 2024. Let the expert stick to his last: Expert-specialized fine-tuning for sparse architectural large language models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 784–801, Miami, Florida, USA. Association for Computational Linguistics.
Tianwen Wei, Bo Zhu, Liang Zhao, Cheng Cheng, Biye Li, Weiwei Lü, Peng Cheng, Jianhao Zhang, Xiaoyu Zhang, Liang Zeng, Xiaokun Wang, Yutuan Ma, Rui Hu, Shuicheng Yan, Han Fang, and Yahui Zhou. 2024. Skywork-moe: A deep dive into training techniques for mixture-of-experts language models. Preprint, arXiv:2406.06563.
Miles Williams, George Chrysostomou, Vitor Amancio Jeronymo, and Nikolaos Aletras. 2026. Compressing language models for specialized domains. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pages 7393–7415, Rabat, Morocco. Association for Computational Linguistics.
Chengyue Wu, Yukang Gan, Yixiao Ge, Zeyu Lu, Jiahao Wang, Ye Feng, Ying Shan, and Ping Luo. 2024. LLaMA pro: Progressive LLaMA with block expansion. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6518–6537, Bangkok, Thailand. Association for Computational Linguistics.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, and 41 others. 2025a. Qwen3 technical report. Preprint, arXiv:2505.09388.
Yaming Yang, Dilxat Muhtar, Yelong Shen, Yuefeng Zhan, Jianfeng Liu, Yujing Wang, Hao Sun, Weiwei Deng, Feng Sun, Qi Zhang, Weizhu Chen, and Yunhai Tong. 2025b. Mtl-lora: low-rank adaptation for multi-task learning. In Proceedings of the Thirty-Ninth AAAI Conference on Artificial Intelligence and Thirty-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence, AAAI'25/IAAI'25/EAAI'25. AAAI Press.
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. 2019. HellaSwag: Can a machine really finish your sentence? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4791–4800, Florence, Italy. Association for Computational Linguistics.
Xue Zhang, Yunlong Liang, Fandong Meng, Songming Zhang, Yufeng Chen, Jinan Xu, and Jie Zhou. 2025. Less, but better: Efficient multilingual expansion for LLMs via layer-wise mixture-of-experts. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 17948–17963, Vienna, Austria. Association for Computational Linguistics.
Lucia Zheng, Neel Guha, Brandon R. Anderson, Peter Henderson, and Daniel E. Ho. 2021. When does pretraining help? assessing self-supervised learning for law and the casehold dataset of 53,000+ legal holdings. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Law, ICAIL '21, page 159–168, New York, NY, USA. Association for Computing Machinery.
Hao Zhou, Zhijun Wang, Shujian Huang, Xin Huang, Xue Han, Junlan Feng, Chao Deng, Weihua Luo, and Jiajun Chen. 2025. Moe-lpr: multilingual extension of large language models through mixture-of-experts with language priors routing. In Proceedings of the Thirty-Ninth AAAI Conference on Artificial Intelligence and Thirty-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence, AAAI'25/IAAI'25/EAAI'25. AAAI Press.
A Implementation details
Following Fedus et al. (2022) and Cao et al. (2026a), we upcycle the base model's odd-numbered layers so that half become sparse MoE layers. Each upcycled layer retains the original MLP as the general expert and adds two specialized experts for the legal and biomedical domains. We use Top-2 routing to activate the two experts with the highest routing probabilities (Fedus et al., 2022).
For Random Initialization, we initialize new expert weights from following Yang et al. (2025a). For Random Perturbation, we replace 50% of each new expert's weights with values sampled from following Muennighoff et al. (2025). For Partial Initialization, we re-initialize 50% of each new expert's weights using Gaussian distributions matched to their original mean and variance following Nakamura et al. (2025).
We use similar parameter counts across the multi-domain adaptation baselines for a fair comparison. All these baselines update only newly added parameters except Simple FT. Each LoRA adapter has rank 1024 for LoRA and 1536 for LoRAMoE. For LLaMA-Pro, we divide the base model into four layer groups and insert seven new transformer layers per group.
B Hyper-parameter Details
We use a global batch size of 64 and a sequence length of 4096. For both domains, we use a cosine learning rate schedule with warm-up and decay from to . During biomedical adaptation, we lower this range to for the upcycling baselines and Simple FT because the original range yielded poor performance in our preliminary experiments. We fine-tune all models on a single NVIDIA GH200 (96GB) using FlashAttention 2 (Dao, 2024) and bf16 mixed precision. We evaluate all models zero-shot using the Language Model Evaluation Harness (Gao et al., 2024).
C Ablation Results
Tables 6 and 7 present the full ablation results on specialized and general domains, respectively.
D Use of Generative AI Tools
The authors acknowledge the use of GPT-6 Astra during the preparation of this manuscript. Its use is limited to improving the grammar and clarity of the original draft.
| Biomedical | Legal | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Methods | MedMCQA | MedQA | Bio-MMLU | PubMedQA | Avg | Law-MMLU | CaseHOLD | ECtHR | Avg | |
| Llama-3.1-8B | DS-Upcycling | |||||||||
| w/o DA Router Superv. | ||||||||||
| w/o DS Expert Upd. | ||||||||||
| Owen-3-8B | DS-Upcycling | |||||||||
| w/o DA Router Superv. | ||||||||||
| w/o DS Expert Upd. | ||||||||||
Table 6: Ablation performance on specialized domains.
| Methods | ARC-C | ARC-E | BoolQ | HellaSwag | LAMBADA | OpenBookQA | PIQA | RTE | WinoGrande | StoryCloze | Avg | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama-3.1-8B | DS-Upcycling | * | * | * | * | * | ||||||
| w/o DA Router Superv. | ||||||||||||
| w/o DS Expert Upd. | ||||||||||||
| Owen-3-8B | DS-Upcycling | * | * | * | * | * | * | * | ||||
| w/o DA Router Superv. | ||||||||||||
| w/o DS Expert Upd. |
Table 7: Ablation performance on general domain.