Source-linked AI summary

Mitigating Hallucinations of Large Language Models in Medical Information Extraction via Contrastive Decoding

Derong Xu, Ziheng Zhang, Zhihong Zhu, Zhenxi Lin, Qidong Liu, Xian Wu, Tong Xu, Xiangyu Zhao, Yefeng Zheng, Enhong Chen

arXiv:2410.15702v1cs.CL

TL;DR

Hallucinations in medical information extraction can produce nonexistent entities and reasoning errors, motivating methods that improve reliability. ALCD separates identification and classification through selective fine-tuning and alternately contrasts their output distributions during inference. Across two backbones and six medical tasks, it substantially improves MIE performance over established decoding methods, while increasing fine-tuning and inference costs and remaining evaluated only on MIE tasks.

  • Problem

    LLM-based MIE faces hallucinations involving nonexistent entities and reasoning errors, while medical applications require reliable outputs.

    Source: §1 · p. 1
  • Method

    ALCD decouples identification and classification through selectively masked fine-tuning, then alternately contrasts sub-task model distributions with adaptive constraints during inference.

    Source: §1 · p. 2, §3.2.2 · pp. 4–5
  • Results

    ALCD substantially enhances MIE performance across two LLM backbones and six medical tasks and outperforms eight established decoding methods.

    Source: §1 · p. 2, §5 · p. 9
  • Takeaways & Limitations

    ALCD provides a contrastive-decoding strategy for reducing hallucination-related problems in medical information extraction.

    Source: §1 · p. 2, §5 · p. 9

    ALCD increases fine-tuning and inference costs, uses rule-based switching, and has been evaluated only on medical information extraction tasks.

    Source: §6 · p. 9

Abstract

from arXiv · show

The impressive capabilities of large language models (LLMs) have attracted extensive interests of applying LLMs to medical field. However, the complex nature of clinical environments presents significant hallucination challenges for LLMs, hindering their widespread adoption. In this paper, we address these hallucination issues in the context of Medical Information Extraction (MIE) tasks by introducing ALternate Contrastive Decoding (ALCD). We begin by redefining MIE tasks as an identify-and-classify process. We then separate the identification and classification functions of LLMs by selectively masking the optimization of tokens during fine-tuning. During the inference stage, we alternately contrast output distributions derived from sub-task models. This approach aims to selectively enhance the identification and classification capabilities while minimizing the influence of other inherent abilities in LLMs. Additionally, we propose an alternate adaptive constraint strategy to more effectively adjust the scale and scope of contrastive tokens. Through comprehensive experiments on two different backbones and six diverse medical information extraction tasks, ALCD demonstrates significant improvements in resolving hallucination issues compared to conventional decoding methods.

1 Introduction

Medical Information Extraction uses LLMs to derive structured knowledge, but medical settings make hallucinations especially concerning. ALCD addresses this by separating identification from classification and alternating contrastive decoding, with experiments showing superiority over eight established decoding methods.

  • MIE derives structured knowledge from plain text for applications including medical knowledge graphs, dialogue, and report generation.Source: §1 · p. 1
  • Medical LLMs can hallucinate nonexistent entities and make reasoning errors when classifying medical entities.These errors can fabricate facts or deviate from the source text.Source: §1 · pp. 1–2
  • ALCD is introduced to reduce MIE hallucinations by decoupling identification and classification during fine-tuning and alternating contrastive decoding at inference.Adaptive constraints adjust the scale and scope of contrastive tokens using model consistency and confidence.Source: §1 · p. 2
  • Experiments span two LLM backbones and six diverse medical information extraction tasks, supporting broad applicability.Source: §1 · p. 2
  • ALCD is reported to outperform eight established decoding methods.Source: §1 · p. 2

2 Related Work

Related work applies general and medical LLMs to clinical tasks while recognizing hallucination risks. Existing contrastive decoding methods target particular behaviors, whereas ALCD is presented as specifically decoupling contrast and decoding abilities for MIE.

2.1 LLMs for Medical Domain

  • General and medical LLMs are increasingly applied to medical tasks, but hallucinations remain a concern because medical outputs require high reliability.Source: §2.1 · p. 2
  • Prior medical-domain hallucination research has not extensively examined decoding methods for mitigating hallucinations in MIE tasks.Source: §2.1 · p. 2

2.2 Contrastive Decoding

  • Contrastive decoding methods address different objectives, including reducing amateur behavior, improving contextual faithfulness, and enhancing truthfulness.Source: §2.2 · pp. 2–3
  • ALCD is presented as overcoming the inadequacy of previous contrastive decoding strategies for MIE by decoupling the abilities to contrast and decode outputs.Source: §2.2 · p. 3

3 Methodology

ALCD treats medical information extraction as separate identification and classification stages, then uses task-aware contrastive decoding with adaptive token constraints. Its pipeline decouples sub-model capabilities during fine-tuning and selectively combines them during inference to reduce hallucination from unwanted capabilities.

3.2.1 Decoupling with optimization masking

  • Identification and classification models are fine-tuned with optimization masking so each focuses on its designated token type while sharing the original task inputs.Classification tokens are masked for the identification model, and identification tokens are masked for the classification model; the normal model is trained without masking.Source: §3.2.1 · pp. 3–4

3 Methodology

  • The overall pipeline first decouples identification and classification through sub-model fine-tuning, then adaptively contrasts predictions using scale and scope constraints.Figure 2 summarizes these two stages and distinguishes classification, identification, and other output tokens.Source: Figure 2 · p. 4

3.2 Alternate Contrastive Decoding

  • ALCD decomposes MIE into identification and classification, then alternates their enhancement during decoding while retaining the normal model for other tokens.The method uses three models—normal, identification, and classification—to selectively exploit sub-task abilities.Source: §3.2.2 · pp. 4–5

3.2.2 Adaptively Contrasting the Predictions

  • At each decoding step, ALCD classifies the next token as cls, ide, or other and applies the corresponding contrastive rule to the model logits.For cls tokens it enhances classification logits and contrasts identification logits; the converse applies to ide tokens, while other tokens use the normal model alone.Source: §3.2.2 · pp. 4–5
  • Jensen-Shannon divergences between the normal model and each sub-model provide adaptive scales that increase the contrastive influence when their output distributions differ more.The adaptive scales are denoted d_id and d_cl, with α controlling the overall contrastive strength.Source: §3.2.2 · p. 5

3.2.3 Scope Constraints on Tokens

  • ALCD constrains the contrastive vocabulary using confidence-based scope filtering, assigning negative infinity to tokens below a threshold to suppress implausible false positives.The scope constraint combines confidence information from the normal, identification, and classification models, with β determining the maximum truncation rate.Source: §3.2.3 · p. 5

4 Experiments

ALCD is evaluated on six medical information extraction tasks using two multilingual LLM backbones and compared with eight decoding baselines. It outperforms the alternatives across backbones, with the largest reported gain reaching 4.87% on Qwen-7B-Chat for CMedCausal.

4.1 Experimental Setup

  • The evaluation uses six PromptCBLUE tasks spanning entity recognition, dialogue normalization, concept extraction, causal relation extraction, concept discrimination, and relation extraction.Because the open-source test set was unavailable, the validation set was used as the test set after repartitioning training data.Source: §4.1 · p. 5
  • ALCD is compared with greedy, beam, Top-K, nucleus, CFG, CAD, CD, and DoLa decoding under consistent fine-tuning and inference settings.Source: §4.1 · p. 6, Table 2 · p. 6

4.2 Main Results

  • 4.87% is the largest reported performance gap, achieved by ALCD over other methods on Qwen-7B-Chat for CMedCausal.Source: §4.2 · p. 7
  • ALCD improves performance on both ChatGLM-6B and Qwen-7B-Chat across six medical datasets, confirming applicability across backbones.Source: §4.1 · p. 5, §4.2 · p. 7
  • High-diversity Top-K and nucleus sampling perform poorly, suggesting that diversity generation may not be essential for medical information extraction.Source: §4.2 · p. 7

4.3 Ablation Study

Ablations show that adaptive token constraints and alternate contrastive decoding are both important to ALCD. Their effectiveness depends on moderate contrastive scale and constraint rate rather than excessive values.

4.3 Ablation Study

  • Removing token constraints lowers CMeIE-V2 micro F1 from 47.02% to 46.19%, while alternate-sum and weighted-sum variants also reduce performance.Weighted Sum produces the poorest overall result, indicating that simply ensembling the models is insufficient.Source: §4.3 · p. 7, Table 3 · p. 8

4.4 Scale of Contrasting Prediction

  • Increasing α appropriately improves micro F1 on CMeEE-V2 and IMCS-V2-SR, but values exceeding 0.4 reduce performance.The result indicates that excessive contrastive scaling weakens the desired contribution of the sub-models.Source: §4.4 · pp. 7–8

