Seq-LoRA: Sequential Bayesian Low-Rank Adaptation for Large Language Models

Boming Chen, Xiaojing WangNeurIPS 2026

TL;DR

Fine-tuning Large Language Models (LLMs) with Low-Rank Adaptation (LoRA) is cheap and effective, but it often creates models that are confidently wrong when faced with unfamiliar data. Seq-LoRA fixes this overconfidence after standard training without retraining the model. By chopping the training data into slices and tracking how each slice gently "tugs" on the adapter weights using a classic Kalman filter, Seq-LoRA builds a well-calibrated sense of uncertainty that shines when test data drifts away from the training set.

What Problem Does This Paper Address?

When we fine-tune an LLM on a small, specialized dataset using LoRA, it learns the task quickly—but its probability estimates often become brittle. Under distribution shift (when real-world inputs look different from training examples), standard deterministic LoRA adapters tend to assign 99% confidence to wild guesses.

Existing "Bayesian LoRA" methods try to fix this by estimating a probability distribution (a posterior) over the LoRA weights rather than locking in a single point estimate. However, they treat the training dataset as one giant, homogeneous soup. Real-world datasets aren't uniform; they have internal structure—like grade levels in textbooks, timestamps, or batches. The authors ask: After a standard LoRA model is already trained, can we use the subtle variations across subsets ("slices") of the training data as clues for how uncertain the model should be on brand-new data?

Methods

Seq-LoRA is a post-hoc framework—meaning you take an ordinary, already-trained LoRA checkpoint (the Maximum A Posteriori, or MAP, anchor) and wrap uncertainty around it in four stages:

Figure 1: Overview of Seq-LoRA. (A) Slice-wise gradients and curvatures define local evidence about the LoRA-A deviation from the MAP anchor. (B) This evidence is projected into a shared curvature-aligned subspace. (C) The projected surrogates become Gaussian pseudo-observations in a random-walk LGSSM, yielding p(xT | ey1:T ) by Kalman filtering. (D) Samples are mapped back to LoRA weights for Bayesian model averaging.
  1. Slice-wise Quadratic Surrogates: Partition the training data into $T$ slices (e.g., by school grade, or even randomly). Keeping the frozen base weights and LoRA-$B$ matrices fixed, Seq-LoRA measures how each slice's loss landscape curves around the trained LoRA-$A$ weights using a standard Kronecker-factored (K-FAC) curvature approximation. Each slice essentially exerts its own local "pull" away from the shared anchor.
  2. Shared Subspace Projection: Even LoRA space is too big for exact sequential math, so all slice surrogates are projected into a tiny, shared low-dimensional subspace aligned with the most important curvature directions.
  3. Kalman Filtering over Pseudo-Observations (The Novel Twist): By algebraically "completing the square," each slice's quadratic loss approximation is rewritten exactly as a noisy Gaussian observation. Coupling adjacent slices with a simple random-walk prior turns the static dataset into a Linear–Gaussian State-Space Model (LGSSM)—allowing exact, closed-form sequential Bayesian inference via a standard Kalman filter.
  4. Posterior Prediction: To answer a test question, Seq-LoRA draws Monte Carlo samples from the final filtered state, maps them back into LoRA-$A$ weight space (moderated by an automatically tuned scale factor $\tau$), and averages their predictions.

Datasets

No new datasets are introduced; the authors repurpose existing multiple-choice reasoning benchmarks to test in-distribution (ID) vs. out-of-distribution (OOD) shifts (primarily using a Qwen3-8B-Base backbone, with transfer checks on Llama-2-7B):

  • Training & ID Evaluation: Closed-choice ScienceQA (Grades 2–11), naturally providing 10 grade-ordered slices.
  • Smaller OOD Shift: ScienceQA Grade 12, OpenBookQA (OBQA), and ARC-Challenge (ARC-C).
  • Larger OOD Shift: High-school and college science subsets of MMLU (MMLU-H, MMLU-C) and graduate-level GPQA.

Key Insights and Ideas

  • Curriculum order isn't the magic ingredient: You might assume ordering slices from Grade 2 to Grade 11 is why sequential filtering works. Surprisingly, random size-balanced slices combined with Seq-LoRA's Kalman filter perform nearly identically to natural grade slices under heavy shift. The magic isn't a privileged easy-to-hard curriculum; it's exposing local heterogeneity across slices and smoothing that evidence through a state-space bottleneck.
  • Pooling hides uncertainty, but isolation is noisy: Collapsing all slices into a single aggregate state ($T=1$ or zero transition noise $Q=0$) underperforms because slice disagreements cancel out. Conversely, treating slices completely independently without a random-walk link makes random partitions noisy. Sequential coupling hits the sweet spot.
  • Lightweight memory footprint: Because inference happens module-by-module in a tiny projected subspace, Seq-LoRA avoids inverting massive curvature matrices.

Key Results

Evaluated across five seeds, Seq-LoRA preserves nearly all of deterministic LoRA's accuracy (dipping by just $0.25$ percentage points on ID ScienceQA, from $94.11\%$ to $93.86\%$) while dramatically slashing overconfidence on shifted targets.

Table 1: Main benchmark results on ID and OOD evaluation. ID denotes the held-out ScienceQA closed-choice test split for grades 2–11. For variable-choice examples, invalid answer labels are masked before computing metrics over valid choices. Except for the frozen base model (†), results are mean ± standard deviation over five seeds; ACC and ECE are percentages. Best and second-best non-reference results are in bold and underlined, with ties after rounding broken by smaller standard deviation.
  • OOD Calibration & Likelihood: Among fine-tuned methods, Seq-LoRA achieves the best Negative Log-Likelihood (NLL) on 5 of 6 OOD benchmarks and the best Expected Calibration Error (ECE) on 4 of 6.
  • Big drops in calibration error: Compared to standard MAP LoRA, Seq-LoRA cuts ECE from $6.93\%$ to $1.47\%$ on ARC-C, from $15.97\%$ to $6.43\%$ on MMLU-C, and from $34.13\%$ to $20.73\%$ on extreme-shift GPQA.
  • Efficiency: Fitting Seq-LoRA post-hoc takes roughly the same time as one standard LoRA training run ($1015\text{ s}$ vs. $934\text{ s}$) and peaks at $26.13\text{ GB}$ of GPU memory—compared to $94.28\text{ GB}$ for Laplace-LoRA.

Limitations and Future Work

  • Simple dynamics & truncated subspace: The random-walk prior assumes smooth drift and may miss abrupt or recurring regime shifts across slices, while uncertainty outside the top-$L$ curvature directions is ignored.
  • Offline & partition-dependent: Despite using a Kalman filter, Seq-LoRA is currently a one-shot offline method for a fixed dataset, not a continual-learning system for streaming tasks. Furthermore, results still depend on the chosen partition and slice granularity.
  • Task scope: Experiments are restricted to closed-choice, mostly science-focused QA. Validating Seq-LoRA on open-ended generation, instruction tuning, and commonsense reasoning remains future work.

Summary updated

Abstract

Low-Rank Adaptation (LoRA) enables efficient fine-tuning of large language models, but adapted models often become overconfident, especially in low-data settings and under distribution shift. Existing uncertainty-aware LoRA methods typically construct a static posterior over a fixed adaptation set and do not model how local posterior evidence varies across structured subsets of the training data. We propose Seq-LoRA, a post-hoc Bayesian framework for sequentially aggregating slice-wise posterior evidence in LoRA space. Starting from a shared maximum a posteriori LoRA anchor, Seq-LoRA builds slice-wise Kronecker-factored quadratic surrogates, projects them into a shared curvature-informed low-dimensional subspace, rewrites the resulting latent quadratic forms as Gaussian pseudo-observations, and performs exact inference in an induced linear-Gaussian state-space model via Kalman filtering. Rather than relying on a particular curriculum order, Seq-LoRA couples heterogeneous slice-wise local posterior evidence through a random-walk prior, forming a terminal Bayesian posterior for prediction. Across the in-distribution ScienceQA test split and six out-of-distribution (OOD) reasoning targets, Seq-LoRA substantially reduces deterministic LoRA overconfidence under shift. Among fine-tuned methods, it achieves the best negative log-likelihood on five OOD targets and the best expected calibration error on four, while preserving most task accuracy. Code is available at https://github.com/toori999/seq-lora.
BibTeX
@inproceedings{chen2026seq,
  author = {Boming Chen and Xiaojing Wang},
  title = {{Seq-LoRA: Sequential Bayesian Low-Rank Adaptation for Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=I7N01JSe99},
}
Figure