Task format as an adaptation factor: A controlled comparison of LoRA and full fine-tuning on prompt safety classificationTask Format as a Factor in Adaptation: A Controlled Comparison of LoRA and Full Fine-Tuning for Prompt-Safety Classification
The authors report a controlled comparison of LoRA and full fine-tuning on the 400M Ettin pair: under preset learning rates full fine-tuning leads by 2–3 pp; after tuning rates the same way, they are equivalent on the encoder, and the rationale objective closes the LoRA gap.
- Comparisons of LoRA and full fine-tuning are often confounded by uncontrolled variables, and task format (output interface and training objective) is rarely studied as an independent factor; the authors conduct a controlled comparison in the setting of prompt safety classification.
- Using a shared-pretrained Ettin 400M encoder–decoder pair, crossing architecture × adaptation mechanism × three task formats, with up to 15 seeds per cell, a prespecified analysis plan and a ±2 pp equivalence bound, and a matched learning rate search.
- Under the preset learning rate, full fine-tuning leads on both architectures by 2–3 pp; after tuning the rate in the same way, it is equivalent on the encoder; training LoRA to write one sentence of reasoning after the verdict brings 4.0 pp and closes the gap; the trained unit exceeds the prompted 8B in-domain, but lags 8–23 pp behind on WildJailbreak, and OR-Bench over-refusal is 27–66% versus 2–3% for the 8B.
- The authors note: only 400M scale, a single corpus; only the learning rate was searched, and only on the encoder; the rationale teacher sees the gold label and there is only one teacher; the 8B is a reference, not a matched arm. The experiments cover 8 training cells plus 5 untrained references, and OOD is evaluated only at the final budget.
- Evaluated models
- Ettin 400M encoderEttin 400M decoder
- Benchmarks
- Aegis 2.0WildJailbreakToxicChatOR-Benchin-the-wild jailbreak prompts (Shen et al., 2024)
- Metrics
- balanced accuracyover-refusaltoxic recallROC-AUC
The study compares LoRA and full fine-tuning on prompt safety classification across three task formats using matched 400M Ettin model pairs; under the preset learning rate, full fine-tuning leads by 2-3 percentage points. Having LoRA write a rationale after the judgment improves it by 4.0 percentage points and closes the gap, whereas an equal-length content-free sentence has no effect. The fine-tuned models beat a prompt-only 8B in-domain but lag by 8-23 percentage points on adversarial jailbreaks, and misclassify 27-66% of benign but seemingly harmful prompts as unsafe (2-3% for the 8B), so in-domain accuracy alone is insufficient to judge robustness.
Paper analysis
What problem does this paper attempt to solve?
A controlled comparison of LoRA and full fine-tuning, with task format as an independent factor, in the setting of prompt safety classification.
Core question: after strictly controlling confounding variables, how large is the gap between LoRA and full fine-tuning, and does this gap depend on task format (what the model is trained to produce).
- Research setting: when fine-tuning language models for classification tasks, the adaptation mechanism (LoRA or full fine-tuning) receives attention, but the form of the answer (task format) is rarely studied as an independent factor; the authors use binary prompt-safety classification as the test setting.
- Shortcomings of existing comparisons: the authors state that published comparisons of LoRA and full fine-tuning are often determined by uncontrolled experimental settings—LoRA is sensitive to adapter layers, scaling method and learning rate, and any fine-tuning is sensitive to seeds, yet these settings often change together with the mechanism; parameter-efficient methods and full fine-tuning
What related research exists?
Related work falls into four groups: task format and rationale training, LoRA versus full fine-tuning comparisons, comparison methodology, and guardrail model comparisons.
Task format and rationale training
- Schick and Schütze (2021), Li et al. (2023), Yousefiramandi and Cooney (2025)—each compares output interfaces (cloze/classification head/instruction-style generation) under a single adaptation mechanism; the paper notes that none of these comparisons crosses interface with mechanism. Sclar et al. (2024) and Voronov et al. (2024) study the effect of prompt format on accuracy; this paper fixes the format.
- Zaidan et al. (2007), Camburu et al. (2018), Ho et al. (2023), Magister et al. (2023), Hsieh et al. (2023)—rationales as a training signal and distillation; Hsieh et al.'s 770M T5 student surpasses few-shot prompted 540B PaLM.
- Wadhwa et al. (2024)—rationale after the label outperforms rationale before the label, and its control experiments (filler tokens, shuffled tokens) partially isolate length and content source; Martinelli et al. (2026) find that rationales matching the question are better. The paper notes that no study has asked whether the mechanism gap depends on the training objective, that no safety classifier trains on rationales after the verdict, and that controls with the label first are lacking (equal-length content-free sentences, rationales borrowed across items).
LoRA versus full fine-tuning comparisons
- Hu et al. (2022)—on GPT-3 175B, rank 1–8 adapters match or exceed full fine-tuning with 10,000× fewer trainable parameters.
- Ding et al. (2023), Biderman et al. (2024), Shuttleworth et al. (2025)—on T5-base across over a hundred tasks, LoRA is on average 1.96 points lower; on Llama-2-7B, rank 16/64 trails and rank 256 only catches up on instruction tuning; on RoBERTa, accuracy is close but the weight structure differs.
- Dettmers et al. (2023), Kalajdzievski (2023), Hayou et al. (2024)—settings such as adapter layer selection, α/√r scaling, and two-factor fraction affect LoRA performance.
Comparison methodology
- Chen et al. (2022)—early
How does the paper address this problem?
On a shared-pretrained 400M encoder–decoder pair, three factors are crossed, all other settings are controlled, and the statistical analysis is prespecified.
Overall approach: using the Ettin 400M encoder–decoder pair, which shares pretraining mixture, recipe and tokenizer, cross the three factors architecture × adaptation mechanism × task format, hold all other training settings fixed, and freeze the analysis plan in advance.
Task and data
- Task: binary prompt safety classification, judging safe/unsafe from a single user prompt alone.
- Training and in-domain evaluation: Aegis 2.0, 33,416 rows with human prompt labels; an audit found 990 rows redacted and 219 test rows overlapping training (34 with inconsistent labels); after deduplication the test set has 1,709 rows and training has 29,095 rows (including 5,000 refusal-augmentation rows, which changes the training label distribution to 59.1% unsafe).
- Out-of-domain evaluation: WildJailbreak 15,000, ToxicChat 10,165, OR-Bench 15,000 benign + 655 toxic, forum prompts 15,140 (ROC-AUC only), 55,960 in total, drawn once and shared by all cells.
Models and adaptation mechanisms
- Architectures: Ettin 400M encoder and decoder, both 28 layers with hidden dimension 1024, differing only in attention pattern and pretraining objective.
- LoRA: freeze the pretrained weights W and train a low-rank update W + (α/√r)BA; r = 16, α = 64, α/√r = 16, adapting all linear projections of attention and MLP, with 8,114,176 adapter parameters for each architecture.
- Full fine-tuning: updates all 396 million parameters, about 50× LoRA; the classification head is fully trained under both mechanisms.
Three task formats (training objectives)
- Classification head: a newly initialized 1024×1024 dense + GELU + LayerNorm + 1024→2 projection, cross-entropy loss, 1 supervised position per row.
- Generative verdict: reuses the pretrained LM head, computes next-token loss over the verdict word and the end token, 2 supervised positions; under LoRA the LM head is frozen and can only change outputs through hidden states.
- Verdict + rationale: the target is the verdict word followed by one sentence of rationale, 37 supervised positions on average; rationales are generated by Ministral 3 8B Instruct after seeing the prompt and the human label (rationale distillation), with the label first and the rationale after; a threshold was set before generation: if more than 25 of 50 random rationales could be swapped onto other prompts with the same label, the design would be abandoned; the actual count was 0/50.
Controls and statistical analysis
- Training settings: 29,095 rows, batch 16, 1,818 steps, one epoch, AdamW with constant learning rate, float32; the four budgets 4,000/8,000/12,000/29,095 are checkpoints of the same run; seeds are taken in order from the same list, and machines are assigned by seed rather than by cell.
- Learning rates: preset LoRA 2×10⁻⁴, full fine-tuning 2×10⁻⁵ (following Biderman et al. 2024); subsequently, on the encoder, the same search is used to select rates for both mechanisms (the validation set's only use).
- Statistics: seed mean ± SD; comparisons are Welch 95% intervals; mechanism comparisons are two one-sided equivalence tests (α = 0.05) against a ±2 pp bound (fixed before any run); the primary test is the mechanism comparison on the encoder at the final in-domain budget; when the minimum detectable effect exceeds the observed difference, only an upper bound is reported.
- Cell composition: 8 training cells (6 decoder + 2 encoder) + 5 untrained references (base encoder/decoder scored by label words, and the 8B in three formats); training cells have 15 seeds each, the two rationale cells have 9 each (seed 51 was excluded by a prespecified rule because generation hit the cap in over 1%).
What experiments did the paper conduct?
Under preset learning rates full fine-tuning leads by 2–3 pp; after tuning rates the same way, they are equivalent on the encoder; the rationale objective closes the LoRA gap; out of domain, it trails the 8B.
Experimental setup
- Models under test: Ettin 400M encoder and decoder (each trained under LoRA and full fine-tuning); untrained references are the base encoder, base decoder, and Ministral 3 8B Instruct (three prompt formats).
- Data: in-domain Aegis 2.0 test set with 1,709 rows; out-of-domain WildJailbreak 15,000, ToxicChat 10,165, OR-Bench benign 15,000 + toxic 655, forum prompts 15,140.
- Metrics: balanced accuracy (mean of the two classes' recall) as the primary metric; for OR-Bench, benign reports over-refusal rate and toxic reports recall; units that can be scored also report ROC-AUC; no threshold tuning.
- Seeds and repetitions: 15 seeds for training units (9 for reason units); reference units run deterministically once.
- Evaluation method: no LLM judging; generative verdicts take the first generated word, and a mismatch with any label word is counted as an error (the 95% upper bound on the misjudgment rate for each trained generative unit is below 0.07%).
- Statistics: equivalence testing against a ±2 pp bound; the primary test is the encoder mechanism comparison (prespecified), and some determinations are labeled post hoc.
Main results
Table 2 (final budget 29,095 rows, balanced accuracy %, seed mean):
Swipe horizontally to read the table
Unit Architecture Format Mechanism Aegis 2.0 WildJailbreak ToxicChat OR-Bench benign (over-refusal) OR-Bench toxic (recall) 1 decoder head LoRA 78.0 54.5 75.4 61.7 78.4 2 decoder head full 80.8 56.5 77.1 53.3 72.4 3 decoder verdict LoRA 78.7 55.7 76.8 66.0 81.8 4 decoder verdict full 81.3 57.7 77.8 45.7 73.9 5 decoder verdict+reason LoRA 82.7 69.0 84.5 29.1 88.4 6 decoder verdict+reason full 82.6 68.7 86.3 34.2 93.0 7 encoder head LoRA 82.6 63.8 79.1 37.9 89.0 8 encoder head full 84.6 69.6 82.4 27.1 92.7 References (Table 2): base encoder/decoder in-domain 51.5/48.0 (near random); 8B three formats in-domain 76.8–78.9, WildJailbreak 73.2–77.9, OR-Bench over-refusal 2.0–2.6, toxic recall 93.1–94.7.
- The authors state: training raises each unit's in-domain score to 78.0–84.6%, all above the 8B's generative verdict (76.8%); the encoder head is about 4 pp higher than the decoder head under each mechanism.
- Out-of-domain ordering reverses: on WildJailbreak the 8B is higher than all trained units; on OR-Bench the trained units' over-refusal is 27.1–66.0% versus the 8B's 2.0–2.6%; on ToxicChat the two groups overlap.
Mechanism effect and learning rate search
- At the prespecified learning rate (Table 3): encoder full 84.63% versus LoRA 82.57%, difference +2.06 pp (90% CI [1.17, 2.95]), the interval crosses the ±2 pp bound, and the primary test is judged inconclusive; decoder head +2.75 pp and decoder verdict +2.65 pp, both inconclusive; reason pair −0.08 pp, judged equivalent (post hoc).
- Learning rate search (Figure 1, Table D2a): on the validation set both mechanisms peak at 1/4 of the prespecified rate (LoRA 5×10⁻⁵ gives 86.9%, full 5×10⁻⁶ gives 86.8%); LoRA at the prespecified rate is 3.4 pp below the selected rate, and full is only 0.2 pp below.
- Retest at the selected rate (Table 3): LoRA 84.45% versus full 84.07%, difference −0.37 pp (90% CI [−0.75, +0.00]), equivalent at ±1, ±2, and ±3 pp; LoRA seed SD drops from 1.99 to 0.65 pp. The authors state the change comes from the learning rate: this is the only setting that differs between the two tests.
Training objective ablation
- Reason gain (§4.3): LoRA with reasons +4.00 pp (95% CI [2.56, 5.44]), full +1.27 pp (upper bound); interaction 2.73 pp ([0.88, 4.59]); replacing the head with a generative verdict affects both mechanisms by less than their respective minimum detectable effect.
- Substitute reasons (Table 4, LoRA decoder): fixed equal-length sentences 78.2% (below verdict-only 78.7%, gain not retained); cross-label borrowed reasons 80.3% (retains 42%); same-label borrowed 81.1% (retains 60%); original reasons 82.7% (100%). The authors state this result does not match the prediction pattern of any of the three candidate sources; the training loss shows the fixed sentences are learned within a few hundred steps and afterward contribute almost no loss, whereas the borrowed reasons' loss stays at about 1.55.
- Over-refusal: the two borrowed conditions reduce OR-Bench over-refusal from 66.0% to 40.7% and 44.3%.
Out-of-domain comparison with the prompted 8B
- In-domain: the full encoder leads the 8B generative verdict by 7.81 pp (95% CI [3.49, 12.13]), and the other three head units lead by 1.2–5.8 pp (all upper bounds).
- Out-of-domain: on WildJailbreak each trained unit trails by 8.1–23.2 pp; on OR-Bench the head units' over-refusal is 10–23 times the 8B's, while the 8B's toxic recall is 94.7% (head units 72.4–92.7%); on ROC-AUC the head units rank worse than the 8B on all three content-safety corpora (by 0.026–0.343), while on forum prompts (labeled by whether they are jailbreak templates) they are comparable or better.
- Reason objective: comparisons among generative units (truncation confound cancels out) show reasons raise WildJailbreak by 11–13 pp, lower LoRA over-refusal from 66.0% to 29.1%, and increase toxic recall.
Other ablations and analyses
- Input repackaging (8 whitespace/quote transformations): the encoder mechanism comparison stays stable at +2.03 to +2.21 pp (§4.2).
- All-uppercase input: each trained unit's in-domain score drops 8–23 pp, the encoder mechanism gap widens to 6.25 pp, and on the decoder head it reverses to LoRA leading by 2.88 pp (Table D4).
- The verdict-only unit is 1.67 pp higher at half rate; the reason unit was not retrained, so the size of the reason gain after rate tuning is undetermined (§4.3, Table D2c).
- Reason–verdict consistency: recovering the verdict from the reason (masking label words) reaches 97.6% (LoRA), 97.4% (full), 97.5% (8B) (Appendix D.5).
- Training budget: each unit is still rising at the final budget, with no decline observed; the architecture gap narrows from 7.37 pp at 4,000 rows to 3.86 pp (Table D1).
What are some points that can be further explored?
The authors list five categories of limitations—scale, hyperparameter tuning, out-of-domain evaluation, the label-aware teacher, and the 8B reference—and give directions for future work.
Limitations and future directions noted by the authors
- Scale and data (§6): the results apply only to 400M parameters, the single corpus Aegis 2.0, and binary classification; the gap between parameter-efficient methods and full fine-tuning narrows with scale, and the authors suggest repeating the comparison at other scales using Ettin pairs from 17M to 1B.
- Hyperparameter tuning (§6): only the learning rate was searched, and only on the encoder; rank and α are fixed, and LoRA's two factors share one rate; the decoder rate was not searched, and the rationale gain is measured relative to a verdict-only cell that is 1.67 pp higher at half the rate, so part of the gain may come from an undertuned baseline.
- Out-of-domain evaluation (§6): two of the three safety-labeled corpora are synthetic, and evaluation is only at the final budget, so whether the disadvantage against the 8B forms during training is unknown; generative cells read the first 128 tokens and head cells the first 256 tokens, which affects out-of-domain comparisons between head and generative cells (largest on WildJailbreak).
- Label-aware teacher (§6): the 8B writes rationales after seeing the gold label and being asked to argue for it, and all rationales come from a single teacher; rationales from other models were not tested; §4.4 shows that agreement with the label cannot explain all of the gain.
- The prompted 8B (§6): the 8B is a reference, not a matched arm—about 20× the parameters, from another model family, a vision-language checkpoint used for text only, whose pretraining may include the evaluation corpora; the reversal in §4.5 only describes the difference between the two model types and does not identify its cause.
- Future directions (§7): repeat the crossed design on Ettin pairs from 17M–1B; extend the search to rank, α and learning rate schedule; train the alternative objectives of §4.4 under both mechanisms to test why rationales help LoRA more; §5.3 raises whether the two mechanisms leave different structure in the weights at similar accuracy (not measured in this study).
Scope of the experiments
- The models tested are the Ettin 400M encoder and decoder (two mechanisms each), plus 5 untrained reference cells (base encoder/decoder, Ministral 3 8B Instruct in three formats), 13 cells in total (Table 2).
- Training cells have 15 seeds each, and the two rationale cells have 9 each; the learning rate search uses 5 seeds per rate (§3.2, §4.2).
- In-domain evaluation is at 4 training budgets; out-of-domain only at the final budget (§3.5).
- The learning rate search is only on the encoder; decoder cells keep the preset rate (§3.4).
- The paper reports no teacher models other than the rationale distillation, and no measurement of weight structure (§6, §5.3).
Summarize the main content of the paper
The controlled comparison shows that the mechanism gap is smaller than the effect of training settings: after tuning rates the encoder is equivalent, the rationale objective closes the LoRA gap, and in-domain accuracy does not predict out-of-domain robustness.
A controlled comparison study of adaptation mechanisms and task formats in classification fine-tuning, in the setting of prompt safety classification at the 400M scale.
- Problem: published comparisons of LoRA and full fine-tuning often let settings such as learning rate and seeds vary together with the mechanism, and task format has never been crossed with mechanism as an independent factor, making mechanism gaps hard to isolate.
- Method: use a shared pretrained Ettin 400M encoder–decoder pair, crossing architecture × mechanism × three task formats (classification head, generative verdict, verdict+rationale), with all other settings fixed; up to 15 seeds per cell, the analysis plan frozen in advance, and mechanism comparisons using a ±2 pp equivalence bound.
- Mechanism gap: at the preset learning rate, full fine-tuning leads LoRA by 2–3 pp on both architectures (encoder +2.06 pp, primary test inconclusive); after both mechanisms select rates through the same search, the encoder difference is −0.37 pp, judged equivalent (Table 3).
- Training objective: training LoRA to write one sentence of rationale after the verdict brings +4.00 pp and closes the gap with full fine-tuning (82.7% vs. 82.6%); an equal-length content-free sentence gives no gain, and rationales borrowed from other prompts retain 42–60% (Table 4).
- Out-of-domain: all training cells exceed the prompted Ministral 3 8B in-domain, but lag by 8.1–23.2 pp on WildJailbreak; OR-Bench benign over-refusal is 27.1–66.0% vs. 2.0–2.6% for the 8B, and ROC-AUC ranking is also worse, which threshold tuning cannot compensate for (§4.5).
- Authors' conclusion: the effect of adaptation mechanism is smaller than that of learning rate, training objective and evaluation distribution; mechanism comparisons are informative only when conditions are controlled; in-domain accuracy is not a sufficient indicator of robustness, and small trained classifiers and large prompted models may be complementary rather than interchangeable.