betaFeedback

WorksComputer Science

Task-Oriented Rank Adaptation for Continual Learning in Text Classification

Abstract

Continual learning (CL) in text classification faces two critical challenges: catastrophic forgetting and negative transfer across sequential tasks. Parameter-Efficient Fine-Tuning (PEFT) methods such as LoRA enable efficient adaptation by learning low-rank updates of the model parameters. However, these compact representations are normally trained in isolation, limiting their reuse across related tasks. We introduce Task-Oriented Rank Adaptation (TORA), a geometric routing framework that leverages the low-rank structure of LoRA adapters to decide whether to transfer knowledge from the most compatible expert (Boosting) or isolate the new task (Shielding) based on structural similarity. Evaluated across 15 diverse text classification benchmarks, TORA consistently avoids harmful routing decisions: compatible tasks exceed their isolated performance while reducing training time, and structurally distant tasks are protected from interference with no loss in accuracy. With a single geometric threshold and no reliance on task identities or predefined sequences, TORA provides a simple and effective approach for dynamic adapter routing in sequential text classification systems.

Introduction

Transformer architectures have established the fundamental baseline for Text Classification applications [20]. However, extending these architectures to operate in sequential and dynamic environments introduces the Continual Learning (CL) problem, a machine learning paradigm that involves training a model on a sequential stream of tasks [4]. The primary objective is to adapt to new domains while maintaining high performance on previously seen tasks, even when access to historical training data is no longer available.

When a neural network is trained incrementally across multiple domains, it is highly susceptible to catastrophic forgetting [13], a phenomenon where learning new representations overwrites and degrades previously learned parameters. Furthermore, adapting the model to new data distributions often leads to negative transfer [25], where the interference between unrelated tasks deteriorates the overall accuracy and stability of the system.

To mitigate catastrophic forgetting, recent literature has heavily adopted Parameter-Efficient Fine-Tuning (PEFT) mechanisms [6]. Specifically, Low-Rank Adaptation (LoRA) encapsulates task-specific learning into small, low-dimensional weight matrices [8]. By keeping the original pre-trained model frozen, LoRA perfectly protects the base knowledge from being overwritten.

However, this architectural separation also becomes a major limitation in continual learning scenarios, because these standard PEFT modules operate in strict isolation, the learned representations remain stored within their specific adapters. This strict separation prevents positive transfer between tasks with similar data distributions [2]. Consequently, models are forced to learn similar concepts from Scratch for every new task, ignoring the computational advantages of knowledge reuse and unnecessarily increasing the number of parameters.

We introduce Task-Oriented Rank Adaptation (TORA), a dynamic routing framework that overcomes the limitations of static adapter isolation in continual learning. In TORA, each previously learned LoRA adapter is treated as an expert, and the shared SVD reference space is constructed from the collection of all learned experts. Incoming tasks are projected into this common geometric space, where structural affinity is estimated through cosine similarity [14] between the new task and the stored experts. When affinity is detected, the router transfers knowledge from the most compatible expert to accelerate convergence (Boosting); otherwise, it enforces parameter isolation to prevent negative interference (Shielding) [15]. We validate this framework through a geometric analysis of 15 text classification benchmarks and a Monte Carlo simulation, demonstrating empirical advantages over static baselines in both accuracy and parameter efficiency.

The main contributions of this work are summarized as follows:

  • We propose Task-Oriented Rank Adaptation (TORA), a geometric routing framework that estimates task affinity directly from LoRA adaptation weights in a shared SVD reference space, eliminating the need for semantic routing or trainable gating networks.

  • We introduce a compact geometric task fingerprint that represents each LoRA adapter as a low-dimensional structural signature. These fingerprints enable efficient similarity estimation while avoiding computationally expensive manifold-based comparisons, making dynamic routing practical for continual learning.

  • We validate the proposed framework on 15 text classification benchmarks and Monte Carlo simulations, demonstrating improved routing reliability, positive transfer, and computational savings over isolated training.

Related Work

In text classification, CL addresses the challenge of training models on sequential data streams without suffering from catastrophic forgetting. Early measures primarily focused on regularization, which penalizes changes to essential weights [10], and rehearsal mechanisms, which store [3] or generate [19] examples of past domains. Although these methods prove effective, they impose limitations in memory and computational cost. Conversely, recent paradigms highlight a positive aspect of sequential learning: accumulating knowledge across multiple domains can actively enhance a model’s few-shot adaptation capabilities [9]. Building upon these insights, the proposed TORA framework transitions from expensive data-replay and complex regularization strategies to a purely parameter-efficient geometric routing. By evaluating structural task affinities, TORA dynamically transfers past knowledge to accelerate convergence on related domains, while strictly isolating incompatible parameters to prevent interference.

To reduce the cost of adapting large language models, PEFT methods such as LoRA have become standard. LoRA freezes the base model and learns low-rank updates, allowing multiple tasks to be trained one after another in the same model. This makes training more efficient and scalable. However, it still does not define how knowledge should be shared or separated between tasks.

