DualFairVL: Multimodal Fair Medical Diagnosis
- DualFairVL is a multimodal framework that separates sensitive from target attributes to enhance fairness in medical image classification.
- It employs a dual-branch architecture with modality-specific prompts, text anchors, cross-attention, and hypernetwork-generated instance-aware visual prompts.
- Evaluations show improved accuracy, reduced bias (DPD and DEOdds), and parameter efficiency with only 3.6M trainable parameters across in- and out-of-distribution settings.
DualFairVL is a multimodal prompt-learning framework for fair medical image classification with vision-LLMs under sensitive demographic attributes and distribution shift. It is designed to jointly debias and align both vision and text modalities by separating sensitive attributes and target attributes in a parallel dual-branch architecture, constructing approximately orthogonal text anchors through linear projections, guiding cross-attention with those anchors, generating instance-aware visual prompts through a hypernetwork, and regularizing visual features with prototypes. The method is formulated for data , where is a medical image, the diagnostic label, and a sensitive attribute such as sex, race, or skin type, and it is evaluated for both in-distribution and out-of-distribution fairness and accuracy (Xia et al., 26 Aug 2025).
1. Problem setting and conceptual rationale
DualFairVL addresses fairness in medical diagnosis when a model can exploit correlations between disease labels and protected or nuisance attributes, and when those correlations are exacerbated by scanner, hospital, acquisition-protocol, and population shifts. The paper’s central claim is that fairness in medical vision-LLMs cannot be reduced to a single-modality debiasing problem. In its formulation, debiasing only text or only vision leaves residual bias in the other modality, and because the model depends on cross-modal alignment, that residual bias induces cross-modal misalignment.
The argument against unimodal debiasing is explicit. Text-only debiasing can remove sensitive components from prompts, but visual features may still entangle disease-relevant information with demographic or acquisition cues. Vision-only debiasing may purify image features, but biased text anchors remain in the shared embedding space and continue to pull alignment toward spurious directions. The paper therefore frames the main failure mode as broken alignment between a partially debiased visual stream and a partially debiased textual stream.
This leads to four stated goals: fairness across demographic groups, robustness under out-of-distribution shifts, cross-modal alignment between debiased image and text representations, and parameter efficiency. A plausible implication is that DualFairVL belongs to a class of methods that treat fairness and robustness as coupled properties of multimodal representation geometry rather than as post hoc thresholding problems.
2. Dual-branch architecture and CLIP-based adaptation
DualFairVL is built on a pretrained CLIP backbone with a visual encoder , a text encoder , and a shared vision-language embedding space. In experiments, the backbone is CLIP ViT-B/16, and the pretrained CLIP is frozen; only prompt-related modules and associated lightweight components are trained (Xia et al., 26 Aug 2025).
The predictive core remains CLIP-style. Image and text embeddings are projected into the shared space as , and prediction uses temperature-scaled cosine similarity with cross-entropy:
The fairness-aware predictor is reformulated as
where denotes trainable prompts.
The architectural novelty lies in a parallel dual-branch decomposition. One branch models the target attribute, denoted 0, and is intended to capture disease semantics relevant for diagnosis. The second branch models the sensitive attribute, denoted 1, and explicitly isolates identity-related information such as sex, race, or skin type. The two branches share the frozen CLIP encoders but use branch-specific prompts and branch-specific interactions. This design gives the model an explicit place to store sensitive information rather than allowing it to leak diffusely into a single latent representation.
Prompting occurs in both modalities. Textual prompts are constructed as
2
where 3 are learnable text vectors. In the visual encoder, each branch introduces layer-aware visual prompts
4
for branch 5. In the reported implementation, prompt length is 6 for both modalities, and the full trainable parameter count is 7.
3. Text-guided attribute disentanglement and cross-modal prompt generation
A defining component of DualFairVL is the construction of text anchors that encode sensitive and target concepts separately. The text branch computes branch-specific states
8
and extracts the final embedding from the [EOS] token:
9
Here 0 captures sensitive attributes, while 1 captures disease semantics but may still contain sensitive leakage.
The target text anchor is debiased by ridge-regularized projection away from the sensitive direction. The SA-aligned component of 2 is estimated as
3
with 4. The debiased target embedding is then
5
The final text anchors are 6 for the target branch and 7 for the sensitive branch. The paper emphasizes that these anchors are approximately orthogonal rather than exactly orthogonal: as 8, the projection approaches exact orthogonal projection onto the complement of the sensitive subspace, but the positive 9 is used to avoid overly aggressive information removal.
These anchors then guide multimodal interaction. For each branch, an image is split into 0 patches and projected to 1. Up to layer 2, branch-specific prompts are inserted into the ViT:
3
The text anchor conditions cross-attention. After attribute embedding projection, the query vector is 4, and the key comes from the visual sequence 5. The branch-specific instance-aware visual prompt at the last layer is computed by
6
followed by
7
The resulting prompt is injected into the final visual layer:
8
and the class token is projected as
9
The paper does not formulate alignment as a separate standalone contrastive penalty beyond the CLIP-style classification objective. Instead, alignment is induced by text-anchor-guided cross-attention, common embedding geometry, and branch-consistent multimodal fusion.
4. Hypernetwork, prototype regularization, and optimization objective
DualFairVL’s second major mechanism is a hypernetwork 0 that transforms initial visual prompts into branch- and layer-specific refined prompts. Each branch replaces 1 with 2 via
3
The adapter parameters are generated from a layer-aware attribute embedding 4:
5
with 6 and 7. The embedding is defined by
8
where 9 is the attribute branch embedding, 0 encodes layer-specific information, 1 includes instance-aware attributes from the final layer, and 2 is an MLP with two fully-connected layers and ReLU.
The visual disentanglement stage uses prototypes. For a mini-batch 3, branch features are projected by a shared network 4, producing
5
For the subset
6
the embeddings are assumed to lie on a unit hypersphere and to be well modeled by a von Mises–Fisher distribution. The prototype 7 is the central direction for samples with label 8 and attribute 9 in branch 0.
The compactness term is
1
and the separability term is
2
Prototypes are updated by exponential moving average:
3
The paper uses 4 and 5, and defines
6
The complete training objective is
7
This objective localizes sensitive information to the SA branch, preserves task-discriminative information in the TA branch, and separates the two through prototype regularization. The paper explicitly notes that it does not introduce a separate adversarial fairness loss or a standalone multimodal contrastive alignment loss beyond CLIP-style cross-entropy and guided cross-modal fusion.
5. Fairness formulation, benchmarks, and empirical results
DualFairVL evaluates predictive performance with AUC and fairness with DPD and DEOdds. Demographic parity difference is defined as
8
where
9
Perfect demographic parity corresponds to 0. For equalized odds, the group-specific rates are
1
and DEOdds is defined as the maximum inter-group difference in FPR and TPR. Equalized odds is achieved when 2 (Xia et al., 26 Aug 2025).
The evaluation covers eight medical imaging datasets across four modalities: Fitzpatrick17k, HAM10000, BCN20000, MSK, PAPILA, Harvard-GF3300, CheXpert, and MIMIC-CXR. The paper states the four modalities as optical coherence tomography, chest X-ray, fundus photography, and dermoscopy. Five datasets are used for in-distribution evaluation: Fitzpatrick17k, PAPILA, Harvard-GF3300, HAM10000, and CheXpert. Out-of-distribution evaluation includes dermatology domain generalization across HAM10000, BCN20000, and MSK, and chest X-ray transfer from CheXpert to MIMIC-CXR. Sensitive attributes include sex, race, and Fitzpatrick skin type, binarized following prior MedFair evaluation practice.
Reported training details include PyTorch, 4 NVIDIA RTX 2080 Ti GPUs, image size 3, AdamW, weight decay 4, batch size 5, dataset-specific learning rate between 6 and 7, prompt length 8 for both modalities, temperature 9, attribute embedding dimensions 0 projected to 1, local adapter hidden dimension 2, and averaging over 3 independent runs.
The reported in-distribution results show consistent gains in the fairness-accuracy tradeoff. On HAM10000 with sex as the sensitive attribute, DualFairVL reports AUC 3, DEOdds 4, and DPD 5. On PAPILA with sex, it reports AUC 6, DEOdds 7, and DPD 8. On Fitzpatrick17k with skin type, it reports AUC 9, DEOdds 0, and DPD 1. On Harvard-GF3300, it reports AUC 2, DEOdds 3, and DPD 4 for sex, and AUC 5, DEOdds 6, and DPD 7 for race. The paper particularly highlights PAPILA, where AUC is improved by 8 over prior methods while DEOdds and DPD are also reduced.
The out-of-distribution results are a major part of the method’s identity. On CheXpert 9 MIMIC-CXR for sex, the source-domain metrics are AUC 00, DEOdds 01, and DPD 02, while the target-domain metrics are AUC 03, DEOdds 04, and DPD 05. For race, the source-domain metrics are AUC 06, DEOdds 07, and DPD 08, and the target-domain metrics are AUC 09, DEOdds 10, and DPD 11. In dermatology single-source domain generalization, HAM10000 12 BCN20000 yields AUC 13, DEOdds 14, and DPD 15, while HAM10000 16 MSK yields AUC 17, DEOdds 18, and DPD 19. In multi-source leave-one-out evaluation, the target HAM10000 result is AUC 20, DEOdds 21, and DPD 22; the target BCN20000 result is AUC 23, DEOdds 24, and DPD 25; and the target MSK result is AUC 26, DEOdds 27, and DPD 28.
Across these settings, the paper states that DualFairVL achieves state-of-the-art fairness and accuracy under both in- and out-of-distribution settings, outperforming full fine-tuning and parameter-efficient baselines with only 29 trainable parameters.
6. Ablations, relation to adjacent methods, and limitations
The ablation studies isolate four major components: textual debiasing 30, visual debiasing 31, text-guided cross-attention 32, and the hypernetwork 33. The reported conclusion is that only the full combination produces consistent gains across in-distribution and out-of-distribution settings (Xia et al., 26 Aug 2025). Textual debiasing alone gives poor results, supporting the paper’s claim that text-only debiasing is insufficient because visual bias remains and disrupts alignment. Adding text-guided cross-attention improves AUC, but fairness gains remain inconsistent unless the hypernetwork is also present. Adding 34 improves both performance and fairness, indicating that visual disentanglement remains necessary even after prompt-based multimodal fusion.
Prompt analyses refine this picture. The paper evaluates prompt lengths 35 and reports that prompt length 36 gives the best fairness-accuracy tradeoff in both in-distribution and out-of-distribution settings. It also compares layer-aware, instance-aware, and combined prompt-sharing strategies, with the combined strategy performing best overall. The depth analysis further states that layer-aware prompts work best in early to middle layers, instance-aware prompts are most effective at the final layer, and injecting instance-aware prompts too early can hurt learning. DualFairVL therefore uses layer-aware prompts in the 1st–11th layers and instance-aware prompts at the final layer.
Within the broader literature, DualFairVL can be situated among medical multimodal fairness methods that intervene at different levels of the representation pipeline. FairCLIP regularizes distributions of positive image-text similarities via a Sinkhorn-distance objective on Harvard-FairVLMed, thereby treating fairness as a distribution-alignment problem over multimodal similarity structure (Luo et al., 2024). FairLLaVA regularizes pooled multimodal hidden states to be demographic-invariant through mutual-information minimization during LoRA-based fine-tuning of large vision-language assistants (Bhosale et al., 27 Mar 2026). FVL-FP addresses group fairness in federated visual-LLMs through cross-layer demographic fair prompting, demographic subspace orthogonal projection, and fairness-aware prompt fusion (Chen et al., 3 May 2025). MultiFair addresses multimodal medical classification through dual-level gradient modulation at the modality and demographic-group levels (Zubair et al., 30 Sep 2025). Against this background, DualFairVL’s distinctive feature is its integration of text-side sensitive-direction identification, dual-branch sensitive/target decomposition, text-anchor-guided cross-attention, hypernetwork-generated instance-aware visual prompts, and prototype-based visual disentanglement in a single parameter-efficient CLIP adaptation framework.
The paper also clarifies several points that are easy to misconstrue. DualFairVL is not presented as merely text-side debiasing, merely visual prompt tuning, or merely fairness regularization added to CLIP. It is a joint dual-modal alignment framework in which fairness is achieved by disentanglement, anchor projection, and branch-wise alignment. Likewise, the “approximately orthogonal” text anchors should not be read as exact orthogonalization: the positive ridge parameter 37 explicitly relaxes the projection to avoid erasing task-relevant disease semantics.
The stated limitations are substantial. The framework is currently built on CLIP fine-tuning and has not yet been extended to other VLM backbones. The authors identify future work on more general dual-modal debiasing across foundation models, more complex and composite sensitive attributes, limited or incomplete sensitive-attribute annotations, and further efficiency and scalability for real-time clinical deployment. The evaluation also relies on DPD and DEOdds, which do not capture calibration disparities, subgroup uncertainty, intersectional fairness beyond binarized attributes, or causal fairness concerns. Finally, the method assumes access to sensitive labels during training, and the sensitive attributes and task labels are binarized following MedFair evaluation practice.