TL;DR
HARMONY is a novel white-box uncertainty estimation framework for Vision-Language Models (VLMs) that simultaneously leverages generated text, token-level probabilities, and internal hidden representations. By processing these multi-source signals through a sequence-aware transformer architecture, HARMONY effectively captures complex inter-token dependencies and vision-text alignment. This allows it to significantly outperform existing methods in predicting when a VLM is likely to hallucinate or fail.
What Problem Does This Paper Address?
Vision-Language Models (VLMs) are increasingly deployed in high-stakes scenarios like medical diagnosis and assistive technologies for the visually impaired. However, VLMs are notorious for over-relying on "language priors"—generating answers based on text patterns they memorized during training rather than the actual visual evidence in an image.
To make these models reliable, we need Uncertainty Estimation (UE): a way for the model to signal how confident it should be, enabling a system to abstain from answering when it is uncertain (selective prediction).
Existing VLM uncertainty estimation approaches fall into two flawed camps:
- Probability-based methods: They aggregate token probabilities using simple heuristics (like length-normalization). These fail to capture complex relationships between tokens and struggle to detect when a high-probability token is just a biased language prior.
- Representation-based methods: They train simple classifiers (like MLPs) on the model's internal hidden states. While hidden states contain rich multimodal alignment signals, flat MLPs discard the sequential, autoregressive context of how the tokens were generated.
HARMONY bridges this gap by combining text, output probabilities, and internal representations into a single, sequence-aware scoring function.
Methods
HARMONY introduces a unified framework that treats uncertainty estimation as a sequence-modeling task, utilizing a pretrained VisualBERT architecture as its scoring function.
For a given question and generated response, HARMONY constructs a multi-modal input sequence consisting of three distinct signals mapped at the token level:
- Text Tokens: The actual text of the question and generated response.
- Model Output Probabilities (
MaxProb): To feed continuous probability values into a text-based transformer, the authors split the $[0,1]$ probability range into fixed bins (quantiles) and map them to orthogonal embedding vectors. - Internal Hidden Representations: High-dimensional hidden states are extracted from an internal layer of the VLM (where cross-modal fusion occurs) and projected via a linear layer into the visual embedding space of the VisualBERT model.
This combined sequence is passed through VisualBERT, which is fine-tuned using a binary cross-entropy loss to predict a single reliability score (whether the generated answer is correct or incorrect).
Datasets
The authors evaluated HARMONY across three diverse open-ended Visual Question Answering (VQA) benchmarks:
- A-OKVQA: A dataset requiring complex visual reasoning and common-sense knowledge.
- VizWiz: A challenging real-world dataset consisting of photos taken by visually impaired individuals paired with spoken (transcribed) questions, which frequently contains visually uncertain or unanswerable questions.
- PathVQA: A specialized medical imaging VQA dataset used to test domain generalization.
These were evaluated using four state-of-the-art open VLMs: LLaVA-7B, LLaVA-13B, InstructBLIP, and Qwen-VL.
Key Insights and Ideas
- The Synergy of Internal and External States: Output probabilities tell you what the model says it knows, while hidden states reveal its internal belief regarding vision-text alignment. Combining them prevents the system from being fooled by highly confident but ungrounded language priors.
- Sequence Matters for Uncertainty: Unlike prior hidden-state methods that pool features into a flat vector, keeping the inputs in a sequence allows the transformer to learn how uncertainty propagates and shifts from token to token during autoregressive generation.
- The "Goldilocks" Layers: Through ablation studies, the authors found that the best multimodal reliability signals don't come from the final layer of the VLM. Instead, intermediate layers (e.g., layer 16 or 22 in LLaVA-7B) provide the best performance because they capture the raw cross-modal fusion before the model shifts its focus entirely to next-token text generation.
Key Results
HARMONY consistently matched or outperformed all black-box and white-box baselines across all datasets and models:
- Performance Metrics: It achieved up to a 5% improvement in AUROC and up to a 9% improvement in Prediction Rejection Ratio (PRR) compared to the best existing learnable baselines (like MSF and LARS).
- Selective Prediction: In practical scenarios where the model must decide whether to answer or abstain, HARMONY delivered higher coverage at lower risk levels, making fewer critical errors.
- Out-of-Distribution (OOD) Generalization: When trained on A-OKVQA and evaluated on progressively harder mixtures of OOD data from OKVQA, HARMONY's performance degraded much more gracefully than standard confidence-based metrics.
Limitations and Future Work
Despite its strong performance, HARMONY has a few notable limitations:
- Data Dependency: As a supervised white-box method, it requires a labeled calibration dataset to train the VisualBERT scoring function.
- Access Requirements: It relies on access to the model's internal hidden activations, making it incompatible with closed-source, API-only models (like GPT-4V).
- Architecture Specificity: Because internal hidden dimensions vary across VLM families, the linear projection layer must be customized for each specific model architecture.
Future work points toward making these learnable uncertainty functions more generalizable across completely different model families without requiring architecture-specific adjustments.
Summary updated