Recent research has proposed dynamic architectural approaches to overcome static isolation. Methods such as orthogonal adaptation [23] and multi-task dynamic routing [24] attempt to project new knowledge into distinct subspaces or learn unified representations. While these approaches improve parameter distribution, they often rely on trainable routing mechanisms or computationally expensive similarity estimation, and still lack a simple criterion to evaluate the structural compatibility between sequential tasks before initialization. This reveals a gap for a lightweight routing strategy that directly exploits the geometry of adapter parameters. TORA addresses this gap by representing each task as a compact geometric fingerprint in a shared SVD reference space, enabling deterministic structural similarity estimation without semantic representations, trainable routing modules, or computationally expensive manifold operations.

The TORA Framework

TORA evaluates the geometric compatibility between sequential domains before parameter initialization, replacing the default assumption of task isolation in PEFT methods. An expert is defined as a task-specific LoRA adapter trained on a given domain and stored in a memory pool, encapsulating its optimized weights without interfering with previously learned distributions. Figure 1 illustrates the high-level operation of the framework.

Architectural diagram of the Task-Oriented Rank Adaptation framework

Figure 1. Architectural diagram of the Task-Oriented Rank Adaptation (TORA) framework. The diagram illustrates the routing process, structural affinity evaluation and the memory of task experts.

Specifically, the continual learning cycle works as follows: when a new task arrives, it is trained for one epoch to get a partial adapter. The SVD of its weights is then computed to extract its geometric fingerprint (ϕnew\phi_{new}). This representation is compared against the reference space built from the previously stored experts. If the structural similarity is above the angular threshold, the router triggers a transfer protocol, loading the weights of the most compatible expert as a starting point for the new task. If not, the shielding protocol is activated and new adaptation matrices (AA and BB) are trained from scratch. Once training is complete, the resulting adapter is saved to the memory pool, updating the reference space for any future tasks.

The framework builds upon the mathematical foundation of LoRA. During standard training, LoRA freezes a pre-trained weight matrix W0∈Rd×dW_0 \in\mathbb{R}^{d \times d} and constrains its update by representing it with a low-rank decomposition ΔW=BA\Delta W = BA. The matrices are defined as B∈Rd×rB \in\mathbb{R}^{d \times r} and A∈Rr×dA \in\mathbb{R}^{r \times d}, where the rank r≪dr \ll d. The forward pass is thus modified to:

W=W0+ΔW=W0+BAW = W_0 + \Delta W = W_0 + BA

Within this formulation, matrix AA acts as a feature extractor that maps the input down to a lower-dimensional, information-dense subspace. Matrix BB subsequently projects these representations back to the original dimension. By capturing task-specific knowledge in these low-rank matrices, the model significantly reduces the number of trainable parameters.

To enable dynamic routing, TORA evaluates the structural affinity of these learned projections. During the training phase of a new task, TORA applies SVD to the existing adapter weight matrices to isolate their core semantic directions. For a given adaptation matrix ΔW\Delta W, the decomposition is defined as:

ΔW=UΣVT\Delta W = U\Sigma V^{T}

where the orthogonal matrix UU contains the left singular vectors that define the geometric rotation in the output space, the diagonal matrix Σ\Sigma contains the singular values that quantify the magnitude of variance along each principal direction, and the matrix VV contains the principal components that define the spatial orientation of the learned task.

Reference Space Construction

To determine geometric compatibility, the system first builds a shared geometric space from the N−1N-1 previously learned LoRA adapters, since the incoming (NN-th) task is the one currently being evaluated and has not yet become an expert. Each expert denotes the complete set of LoRA adaptation parameters associated with a previously learned task. For each layer ll and attention projection pp, the corresponding weight tensors are flattened into vectors and stacked into a variability matrix.

In simple terms, this matrix acts as a consolidated memory bank that aggregates the parametric signatures of all previously learned domains. By grouping these isolated expert vectors together, the resulting matrix captures the complete spatial variance of the model’s history. This representation is highly effective because it allows the subsequent SVD to extract the shared principal components creating a unified reference space to evaluate any new incoming task:

M(l,p)=[vec⁡(A1(l,p))∣vec⁡(B1(l,p))∣⋯∣vec⁡(AN−1(l,p))∣vec⁡(BN−1(l,p))]∈RD×(N−1)(1)\mathbf{M}^{(l,p)} = \left[ \operatorname{vec}\left(A_1^{(l,p)}\right) \mid\operatorname{vec}\left(B_1^{(l,p)}\right) \mid\cdots\mid\operatorname{vec}\left(A_{N-1}^{(l,p)}\right) \mid\operatorname{vec}\left(B_{N-1}^{(l,p)}\right) \right] \in\mathbb{R}^{D \times(N-1)} \tag*{(1)}

where D=d×rD = d \times r and vec⁡(⋅)\operatorname{vec}(\cdot) flattens a matrix into a column vector. After row-wise centering, SVD is applied:

M~(l,p)=U(l,p)S(l,p)V(l,p)T(2)\widetilde{\mathbf{M}}^{(l,p)} = \mathbf{U}^{(l,p)} \mathbf{S}^{(l,p)} \mathbf{V}^{(l,p)\mathsf{T}} \tag*{(2)}

The left singular vectors U(l,p)\mathbf{U}^{(l,p)} form the orthonormal basis of the reference space [7]. Only the first kk components are retained, where kk is the minimum number of directions that explain 60% of the total variance:

