HIFI: A Highly Efficient Framework for Statistical Inference with Foundation Models
Organizations: Department of Statistics, University of Virginia
Abstract
Foundation models provide powerful representations for unstructured data, such as text and images, and parameter-efficient fine-tuning (PEFT) makes their adaptation to downstream tasks increasingly practical. For neural estimators that lack a tractable sampling distribution, resampling-based procedures offer a flexible route to statistical inference, but they often require hundreds of model fits, making them computationally prohibitive at foundation-model scale. We introduce HIFI, a two-stage fine-tuning framework for statistical inference on parameters such as conditional means. Stage 1 adapts a foundation model once on a larger sample, capturing the complex structure of the data and controlling estimation bias through a single fit. Stage 2 applies a resampling inference procedure to a smaller independent sample, concurrently fitting multiple lightweight PEFT estimators to the residual to quantify estimation variability without relearning the full task. HIFI accommodates a broad class of resampling procedures, including ensemble subsampling and the nonparametric bootstrap. Across vision and text experiments, HIFI scales to pretrained models ranging from tens of millions to more than ten billion parameters while providing accurate point estimates and well-calibrated confidence intervals across diverse architectures, and reduces training compute by up to 91.9% relative to direct resampling. An application to gene-expression inference illustrates the practical value of the framework for uncertainty-aware scientific inference.
Figures & tables
| Point Estimation | Statistical Inference | ||||||
| Model | Params | Method | MAB | MAE | Cov. 90% | Cov. 95% | 95% CI Length |
| HIFI -ESM | 0.018 (0.02) | 0.041 (0.01) | 0.908 (0.08) | 0.937 (0.06) | 0.282 (0.02) | ||
| HIFI -Bootstrap | 0.017 (0.02) | 0.047 (0.01) | 0.888 (0.07) | 0.938 (0.05) | 0.231 (0.02) | ||
| HulC | 0.028 (0.03) | 0.040 (0.02) | 0.867 (0.11) | 0.914 (0.10) | 0.206 (0.03) | ||
| ViT-B/32 | 87.5M | Bayesian-PEFT | 0.054 (0.05) | 0.060 (0.05) | 0.702 (0.33) | 0.764 (0.32) | 0.183 (0.04) |
| HIFI -ESM | 0.011 (0.01) | 0.044 (0.01) | 0.933 (0.04) | 0.955 (0.03) | 0.319 (0.04) | ||
| Point Estimation | Statistical Inference | ||||||
| Model | Params | Method | MAB | MAE | Cov. 90% | Cov. 95% | 95% CI Length |
| Qwen3- Embedding-8B | 7.6B | HIFI -ESM | 0.014 (0.01) | 0.060 (0.01) | 0.899 (0.03) | 0.928 (0.03) | 0.374 (0.06) |
| HIFI -Bootstrap | 0.015 (0.01) | 0.064 (0.02) | 0.885 (0.04) | 0.937 (0.03) | 0.316 (0.07) | ||
| HulC | 0.075 (0.05) | 0.097 (0.04) | 0.849 (0.10) | 0.889 (0.09) | 0.418 (0.06) | ||
| Bayesian-PEFT | 0.085 (0.06) | 0.102 (0.05) | 0.830 (0.22) | 0.890 (0.18) | 0.426 (0.05) | ||
| XLM-R XXL | 10.7B | HIFI -ESM | 0.014 (0.01) | 0.051 (0.01) | 0.899 (0.04) | 0.926 (0.03) | 0.361 (0.08) |
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
| Language | Model input | (min) | ||
| English | Kate walked into the terminal 15 minutes before the scheduled departure. | 15 | 0.0962 | 0 |
| English | Zack arrived at the airport 49 minutes before his flight. | 49 | 0.3422 | 1 |
| English | His flight DL8517 was assigned to gate B17. Henry reached the gate 1 hour and 16 minutes ahead of takeoff. | 76 | 0.6472 | 0 |
| English | American listed the flight as AA2789 from Terminal A. Frank reached the airport with 1 hour and 50 minutes left until the scheduled flight. | 110 | 0.8996 | 1 |
| Chinese | 航班预定起飞前16分钟,周强已经抵达机场。 English translation: Zhou Qiang had already arrived at the airport 16 minutes before the scheduled departure. | 16 | 0.1004 | 0 |
| Chinese | 航站楼里人特别多。 她的航班是长荣BR6967。 距起飞还剩50分钟时,林雪走进了候机厅。 English translation: The terminal was especially crowded. Her flight was EVA Air BR6967. With 50 minutes remaining before takeoff, Lin Xue entered the departure lounge. | 50 | 0.3528 | 0 |
| Setting | ViT-B/32 | DINOv2-B/14 | Swin-B |
| Pooling | CLS + mean patch (concatenated) | CLS + mean patch (concatenated) | Global average |
| Prediction head | Two-layer MLP; 64 hidden units; GELU | ||
| Training loss | Mean squared error | ||
| Stage 1 | |||
| Training / validation sample size | 8,000 / 500 | ||
| Blocks with LoRA | All 12 | Last 4 | All 24 |
| Setting | ViT-B/32 | DINOv2-B/14 | Swin-B |
| HulC | |||
| Training / validation size | 9,000 / 700 | ||
| Adapted blocks | Last 6 | Last 2 | Final stage (2 blocks) |
| LoRA configuration | Q and V; rank 8; scaling 16; dropout 0.05 | ||
| Learning rate | |||
| Training | AdamW; batch size 8; weight decay | ||
| Setting | Qwen3-Embedding-8B | XLM-R XXL | NV-Embed-v2 |
| Pooling | Last token | CLS token | Native latent attention |
| Maximum sequence length | 96 tokens | 96 tokens | 112 tokens |
| Input prompt | Instruct: Given a passenger flight-status description, estimate the probability that the passenger makes the flight. Query: <text> | ||
| Prediction head | Two-layer MLP; 128 hidden units; GELU | ||
| Training loss | Binary cross-entropy with logits | ||
| LoRA configuration | Q and V projections; rank 16; scaling 32; dropout 0.05 | ||
| Setting | Qwen3-Embedding-8B | XLM-R XXL | NV-Embed-v2 |
| HulC | |||
| Training / validation size | 9,000 / 700 | ||
| Adapted blocks | Last 6 | Last 4 | Last 4 |
| LoRA configuration | Q and V; rank 16; scaling 32; dropout 0.05 | ||
| Learning rate | |||
| Training | AdamW; batch size 8; weight decay 0 | ||
| Backbone | Method | Procedure | GPU | Training EFLOPs/rep | Wall-clock time/rep |
| ViT-B/32 | ESM | Single-stage | A40 | 0.2934 | 2 h 44 min |
| ESM | HIFI | RTX 3090 | 0.0239 | 15 min | |
| Bootstrap | Single-stage | A40 | 0.4685 | 2 h 46 min | |
| Bootstrap | HIFI | RTX 3090 | 0.0668 | 32 min | |
| DINOv2-B/14 | ESM | Single-stage | A40 | 0.3174 | 1 h 48 min |
| ESM | HIFI | RTX 3090 | 0.0649 | 37 min |
| Shared setting | Specification | |
| Input features | 192 HViT-4K + 384 HViT-256 + 3 RGB + 2 coordinates | |
| MLP layer dimensions | ||
| Hidden activation | Leaky ReLU with negative slope 0.1 | |
| Trainable MLP layers | All hidden layers and the output layer | |
| LoRA targets | QKV and attention output projections | |
| LoRA parameters | Rank 8; scaling 16; dropout 0 | |
Efficient Inference
Efficient inference reduces the compute, memory, latency, or energy needed to produce accurate predictions, posterior estimates, and decisions.
See all 114 papers