The Geometry Is the Memory: Task-Density Routing for Continual LoRA
Organizations: Elastic
Abstract
Freezing older adapters does not ensure that a continual learner will select and use them properly at inference time. When multiple adapters exist, routing among them and identifying the adapter whose representation space matches the query's answer can be difficult. We propose CONTLORA, which replaces stored examples with compact class statistics for adapter selection and classification. Gaussian class models in a frozen representation select LoRA adapters, while accumulated feature moments exactly recover a class-balanced ridge classifier for fixed training features. Trained without retaining images or feature vectors, CONTLORA reaches 88.55% accuracy on 20-task CIFAR-100 and 86.99% on CUB-200. Across three benchmarks in the matched component study, its mean final accuracy differs from an independently trained stored-feature counterpart by at most 0.07 percentage points. Ablations show that improved task coverage need not improve classification and adapter composition also matters. On held-out classes, competitor-centered likelihood scores improve novelty AUROC over raw likelihood without altering routing ranks. These results support statistical memory as an alternative to example-retention approaches in the evaluated settings, while identifying task ambiguity as an ongoing limitation.
Figures & tables
| Item | Size | Retained form |
| LoRA adapter (12 blocks, qkv ) | 1.18 MB/task | parameters |
| Router: class means | 15 KB/task | means |
| Router: shared scatter (once) | 1.18 MB | scatter |
| Training head: class statistics | 31 KB/task | mean, variance |
| Training head: weights and bias | 15 KB/task | parameters |
| Ridge head: class means | 15 KB/task | moments |
| CIFAR-100, | ImageNet-R, | CUB-200, | ||||||||
| Method | Replay | Fgt | Task-0 | Fgt | Task-0 | Fgt | Task-0 | |||
| Joint (reference) | – | – | – | – | – | – | – | |||
| Sum, trainable- | ✓ | |||||||||
| Sum, fixed- | ✓ | |||||||||
| ContLoRA , GMM + linear head | ✓ | |||||||||
| ContLoRA , stored-feature training | ✓ | |||||||||
| CIFAR-100 | ImageNet-R | CUB-200 | |
| Method | |||
| L2P [ 34 ] | 79.51 | 63.26 | 67.13 |
| InfLoRA [ 16 ] | 80.97 | 68.65 | 70.47 |
| SD-LoRA [ 35 ] | 84.14 | 68.34 | 77.48 |
| C-LoRA [ 38 ] | 86.70 | 70.14 | 82.25 |
| CL-LoRA [ 10 ] | 85.32 | 70.73 | 80.03 |
| Head | Mem. | CIFAR-100 | IN-R | CUB |
| Stored features | 154 MB | |||
| Buffer 20/class | 6.1 MB | |||
| Ridge on moments | 1.5 MB | |||
| Sampled statistics | 0.6 MB | |||
| Class means, NCM | 0.3 MB | |||
| None | 0 |
| Variant | CIFAR-100 | IN-R | CUB-200 |
| Router (replay-free adapters, ridge head) | |||
| Oracle task identity | |||
| Shared cov., top-1 | |||
| Shared cov., top-3 (default) | |||
| Per-task GMM , top-3 | |||
| Composition (GMM + linear head) | |||
| CIFAR-100 | ImageNet-R | |||
| Score | AUROC | FPR95 | AUROC | FPR95 |
| Max log-likelihood | ||||
| Mahalanobis [ 15 ] | ||||
| Relative Mahalanobis [ 23 ] | ||||
| Energy [ 17 ] | ||||
| -NN [ 27 ] | ||||
| Backbone | ViT-B/16, AugReg, ImageNet-21k, frozen |
| LoRA | rank 8, attn.qkv , all 12 blocks; update scaled by |
| Initialization | , |
| Optimizer | AdamW, lr , weight decay , cosine decay |
| Batch / epochs per task | 64 / 15 ( ), 20 ( ) |
| Loss | cross-entropy over all seen classes on , |
| Routing density | class means of frozen features, one pooled within-class scatter , shrinkage toward , as defined in main Eq. (2) |
| Sum, trainable- | Sum, fixed- | ContLoRA | |
| 0 | |||
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 |
| Method | Acc | Std | Train (h) |
| Sum, trainable- | 62.64 | 17.4 | 4.5 |
| Sum, fixed- | 85.50 | 8.2 | 4.4 |
| ContLoRA , , top-1 | 83.55 | 3.1 | 3.3 |
| ContLoRA , , top-1, | 83.55 | 3.1 | 3.3 |
| ContLoRA , , top-3 ∗ | 87.50 | 2.75 | 3.3 |
| Descriptor | CIFAR-100 | ImageNet-R | CUB-200 |
| Per-task GMM, | 83.4 / 93.5 | 46.7 / 65.7 | 77.1 / 92.4 |
| Class means, shared cov. | 88.0 / 96.2 | 69.7 / 83.5 | 89.7 / 98.1 |
| Memory (MB) | 12.3 / 1.49 | 6.15 / 1.80 | 6.15 / 1.80 |
| C100 ( ) | IN-R ( ) | IN-A ( ) | VTAB ( ) | ||||||
| Variant | Mem | ||||||||
| ContLoRA -GMM | 48.17 | 56.6 | 51.08 | 58.9 | 58.44 | 64.2 | 51.73 | 58.1 | 120 KB |
| ContLoRA -GMM+F | 48.91 | 57.3 | 50.33 | 57.8 | 60.15 | 67.3 | 62.85 | 66.7 | 120 KB |
| ContLoRA -GMM+JL | 46.71 | 54.8 | 49.92 | 56.9 | 59.37 | 65.4 | 60.03 | 63.1 | 40 KB |
| ContLoRA -GMM+JL+F | 47.28 | 53.5 | 49.68 | 55.2 | 52.23 | 56.7 | 67.14 | 69.2 | 40 KB |
| ContLoRA -kC+JL | 45.85 | 51.9 | 48.53 | 55.0 | 53.48 | 58.6 | 49.96 | 53.9 | 50 KB |
| DomainNet ( ) | CUB-200 ( ) | Cars ( ) | ||||
| Variant | ||||||
| ContLoRA -GMM | 43.32 | 44.1 | 79.50 | 82.5 | 49.60 | 51.8 |
| ContLoRA -GMM+F | 53.36 | 54.4 | 83.51 | 86.6 | 48.52 | 50.7 |
| ContLoRA -GMM+JL+F | 50.27 | 51.3 | 80.20 | 83.2 | 47.85 | 50.0 |
| ContLoRA -Hil+F | 56.47 | 57.6 | 52.27 | 54.2 | 48.83 | 51.0 |
| ContLoRA -Hil+JL+F | 56.11 | 57.2 | 50.92 | 52.8 | 46.44 | 48.5 |
| Component | Time / sample | Relative |
| Measured | ||
| Frozen backbone pass | ms | |
| Linear head | s | |
| Per-task GMM routing (ablation router) | ms | |
| Derived | ||
| Single-pass reference (merged adapters) | ms | |