k=min⁡{j | ∑i=1jsi2∑i=1N−1si2≥0.60}(3)k = \min\left\{ j \,\middle|\, \frac{\sum_{i=1}^{j} s_i^2}{\sum_{i=1}^{N-1} s_i^2} \ge0.60 \right\} \tag*{(3)}

In the context of a continuous stream of NN domains, this formulation establishes an iterative routing cycle. At any given step, the memory pool maintains N−1N - 1 established expert representations to evaluate a single incoming task. Following adaptation, the newly processed task is integrated into the expert memory, dynamically updating the reference space for the subsequent iteration.

Task Fingerprint Generation

To characterize a task in the reference space, its LoRA weights are projected onto the kk selected singular vectors as:

λ(l,p)=Uk(l,p)T⋅vec⁡(W(l,p))(4)\boldsymbol{\lambda}^{(l,p)} = \mathbf{U}_k^{(l,p)\mathsf{T}} \cdot\operatorname{vec}\left(\mathbf{W}^{(l,p)}\right) \tag*{(4)}

where W(l,p)\mathbf{W}^{(l,p)} denotes the LoRA weight matrix at layer ll and projection pp, vec⁡(⋅)\operatorname{vec}(\cdot) vectorizes it, and Uk(l,p)\mathbf{U}_k^{(l,p)} contains the top-kk singular vectors obtained via SVD from historical task representations (Section 3.1). The resulting λ(l,p)∈Rk\lambda^{(l,p)} \in\mathbb{R}^{k} encodes the alignment of the task with the principal directions of the reference space.

The task fingerprint is then constructed by concatenating these projections across all adaptation weights. In the case of DistilBERT, which comprises 6 Transformer layers with LoRA modules applied to the (q_lin, k_lin, and v_lin) projections, this results in 18 modules and 36 parameter matrices (AA and BB per module).

By projecting each of these 36 matrices onto its k=4k = 4 most relevant singular vectors (the eigenvectors that satisfy the variance threshold), the model is compressed from its high-dimensional parameter space into an exact coordinate:

ϕ=[λA(1,q)∥λB(1,q)∥⋯∥λB(6,v)]∈R144(5)\phi= \left[\lambda_{A}^{(1,q)} \mathbin{\|} \lambda_{B}^{(1,q)} \mathbin{\|} \cdots\mathbin{\|} \lambda_{B}^{(6,v)}\right] \in\mathbb{R}^{144} \tag*{(5)}

This 144-dimensional vector (36 sub-matrices × 4 principal components) encodes the absolute position of the task in the shared SVD space, and serves as the compact geometric signature used by the router to compare structural affinities across datasets.

Routing Mechanism with Shielding and Boosting

The routing mechanism operates entirely a priori: the transfer decision is made before completing the full training of the incoming task, incurring only the cost of a single training epoch (approximately 10–12 seconds). Let E={e1,e2,…,eN−1}\mathcal{E} = \{e_1, e_2, \ldots, e_{N-1}\} denote the set of N−1N - 1 expert adapters stored in memory. The procedure is as follows:

  1. Initial training. The incoming task Tnew\mathcal{T}_{\mathrm{new}} is trained for 1 epoch, yielding a partial adapter with weights {Anew(l,p),Bnew(l,p)}\{\mathbf{A}_{\mathrm{new}}^{(l,p)}, \mathbf{B}_{\mathrm{new}}^{(l,p)}\}.

  2. SVD space construction. The reference space is built from the N−1N - 1 stored experts following the procedure described in Section 3.1.

  3. Fingerprint computation. Let ϕnew\phi_{\mathrm{new}} represent the extracted principal component vector of the incoming task, and ϕi\phi_i represent the vectors of the previously learned experts. To obtain these representations, the partial adapter of the incoming task (trained for 1 epoch) and the adapters of all experts (trained for 20 epochs) are projected onto the shared SVD space, yielding the final dimensional fingerprints ϕnew,ϕi∈R144\phi_{\mathrm{new}}, \phi_i \in\mathbb{R}^{144} for each expert ei∈Ee_i \in\mathcal{E}.

  4. Similarity ranking. Subsequently, the framework employs cosine similarity as the parametric distance metric to quantify the geometric overlap between representations. The structural affinity dictates the adaptation strategy through the following protocol:

The cosine similarity and angular distance between the incoming task and each expert are computed as:

θi=arccos⁡(ϕnew⋅ϕi∥ϕnew∥∥ϕi∥)⋅180∘π,i=1,…,N−1(6)\theta_i = \arccos\left(\frac{\phi_{\mathrm{new}} \cdot\phi_i}{\lVert\phi_{\mathrm{new}}\rVert\lVert\phi_i\rVert}\right) \cdot\frac{180^\circ}{\pi}, \qquad i = 1, \ldots, N - 1 \tag*{(6)}

The experts are then sorted in ascending order of θi\theta_i, defining a ranking σ\sigma such that:

θσ(1)≤θσ(2)≤⋯≤θσ(N−1)(7)\theta_{\sigma(1)} \le\theta_{\sigma(2)} \le\cdots\le\theta_{\sigma(N-1)} \tag*{(7)}

