Paper Reading AI Learner

Ensembling Pruned Attention Heads For Uncertainty-Aware Efficient Transformers

2025-10-21 07:26:38
Firas Gabetni, Giuseppe Curci, Andrea Pilzer, Subhankar Roy, Elisa Ricci, Gianni Franchi

Abstract

Uncertainty quantification (UQ) is essential for deploying deep neural networks in safety-critical settings. Although methods like Deep Ensembles achieve strong UQ performance, their high computational and memory costs hinder scalability to large models. We introduce Hydra Ensembles, an efficient transformer-based ensemble that prunes attention heads to create diverse members and merges them via a new multi-head attention with grouped fully-connected layers. This yields a compact model with inference speed close to a single network, matching or surpassing Deep Ensembles in UQ performance without retraining from scratch. We also provide an in-depth analysis of pruning, showing that naive approaches can harm calibration, whereas Hydra Ensembles preserves robust uncertainty. Experiments on image and text classification tasks, with various architectures, show consistent gains over Deep Ensembles. Remarkably, in zero-shot classification on ImageNet-1k, our approach surpasses state of the art methods, even without requiring additional training.

Abstract (translated)

不确定性量化(UQ)对于在安全关键环境中部署深度神经网络至关重要。尽管像Deep Ensembles这样的方法能够实现强大的不确定性量化性能,但它们的高计算和内存成本阻碍了其在大型模型中的可扩展性。我们引入了一种高效的基于Transformer的集合——Hydra Ensembles,它通过修剪注意力头来创建多样化的成员,并利用一种新的具有分组全连接层的多头注意力机制将这些成员合并起来。这种方法生成了一个紧凑的模型,其推理速度接近单个网络的速度,在不从头开始重新训练的情况下,不确定性量化的性能可以与Deep Ensembles相匹配甚至超越。 我们还提供了对修剪方法的深入分析,表明简单的修剪方式可能会损害校准效果,而Hydra Ensembles则能够保持强大的不确定性估计。在图像和文本分类任务中进行的各种架构实验显示,与Deep Ensembles相比,我们的方法具有持续的优势。尤其值得注意的是,在零样本(zero-shot)ImageNet-1k分类测试中,即使不增加额外的训练数据,我们提出的方法也超越了现有的最佳方法。

URL

https://arxiv.org/abs/2510.18358

PDF

https://arxiv.org/pdf/2510.18358.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot