TL;DR
This paper introduces "Metric-Fair Prompting," a novel framework that guides Large Language Models (LLMs) to make fairer decisions by treating similar questions similarly. By processing similar medical questions in joint pairs and enforcing a "Lipschitz-like" constraint, the method improves LLM accuracy on high-stakes clinical question answering tasks.
What Problem Does This Paper Address?
In critical domains like medical diagnosis, LLMs can exhibit unfairness by making inconsistent decisions for similar cases. This is particularly problematic in multiple-choice medical question answering (MedQA), where a wrong answer can have severe consequences. The challenge lies in ensuring that LLMs adhere to "individual fairness"—meaning similar inputs should lead to similar outputs—and base their decisions on clinically relevant features, not sensitive attributes. Standard prompting methods often treat each question in isolation, missing opportunities to leverage the relationships between similar questions for more robust and fair decision-making.
Methods
The core of Metric-Fair Prompting is a joint-inference protocol that processes similar questions together. The process involves:
- Pair Selection: Questions are embedded using NLP models (specifically, Qwen3-4B) to identify pairs of highly similar questions based on cosine similarity.
- Metric Fairness Constraint: The LLM is prompted to enforce a "Lipschitz-like" constraint. This means that if two question-option pairs are similar according to a task-relevant metric (e.g., embedding similarity), their predicted scores (confidence) should also be similar. This encourages consistent outputs for clinically similar cases.
- Margin/Half-Space Reasoning: For each (question, option) pair, the LLM computes a score $f(x)$ that acts as a confidence measure. This score is used to classify the option as correct or incorrect, similar to a margin-based classifier. Decisive clinical features are extracted to inform these scores.
- Cross-Item Consistency: When predictions for similar questions are close to the decision boundary, the model reconciles them by preferring choices that maintain consistency across the pair, leveraging the joint processing.
- Strict Output: The output is strictly machine-parsable (e.g., JSON), facilitating automated evaluation.
This approach contrasts with standard single-item prompting by explicitly introducing an inter-item coupling mechanism that promotes fairness through stability.
Datasets
The primary dataset used for evaluation is MedQA (US), a benchmark for medical question answering. The paper utilizes the test split of this dataset, which consists of 1,273 multiple-choice medical questions.
Key Insights and Ideas
- Leveraging Similarity for Fairness: The paper demonstrates that explicitly modeling and enforcing similarity between questions is a powerful way to achieve individual fairness in LLM decision-making.
- Joint Processing Enhances Robustness: Processing similar questions together, rather than in isolation, helps stabilize decisions, especially for cases near the decision boundary, reducing near-boundary errors.
- Lipschitz Constraint as a Fairness Mechanism: The introduction of a Lipschitz-like constraint directly operationalizes the principle of "treating similar instances similarly," ensuring that small, clinically irrelevant changes in input do not lead to drastically different outputs.
- Confidence-Oriented Reasoning: By mapping (question, option) pairs to confidence scores, the framework encourages the LLM to reason about its certainty, which is crucial for high-stakes applications.
Key Results
Evaluated on the MedQA (US) benchmark using the Qwen3-14B model, Metric-Fair Prompting achieved a significant improvement in accuracy:
- Single-item prompting: 68.0% accuracy.
- Metric-Fair Prompting (two-item, joint inference): 84.0% accuracy.
This represents an improvement of 16 percentage points, highlighting the effectiveness of the fairness-aware, confidence-oriented, and joint-inference approach. Qualitative examples show the model successfully identifying consistent answers for clinically indistinguishable cases, even when minor details like patient age differ but are not clinically decisive.
Limitations and Future Work
The authors acknowledge several limitations and suggest future research directions:
- Performance Stability: The performance of the proposed method is not always stable. Future work could involve calibrated decoding, temperature-free beam search, and ensembling to improve stability.
- Task-Specific Similarity Metrics: The current approach uses general NLP embeddings for similarity. Future work could explore learning task-specific similarity metrics with clinical supervision.
- Confidence Estimation and Selective Answering: Integrating more sophisticated confidence estimation and selective answering mechanisms could further enhance the system.
- Pair Construction: Exploring pair construction beyond nearest neighbors, such as clustering or active pairing, could be beneficial.
- Broader Evaluation: Evaluating the approach on broader datasets and multilingual settings is necessary.
- Human-in-the-Loop: Incorporating human-in-the-loop review and bias audits is important for refining the system.
Summary updated