where σ(k)\sigma(k) denotes the index of the kk-th most similar expert. In particular, σ(1)\sigma(1) identifies the Top-1 expert: the stored adapter whose weight space is geometrically closest to the incoming task.

5. Routing decision. The mean angular distance over the Top-3 most similar experts is used as the decision router tool, derived in the § 4.1 and is calculated as:

θˉ3=13∑k=13θσ(k)(8)\bar{\theta}_3 = \frac{1}{3}\sum_{k=1}^{3}\theta_{\sigma(k)} \tag*{(8)}

This average characterizes the geometric neighborhood of the incoming task. The routing decision is then:

Winit={Wexp(σ(1))if θˉ3<84.5∘(TORA: Top-1 expert transfer)W0if θˉ3≥84.5∘(Shielding: train from scratch)(9)\mathbf{W}_{\mathrm{init}} = \begin{cases} \mathbf{W}_{\mathrm{exp}(\sigma(1))} & \text{if } \bar{\theta}_3 < 84.5^\circ\quad\text{(TORA: Top-1 expert transfer)} \\ \mathbf{W}_0 & \text{if } \bar{\theta}_3 \ge84.5^\circ\quad\text{(Shielding: train from scratch)} \end{cases} \tag*{(9)}

where Wexp(σ(1))\mathbf{W}_{\mathrm{exp}(\sigma(1))} are the weights of the Top-1 expert and W0\mathbf{W}_0 denotes randomly initialized LoRA weights.

6. Full training. The incoming task is trained to completion using Winit\mathbf{W}_{\mathrm{init}} as initialization. Upon convergence, the resulting adapter is stored in memory as a new expert available for future routing decisions.

Experimental Setup

To evaluate the proposed framework across diverse linguistic domains, the experimental setup includes 15 text classification datasets. The selected benchmarks cover a wide range of Text Classification tasks to ensure a robust evaluation of the structural affinity metric across geometrically distinct data distributions, as used in previous work [23].

Datasets and Benchmarks

For reproducibility TORA is evaluated on a set of 15 text classification tasks derived from three sources: Yelp Polarity, Amazon Polarity, Yahoo Answers, and AG News datasets [26], DBPedia [11], GLUE [22], and SuperGLUE [21]. Table 1 summarizes the selected tasks.

TaskBenchmarkTypeDescription
Yelp PolarityCL BenchmarkBinary classificationSentiment in Yelp reviews
Amazon PolarityCL BenchmarkBinary classificationSentiment in Amazon reviews
DBPedia-14CL Benchmark14-class classificationDBPedia article categories
Yahoo AnswersCL Benchmark10-class classificationTopics in Yahoo questions
AG NewsCL Benchmark4-class classificationNews classification
MNLIGLUENatural language inferenceEntailment/contradiction/neutral
QQPGLUEParaphrase detectionDuplicate question detection
RTEGLUENatural language inferenceBinary entailment
SST-2GLUEBinary classificationSentiment in movie reviews
WiCSuperGLUEWord sense disambiguationWord sense in context
CBSuperGLUENatural language inference3-class entailment
COPASuperGLUECausal reasoningPlausible alternative selection
BoolQSuperGLUEBinary QAYes/no questions on paragraphs
MultiRCSuperGLUEMultiple-choice QAMulti-sentence questions
IMDBStandaloneBinary classificationSentiment in movie reviews

Table 1. Evaluation tasks for the TORA framework.

Implementation Details

The experiments use DistilBERT [18], a distilled version of BERT [5] that retains 97% of its performance with 40% of the parameters. For the PEFT configuration (Table 2), LoRA modules are injected into the self-attention layers of the Transformer [12].

HyperparameterValue
Base modelDistilBERT-base-uncased
LoRA rank (rr)64
LoRA alpha (α\alpha)16
LoRA dropout0.1
LoRA biasnone
LoRA target modulesq_lin, k_lin, v_lin
Transformer layers6
Expert training epochs20
Routing epoch1
Learning rate (all tasks)5×10−55 \times10^{-5}
SVD variance threshold60%
Fingerprint dimensionality144
Angular routing threshold (θˉ3\bar{\theta}_3)84.5°

Table 2. Experimental hyperparameter configuration.

Following [8], we set the adaptation rank to r=64r = 64, as larger ranks yield diminishing returns while lower ranks already capture the relevant adaptation subspace. This choice balances expressivity and efficiency for the 15 heterogeneous NLP tasks considered (r≪d=768r \ll d = 768).

For DistilBERT (d=768d = 768), this results in adapter matrices A∈R64×768A \in\mathbb{R}^{64 \times768} and B∈R768×64B \in\mathbb{R}^{768 \times64}, reducing the number of trainable parameters per projection from d2d^2 to 2rd2rd (i.e., ∼6×\sim6\times reduction). Across all 18 LoRA-injected projections, this yields 1.77M parameters per task, compared to 10.62M for full fine-tuning.

Within the PEFT configuration (Table 2), we set α=16\alpha= 16, dropout= 0.1, and bias=none, following standard LoRA practice [8]. Freezing bias terms ensures that task-specific information is captured exclusively by the low-rank adapters, which is required for our SVD-based analysis. We compare two training settings: Scratch, where LoRA adapters are randomly initialized for each task, and Transfer, where TORA initializes adapters via the proposed similarity-based routing mechanism.

Evaluation Methodology and Experimental Results

We evaluate continual learning along two complementary dimensions. First, we analyze temporal dynamics by tracking accuracy across epochs, comparing TORA against a continuous baseline (a single LoRA adapter without parameter isolation). This reveals when positive transfer (Boosting) occurs and confirms effective mitigation of catastrophic forgetting. Second, we assess robustness to task order via a Monte Carlo simulation [16] with N=100,000N = 100{,}000 random task sequences, estimating long-term behavior under stochastic arrivals and the probability of transfer or isolation. Based on this, tasks are categorized as structural hubs that enable knowledge sharing or isolated nodes that require shielding.

Experimental results

Table 3 shows a geometric structure across the 15 benchmarks. While all tasks remain below 84.5∘84.5^\circ when considering only the nearest neighbor (θˉ1\bar{\theta}_1), progressively larger neighborhoods improve separability. The Top-3 average (θˉ3\bar{\theta}_3) yields the most stable boundary: tasks that benefit from transfer consistently fall below 84.5∘84.5^\circ, whereas isolated tasks exceed this threshold. In contrast, smaller neighborhoods are more sensitive to individual neighbor variability, while expanding to larger neighborhoods (e.g., θˉ4\bar{\theta}_4 and θˉ5\bar{\theta}_5) introduces more distant experts into the average, diluting the local geometric structure and leading to misclassifications such as AGNEWS. These results identify θˉ3\bar{\theta}_3 as the most robust routing criterion for the 15-task benchmark considered in this work; consequently, it was selected as the decision metric.

Taskθ1\theta_1θ2\theta_2θ3\theta_3θ4\theta_4θ5\theta_5θˉ1\bar{\theta}_1θˉ2\bar{\theta}_2θˉ3\bar{\theta}_3θˉ4\bar{\theta}_4θˉ5\bar{\theta}_5Decision
IMDB75.934878.215281.505481.947283.336475.934877.075078.551879.400680.1878Transfer
WIC78.260080.143286.151886.264286.381378.260079.201681.518382.704883.4401Transfer
RTE78.674979.507487.417287.724787.781878.674979.091281.866583.331184.2212Transfer
COPA79.540181.849782.747182.905683.082779.540180.694981.379081.760682.0250Transfer
YELP79.808084.110588.067388.844391.107479.808081.959383.995385.207586.3875Transfer
MULTIRC80.472180.750181.139682.091082.095480.472180.611180.787381.113281.3096Transfer
QQP81.152481.362181.650981.701581.984081.152481.257381.385581.466781.5702Transfer
YAHOO81.026784.476485.915286.195186.618681.026782.751683.806184.403484.8464Transfer
AMAZON82.072282.658284.582485.485185.599782.072282.365283.104383.699584.0795Transfer
BOOLQ82.321382.366482.522282.951583.208182.321382.343982.403382.540482.6739Transfer
DBPEDIA82.610582.673882.701182.812283.957582.610582.642182.661882.699482.9510Transfer
AGNEWS84.074784.074785.087485.122685.641884.074784.074784.412384.589884.8002Transfer
SST283.839885.184385.240785.952985.992683.839884.512184.754985.054485.2420Shielding
CB83.262585.932988.275888.563089.234683.262584.597785.823786.508587.0538Shielding
MNLI84.093485.457187.039289.423990.312984.093484.775385.529986.503487.2653Shielding

Table 3. Cosine similarity (in degrees) between each incoming task and its Top-5 nearest experts, along with cumulative averages θˉk\bar{\theta}_k for k=1,…,5k = 1, \ldots, 5. The routing threshold of 84.5∘84.5^\circ applied to θˉ3\bar{\theta}_3 provides the clearest separation between transfer and shielding decisions.

Interference Prevention (Shielding)

Table 4 shows demonstrates that TORA reliably prevents negative transfer by enforcing isolation when θˉ3≥84.5∘\bar{\theta}_3 \ge84.5^\circ. For CB, MNLI, and SST-2, this avoids degradation caused by incompatible representations. In particular, forcing transfer on MNLI reduces accuracy to 0.628 while doubling training time, whereas Shielding preserves baseline performance (0.652) with efficient 10-epoch training. This confirms that the routing mechanism not only enables transfer when beneficial, but also robustly avoids detrimental interactions.

TaskForced TransferScratch (TORA)Avoided DegradationEpochs SavedRouting Decision
CB0.8200.8200.00010Isolation (Scratch)
MNLI0.6280.652+0.02410Isolation (Scratch)
SST20.8700.8700.00010Isolation (Scratch)

Table 4. Interference Prevention: Performance and computational cost of forcing geometric transfer versus applying the Shielding protocol.

Positive Transfer (Boosting)

Table 5 shows that TORA effectively exploits geometric affinity (θˉ3<84.5∘\bar{\theta}_3 < 84.5^\circ) to enable positive transfer, surpassing isolated training (Scratch). Gains are particularly pronounced in tasks with higher abstraction or limited data. For instance, COPA achieves a +11.11% improvement while reducing training by 10 epochs when initialized from DBPedia, indicating efficient reuse of geometric aligned representations that accelerates convergence and enhances performance.

TaskScratch BaselineTORA AccuracyRelative GainEpochs SavedRouting Decision
COPA0.4500.500+11.11%10Transfer from DBPEDIA
MULTIRC0.5440.580+6.62%10Transfer from SST2
WIC0.6620.702+6.04%0Transfer from DBPEDIA
BOOLQ0.6320.656+3.80%10Transfer from QQP
RTE0.6020.621+3.16%5Transfer from YELP
AMAZON0.8760.892+1.83%10Transfer from AGNEWS
QQP0.7720.782+1.30%0Transfer from RTE
YAHOO0.7000.722+1.03%10Transfer from DBPEDIA
YELP0.8940.908+1.01%10Transfer from CB
IMDB0.8300.832+0.24%10Transfer from WIC

Table 5. Positive Transfer: Target tasks that surpassed their asymptotic accuracy limits under the TORA routing mechanism.

Temporal Dynamics and Performance

The geometric classification directly determines convergence dynamics. Table 5 and Table 4 shows epoch-wise validation accuracy across the 15 datasets, comparing isolated training against TORA. For geometric hubs (e.g., IMDB, MultiRC, QQP), TORA induces a clear Boosting effect: initializing from the nearest expert yields higher early accuracy and faster convergence, indicating effective reuse of aligned representations. For structurally divergent tasks (SST-2, MNLI, CB), TORA activates Shielding when θˉ3≥84.5∘\bar{\theta}_3 \ge84.5^\circ, preventing negative transfer. In these cases, isolated initialization preserves baseline performance while avoiding degradation, demonstrating that the routing mechanism both accelerates learning when beneficial and enforces isolation when necessary.

Monte Carlo simulations

To evaluate robustness to task order, we run a Monte Carlo simulation with 100,000 random task sequences (Table 6). The results confirm stable routing behavior: dissimilar tasks such as SST-2 and MNLI consistently trigger Shielding (99.5%), while related tasks like COPA achieve successful transfer in 80.8% of cases. These results indicate that routing decisions are driven by latent-space structure rather than task order, ensuring consistent performance in continual learning settings.

Task (Domain)Isolation Prob. (Scratch)Transfer Prob.Geometric Classification
The Isolated Cases (Isolators)
SST299.50%0.50%Highly Isolated Node
CB99.50%0.50%Highly Isolated Node
MNLI99.50%0.50%Highly Isolated Node
AGNEWS69.00%31.00%Rigid Knowledge Node
The Compatible Cases (Hubs)
COPA19.20%80.80%Highly Compatible Node
MULTIRC19.40%80.60%Highly Compatible Node
BOOLQ19.90%80.10%Central Hub
IMDB21.80%78.20%Central Hub

Table 6. Routing probability distribution following Monte Carlo simulation (N=100,000N = 100,000).

Continual Learning Results and Dynamic Routing Efficacy

Since continual learning is highly sensitive to task order, we compare TORA against manually designed sequences derived from analysis: a similar-first (sentiment analysis, followed by topic classification, and finally reasoning tasks) order and its reverse as shown in Table 8. Table 7 shows that task ordering alone has a strong impact on performance, with results ranging from 60.75% to 66.99% across our two sequences, and from 64.8% to 72.3% across the three handcrafted orders of O-LoRA [23]. This confirms that manually defining optimal sequences is not scalable. In contrast, TORA removes this dependency entirely by dynamically deciding when to transfer or isolate knowledge based on geometric affinity, achieving AT=75.56%A_T = 75.56\% at best and AT=75.40%A_T = 75.40\% on average across all five evaluated sequences, outperforming O-LoRA in every tested order while exhibiting significantly lower variance across sequences (0.33% (TORA) vs 7.5% (O-LoRA)).

Method / ConfigurationOrderATA_T (%)
CL Ours (Similar Tasks First)160.75
CL Ours (Reverse Order)266.99
CL Ours Avg–63.87
O-LoRA [23]372.3
O-LoRA [23]464.8
O-LoRA [23]571.6
O-LoRA Avg–69.6
TORA175.45
TORA275.47
TORA375.23
TORA475.31
TORA575.56
TORA Avg–75.40

Table 7. Continual learning performance comparison across 15 text classification tasks. We report the Average Final Accuracy (ATA_T) for different sequence configurations.

FrameworkOrderTask Sequence
Ours1Yelp →\to Amazon →\to IMDB →\to SST-2 →\to Yahoo →\to DBPedia →\to AGNews →\to QQP →\to BoolQ →\to MultiRC →\to WiC →\to RTE →\to COPA →\to MNLI →\to CB
Ours2Exact reverse of Order 1
O-LoRA3MNLI →\to CB →\to WiC →\to COPA →\to QQP →\to BoolQ →\to RTE →\to IMDB →\to Yelp →\to Amazon →\to SST-2 →\to DBPedia →\to AGNews →\to MultiRC →\to Yahoo
O-LoRA4MultiRC →\to BoolQ →\to WiC →\to MNLI →\to CB →\to COPA →\to QQP →\to RTE →\to IMDB →\to SST-2 →\to DBPedia →\to AGNews →\to Yelp →\to Amazon →\to Yahoo
O-LoRA5Yelp →\to Amazon →\to MNLI →\to CB →\to COPA →\to QQP →\to RTE →\to IMDB →\to SST-2 →\to DBPedia →\to AGNews →\to Yahoo →\to MultiRC →\to BoolQ →\to WiC

Table 8. Detailed evaluation sequences for the static routing configurations.

Discussion

The results show a clear and consistent pattern across all 15 evaluated tasks. TORA never made a routing decision that hurt performance: tasks that were geometrically close to existing experts benefited from knowledge transfer, while structurally distant tasks were protected by the Shielding protocol. This was achieved without any task identity information or manually designed sequences, which suggests that the angular distance in the SVD parameter space is a reliable indicator of task compatibility across diverse text classification domains. The following subsections discuss the theoretical and practical implications of this finding.

Geometric Phase Transition and the Divergence Threshold

The threshold θˉ3=84.5∘\bar{\theta}_3 = 84.5^\circ emerges from the intrinsic geometry of the DistilBERT adapter space [1]. In high-dimensional spaces, orthogonal vectors (90∘90^\circ) indicate complete independence between subspaces, a property that O-LoRA explicitly exploits by projecting new task updates onto the orthogonal complement of previous ones [23]. TORA operates on the same geometric principle, but uses the angular distance as a continuous compatibility measure rather than enforcing strict orthogonality. A cosine similarity of 84.5∘84.5^\circ (≈0.095\approx0.095) marks the practical boundary where shared variance becomes too small to support positive transfer. Below this threshold, the gradient directions [17] of the incoming task align sufficiently with the prior expert to enable knowledge reuse. Above it, forcing parameter transfer acts as a perturbation that requires the optimizer to unlearn irrelevant features, degrading performance.

Structural Dynamics: Hubs vs. Isolated Nodes

The routing decisions reveal two clearly distinct task roles. Broad datasets like DBPedia act as knowledge hubs, learning general geometric patterns that transfer easily to related domains and accelerate convergence. In contrast, tasks with strict objective functions such as MNLI, CB, and SST-2 develop incompatible parameter structures that require isolation. Forcing knowledge reuse in these cases causes geometric interference, confirming that the Shielding mechanism is essential to prevent negative transfer.

Computational Efficiency and Limitations

Beyond mitigating catastrophic forgetting, TORA reduces computational overhead by initializing LoRA modules with geometric aligned weights, allowing tasks to skip the initial exploratory phase of gradient descent and reach convergence faster, as shown by the epoch savings reported in Table 5. However, the current system uses a fixed neighborhood size k=3k = 3 and a static divergence threshold, which may limit scalability in longer task sequences. As the number of experts grows, a static kk risks capturing overlapping or contradictory gradient directions. Future work should explore dynamic neighborhood selection, such as adaptive clustering or density-based routing, to maintain transfer quality as the expert pool scales to 50 or more sequential tasks.

Conclusion

This work presented TORA, a geometric routing framework for continual learning in text classification that decides whether to transfer or isolate knowledge based solely on the angular distance between task fingerprints in the SVD parameter space. Evaluated across 15 diverse benchmarks, TORA never induced a harmful routing decision: compatible tasks benefited from the Boosting protocol, saving up to 10 training epochs while exceeding isolated baselines, and structurally distant tasks were protected by Shielding, preventing catastrophic forgetting without any accuracy loss. With a single geometric threshold of θˉ3=84.5∘\bar{\theta}_3 = 84.5^{\circ} and no reliance on task identities or predefined sequences, TORA demonstrates that the intrinsic geometry of adapter weights is a sufficient and reliable signal for autonomous knowledge routing in sequential text classification systems.

References

  1. [1]Aghajanyan, A., Gupta, S., Zettlemoyer, L.: Intrinsic dimensionality explains the effectiveness of language model fine-tuning. In: Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics. pp. 7319–7328 (2021)arxiv.org/abs/2012.13255
  2. [2]Caruana, R.: Multitask learning. Machine learning 28, 41–75 (1997)
  3. [3]Chaudhry, A., Rohrbach, M., Elhoseiny, M., Ajanthan, T., Dokania, P.K., Torr, P.H., Ranzato, M.: On tiny episodic memories in continual learning. arXiv preprint arXiv:1902.10486 (2019)arxiv.org/abs/1902.10486
  4. [4]De Lange, M., Aljundi, R., Masana, M., Parisot, S., Zhu, X., Kolenčík, A., Belagiannis, V., Tuytelaars, T.: A continual learning survey: Defying forgetting in classification tasks. IEEE transactions on pattern analysis and machine intelligence 44(7), 3366–3385 (2021)DOI
  5. [5]Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: Pre-training of deep bidirectional transformers for language understanding. In: Burstein, J., Doran, C., Solorio, T. (eds.) 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). pp. 4171–4186. Association for Computational Linguistics, Minneapolis, Minnesota (Jun 2019). https://doi.org/10.18653/v1/N19-1423, https://aclanthology.org/N19-1423/
  6. [6]Ding, N., Qin, Y., Yang, G., Wei, F., Yang, Z., Su, Y., Hu, S., Chen, Y., Chan, C.K., Chen, W., et al.: Parameter-efficient fine-tuning of large-scale pre-trained language models. Nature Machine Intelligence 5(3), 220–235 (2023)DOI
  7. [7]Gur-Ari, G., Roberts, D.A., Der, E.: Gradient descent happens in a tiny subspace. In: arXiv preprint arXiv:1812.04754 (2018)
  8. [8]Hu, E.J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., Chen, W.: Lora: Low-rank adaptation of large language models. In: International Conference on Learning Representations (2021)arxiv.org/abs/2106.09685
  9. [9]Ke, Z., Lin, H., Shao, Y., Xu, H., Shu, L., Liu, B.: Continual training of language models for few-shot learning. In: Goldberg, Y., Kozareva, Z., Zhang, Y. (eds.) Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing. pp. 10205–10216. Association for Computational Linguistics, Abu Dhabi, United Arab Emirates (Dec 2022). https://doi.org/10.18653/v1/2022.emnlp-main.695, https://aclanthology.org/2022.emnlp-main.695/
  10. [10]Kirkpatrick, J., Pascanu, R., Rabinowitz, N., Veness, J., Desjardins, G., Rusu, A.A., Milan, K., Quan, J., Ramalho, T., Grabska-Barwinska, A., et al.: Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences 114(13), 3521–3526 (2017)DOI
  11. [11]Lehmann, J., et al.: Dbpedia – a large-scale, multilingual knowledge base extracted from wikipedia. Semantic Web 6(2), 167–195 (2015)DOI
  12. [12]Lialin, V., Deshpande, V., Ruschkowski, A.: Scaling down to scale up: A guide to parameter-efficient fine-tuning. In: arXiv preprint arXiv:2303.15647 (2023)arxiv.org/abs/2303.15647
  13. [13]McCloskey, M., Cohen, N.J.: Catastrophic interference in connectionist networks. Psychology of learning and motivation 24, 109–165 (1989)DOI
  14. [14]Mikolov, T., Sutskever, I., Chen, K., Corrado, G.S., Dean, J.: Distributed representations of words and phrases and their compositionality. In: Advances in neural information processing systems. vol. 26 (2013)arxiv.org/abs/1310.4546
  15. [15]Pruksachatkun, Y., Phang, J., Liu, H., Htut, P.M., Zhang, X., Peng, R., Gehrmann, S., Bowman, S.R., Cho, K.: Intermediate-task transfer learning with pretrained language models: When and why does it work? In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. pp. 5231–5247 (2020)DOI
  16. [16]Robert, C., Casella, G.: Monte Carlo statistical methods. Springer (2004)
  17. [17]Ruder, S.: An overview of gradient descent optimization algorithms. arXiv preprint arXiv:1609.04747 (2016)arxiv.org/abs/1609.04747
  18. [18]Sanh, V., Debut, L., Chaumond, J., Wolf, T.: Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108 (2019)arxiv.org/abs/1910.01108
  19. [19]Sun, F.K., Ho, C.H., Lee, H.Y.: {LAMAL}: {LA}nguage modeling is all you need for lifelong language learning. In: International Conference on Learning Representations (2020), https://openreview.net/forum?id=Skgxcn4YDS
  20. [20]Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I.: Attention is all you need. In: Advances in neural information processing systems. vol. 30 (2017)arxiv.org/abs/1706.03762
  21. [21]Wang, A., Pruksachatkun, Y., Nangia, N., Singh, A., Michael, J., Hill, F., Levy, O., Bowman, S.R.: SuperGLUE: A stickier benchmark for general-purpose language understanding systems. In: Advances in Neural Information Processing Systems. vol. 32 (2019)arxiv.org/abs/1905.00537
  22. [22]Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., Bowman, S.R.: GLUE: A multi-task benchmark and analysis platform for natural language understanding. In: Proceedings of the EMNLP 2018 Workshop BlackboxNLP (2018)
  23. [23]Wang, X., Chen, T., Ge, Q., Xia, H., Bao, R., Zheng, R., Zhang, Q., Gui, T., Huang, X.: Orthogonal subspace learning for language model continual learning. In: Bouamor, H., Pino, J., Bali, K. (eds.) Findings of the Association for Computational Linguistics: EMNLP 2023. pp. 10658–10671. Association for Computational Linguistics, Singapore (Dec 2023). https://doi.org/10.18653/v1/2023.findings-emnlp.715, https://aclanthology.org/2023.findings-emnlp.715/
  24. [24]Wang, Z., Zhang, Z., Ebrahimi, S., Sun, R., Zhang, H., Arik, S.O., Pfister, T.: Dualprompt: Complementary prompting for rehearsal-free continual learning. In: European Conference on Computer Vision. pp. 631–648. Springer (2022)arxiv.org/abs/2204.04799
  25. [25]Wang, Z., Dai, Z., Póczos, B., Carbonell, J.: Characterizing and avoiding negative transfer. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 11293–11302 (2019)arxiv.org/abs/1811.09751
  26. [26]Zhang, X., Zhao, J., LeCun, Y.: Character-level convolutional networks for text classification. In: Advances in Neural Information Processing Systems (NeurIPS) (2015)arxiv.org/abs/1509.01626

Paper details

vlnc:W_uj4ngm47
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents