HypeLoRA: Hyper-Network-Generated LoRA Adapters for Calibrated Language Model Fine-Tuning
Organizations: Upper-Secondary Schools of Communications in Cracow
Abstract
Modern Transformer-based models frequently suffer from miscalibration, producing overconfident predictions that do not reflect true empirical frequencies. This work investigates the calibration dynamics of LoRA: Low-Rank Adaptation and a novel hyper-network-based adaptation framework as parameter-efficient alternatives to full fine-tuning for RoBERTa. Evaluating across the GLUE benchmark, we demonstrate that LoRA-based adaptation consistently achieves calibration parity with (and in specific tasks exceeds) full fine-tuning, while maintaining significantly higher parameter efficiency. We further explore a dynamic approach where a shared hyper-network generates LoRA factors (A and B matrices) to induce structural coupling across layers. This approach produced results similar to standard LoRA fine-tuning, even achieving better MCC on CoLA dataset. Our study also reveal a critical trade-off: constraining the adaptation space (e.g., freezing matrices A) acts as a powerful regularizer that enhances Expected Calibration Error (ECE), but necessitates a carefully balanced sacrifice in downstream task accuracy. To support future research, we provide a unified and reproducible implementation of contemporary calibration metrics, including ECE, MCE, and ACE. Our findings clarify the relationship between parameter efficiency and probabilistic reliability, positioning structured low-rank updates as a viable foundation for uncertainty-aware Transformer architectures. Code available at: https://github.com/btrojan-official/HypeLoRA
Figures & tables
| Metric | CoLA | SST-2 | QNLI | MRPC | RTE | MNLI | |
|---|---|---|---|---|---|---|---|
| FT | 61.68 | 94.50 | 92.64 | 90.37 | 85.32 | 87.17 | |
| ECE | 0.136 | 0.035 | 0.072 | 0.111 | 0.104 | 0.074 | |
| CECE | 0.138 | 0.036 | 0.072 | 0.114 | 0.113 | 0.050 | |
| MCE | 0.339 | 0.277 | 0.539 | 0.308 | 0.309 | 0.202 | |
| ACE | 0.134 | 0.033 | 0.071 | 0.110 | 0.103 | 0.073 | |
| TACE 0.01 | 0.469 | 0.461 | 0.482 | 0.441 | 0.413 | 0.492 |
| COLA | SST-2 | |||
|---|---|---|---|---|
| MCC | ECE | Acc | ECE | |
| MLP | ||||
| MLP | ||||
| Transformer | ||||
| Transformer | ||||
| LoRA | ||||
Low-Rank Adaptation
Low-rank adaptation (LoRA) fine-tunes pretrained models with compact weight updates, reducing trainable parameters and deployment costs.
See all 538 papers