Hierarchical Alignment: Block-Level LoRA-DPO for Preference Tuning in Large Language Models
Organizations: Fudan University Shanghai, China · The Chinese University of Hong Kong Hong Kong, China
Abstract
Preference tuning typically distributes adapter updates across every Transformer layer. We study how the placement of a fixed LoRA budget affects Direct Preference Optimization (DPO). Hierarchical Alignment partitions decoder depth into Local, Intermediate, and Global regions and restricts LoRA updates to a chosen contiguous block. Across Qwen and Llama models, three-seed sliding-window sweeps reveal broad low-loss basins around intermediate depth. Under exact trainableparameter matching, Middle achieves lower held-out DPO loss than an all-depth allocation on Qwen2.5-7B and Llama-3.1-8B. Generationlevel evidence is more variable. LLM judges and a blinded human study leave Selected versus All unresolved on Qwen; on Llama, two pairwise judges favor All while the human interval includes zero. Trained-adapter interventions show that learned depth components affect the optimization objective; removing the Llama Selected window also lowers generation quality. Across Qwen2.5 at 3B, 7B, and 14B, Middle versus All remains unresolved under Qwen3-Max; at 3B and 14B, both improve over Base. In our implementation, Middle also uses less peak memory and takes shorter steps than a parameter-matched all-depth allocation. Together, the results support intermediate depth as a practical starting point for fixed-budget preference tuning, though the best window and its behavioral value still need per-setting validation.
Figures & tables
| Model | Comparison | Evaluator | Effect [95% CI] | |
|---|---|---|---|---|
| Qwen2.5-7B | Selected All | Qwen3-Max | 1000 | |
| Qwen2.5-7B | Selected All | DeepSeek-v4-pro | 1000 | |
| Qwen2.5-7B | Selected All | Human | 120 | |
| Llama-3.1-8B | Selected All | DeepSeek-v4-pro | 1000 | |
| Llama-3.1-8B | Selected All | Human | 120 | |
| Qwen2.5-7B | Selected Matched | DeepSeek-v4-pro | 1000 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Comparison (A B) | Effect [95% CI] | Interpretation | |
|---|---|---|---|
| Qwen2.5-7B Selected Base | 1000 | A favored | |
| Qwen2.5-7B Selected All | 1000 | unresolved | |
| Qwen2.5-7B Selected Matched | 1000 | unresolved | |
| Qwen2.5-7B All Matched | 1000 | unresolved | |
| Qwen2.5-3B Middle Base | 1000 | A favored | |
| Qwen2.5-3B All Base | 1000 | A favored |
| Comparison (A B) | Judge | Effect [95% CI] | Interpretation | |
|---|---|---|---|---|
| Qwen2.5-7B Selected All | DeepSeek-v4-pro | 1000 | unresolved | |
| GPT-5.5 | 1000 | unresolved | ||
| Qwen2.5-7B Selected Matched | DeepSeek-v4-pro | 1000 | A favored | |
| GPT-5.5 | 1000 | unresolved | ||
| Llama-3.1-8B Selected All | DeepSeek-v4-pro | 1000 | B favored | |
| GPT-5.5 | 1000 | B favored |
| Model | Allocation | Empty | Raw WR SE | LC WR SE | Avg. chars |
|---|---|---|---|---|---|
| Qwen2.5-7B | Base | 20 | 2893 | ||
| Matched | 19 | 2943 | |||
| Selected | 19 | 2720 | |||
| All | 13 | 2801 | |||
| Llama-3.1-8B | Base | 67 | 6223 | ||
| Matched | 58 | 6135 |
| Item | Value |
|---|---|
| Training pairs / epochs | 10,000 / 1 |
| Learning rate / weight decay | / 0 |
| Optimizer | AdamW ( , ) |
| DPO | 0.1 |
| Precision | bfloat16 |
| Micro-batch / accumulation | 4 / 4 |
| Model | Layers | Local | Intermediate | Global | Selected |
|---|---|---|---|---|---|
| Qwen2.5-3B | 36 | 0–11 | 12–23 | 24–35 | 12–23 |
| Qwen2.5-7B | 28 | 0–9 | 10–18 | 19–27 | 10–18 |
| Llama-3.1-8B | 32 | 0–10 | 11–21 | 22–31 | 9–19 |
| Qwen2.5-14B | 48 | 0–15 | 16–31 | 32–47 | 16–31 |
| Layers | Dev loss SD | 95% CI | Pref. acc. | Margin | Chosen KL |
|---|---|---|---|---|---|
| 0–8 | |||||
| 3–11 | |||||
| 6–14 | |||||
| 9–17 | |||||
| 10–18 † | |||||
| 13–21 ⋆ |
| Layers | Dev loss SD | 95% CI | Pref. acc. | Margin | Chosen KL |
|---|---|---|---|---|---|
| 0–10 | |||||
| 3–13 | |||||
| 6–16 ⋆ | |||||
| 9–19 † | |||||
| 11–21 | |||||
| 14–24 |
| Model | Allocation | Trainable M | Dev loss | Pref. acc. | Margin | Chosen KL |
|---|---|---|---|---|---|---|
| Qwen2.5-7B | Middle/Selected | 3.244 | ||||
| Matched | 3.244 | |||||
| All | 10.093 | |||||
| Llama-3.1-8B | Middle | 4.686 | ||||
| Matched | 4.686 | |||||
| All | 13.631 |
| Scale | Middle dev loss | All dev loss | Middle All [95% CI] |
| 3B | |||
| 14B | |||
| Qwen3-Max behavioral effect (Middle All) | |||
| 3B | |||
| 14B | |||
| Model | Removed adapters | Metric | Effect [95% CI] | |
|---|---|---|---|---|
| Qwen2.5-7B | Shallow | dev DPO loss | 300 | |
| Qwen2.5-7B | Middle | dev DPO loss | 300 | |
| Qwen2.5-7B | Deep | dev DPO loss | 300 | |
| Llama-3.1-8B | Shallow | dev DPO loss | 300 | |
| Llama-3.1-8B | Middle | dev DPO loss | 300 | |
| Llama-3.1-8B | Deep | dev DPO loss | 300 |
| Model | Retained adapters | Dev DPO loss | loss vs. All [95% CI] | Gain retained |
| Qwen2.5-7B | Shallow | 0.690307 | 0.157 | |
| Middle | 0.679340 | 0.765 | ||
| Deep | 0.687899 | 0.291 | ||
| Llama-3.1-8B | Shallow | 0.673010 | 0.497 | |
| Middle | 0.667030 | 0.645 | ||
| Deep | 0.687986 | 0.127 |
| Model | Allocation | Trainable M | Adapter MiB | Grad MiB | Adam MiB | Peak GiB | s/step | tok/s |
|---|---|---|---|---|---|---|---|---|
| Qwen2.5-7B | Middle | 3.244 | 23.29 | 12.38 | 24.75 | 59.73 | 1.315 | 5422.4 |
| Matched | 3.244 | 23.31 | 12.38 | 24.75 | 77.30 | 1.615 | 4415.8 | |
| All | 10.093 | 49.43 | 38.50 | 77.00 | 77.44 | 1.585 | 4498.3 | |
| Llama-3.1-8B | Middle | 4.686 | 34.31 | 17.88 | 35.75 | 58.37 | 1.452 | 4904.2 |
| Matched | 4.686 | 34.33 | 17.88 | 35.75 | 76.42 | 1.796 | 3965.5 | |
| All | 13.631 | 68.45 | 52.00 | 104.00 | 76.59 | 1.770 | 4023.2 |
| Signal | Qwen2.5-7B | Llama-3.1-8B |
|---|---|---|
| Gradient RMS | Peak at layers 14–17; lower values in late layers | Broad early-to-middle plateau; drop after layer 21 |
| LoRA update norm | Middle peak | Middle peak with a secondary late cluster |
| Representation drift | Rises from middle depth and propagates downstream | Jumps near middle entry and propagates downstream |
LLM Alignment
Large language model alignment studies methods for making models follow human intentions, values, and safety constraints across contexts.
See all 611 papers