4.5 Max Rate of Constraint

  • β yields peak performance around 0.5; larger values can remove true-positive tokens after removing more false-positive tokens.Values below 0.45 have minimal impact on low-probability tokens.Source: §4.5 · p. 8

4.6 Comparison of Token Constraint

ALCD’s alternating adaptive token constraints outperform a CD-based constraint alternative, while decoupling performance depends on moderate sub-model fine-tuning. A case study shows fewer hallucinated entities and classification errors with ALCD.

4.6 Comparison of Token Constraint

  • ALCD’s token constraint consistently outperforms the constraint used in CD across all datasets.The authors attribute this to alternating adaptive constraints over both scale and scope, whereas CD uses only a maximum-value judgment.Source: §4.6 · p. 8

4.7 Affect of Decoupling Steps

  • Fine-tuning sub-models for at least 300 steps improves micro F1 over vanilla decoding, but performance declines after 600 steps for ChatGLM-6B and 400 steps for Qwen-7B-Chat.Excessive fine-tuning can compromise decoupling between identification and classification capabilities.Source: §4.7 · p. 8, Figure 5 · p. 8

4.8 Case study

  • In the CHIP-MDCFNPC case study, greedy search hallucinates “Swollen throat” and misclassifies “Cough,” whereas ALCD correctly predicts four listed concepts and their positive labels.Source: §4.8 · p. 8, Table 4 · p. 9

5 Conclusion

ALCD addresses hallucinations in medical information extraction by decoupling identification and classification, alternately enhancing these abilities during inference, and using adaptive scales based on distribution similarities.

5 Conclusion

  • ALCD decouples identification and classification during fine-tuning, then alternately enhances these abilities while excluding capabilities that may produce hallucinations.Adaptive scales based on distribution similarities enable flexible use of identification or classification abilities.Source: §5 · p. 9

6 Limitation

The approach increases fine-tuning and inference costs, relies on rule-based switching, and has been evaluated only on medical information extraction tasks.

6 Limitation

  • ALCD increases both fine-tuning and inference costs.Source: §6 · p. 9
  • The current rule-based switching could be replaced by more automatic and flexible judgment methods.Source: §6 · p. 9
  • Evaluation has been limited to medical information extraction, leaving other medical tasks, domains, and language settings for future exploration.The authors also identify more robust decoupling and contrasting decoding techniques as future directions.Source: §6 · p. 9

A.1 Tasks and Datasets

Experiments use six selected tasks from the Chinese PromptCBLUE medical dataset, covering entity, relation, causal, normalization, and clinical-concept extraction settings framed as identify-and-classify processes.

A.1 Tasks and Datasets

  • Experiments use the Chinese medical PromptCBLUE dataset (Zhu et al., 2023), which includes several common tasks; due to limited resources, six tasks are selected for validation.Dataset statistics are reported in Table 1.Source: §A.1 · p. 12
  • CMeEE-V2 and CMeIE-V2 cover Chinese medical named-entity recognition and entity-relation extraction through identification and categorization stages.Source: §A.1 · p. 12
  • IMCS-V2-NER extracts and classifies medical entities from doctor-patient dialogues, while CMedCausal identifies causal and effect words and categorizes causal relations.Source: §A.1 · p. 12
  • IMCS-V2-SR normalizes words from doctor-patient dialogues and assigns normalization labels, while CHIP-MDCFNPC finds and classifies clinical concepts in reports.Source: §A.1 · p. 12
  • PromptCBLUE provides many prompt templates for each dataset, supporting validation of the approach and its generalization ability.Table 5 reports the number of prompt templates for each dataset.Source: §A.1 · p. 12, Table 5 · p. 12

A.2 Ability to Mitigate Hallucinations

The hallucination evaluation separates identification and classification errors, and the reported results show that ALCD reduces all three error categories relative to Beam Search.

A.2 Ability to Mitigate Hallucinations

  • ALCD achieves lower error rates than Beam Search in Identification_not_exist, Identification_pred_wrong, and Classification_pred_wrong.These categories respectively capture nonexistent identifications, incorrect identifications of present entities or symptoms, and incorrect classifications.Source: §A.2 · p. 12
  • Separately evaluating recognition and classification enhances ALCD’s effectiveness in assessing these capabilities.Source: §A.2 · p. 12
  • The results indicate improvements in identifying entities or symptoms and in classifying correctly identified entities or symptoms.Source: §A.2 · pp. 12–13
Loading 2410.15702v1…