Editing Factual Knowledge and Explanatory Ability of Medical Large Language Models

Derong Xu, Ziheng Zhang, Zhihong Zhu, Zhenxi Lin, Qidong Liu, Xian Wu, Tong Xu, Wanyu Wang, Yuyang Ye, Enhong Chen, Yefeng Zheng

Introduction

Large Language Models (LLMs) have demonstrated significant potential in the medical domain, yet their deployment in clinical settings is hindered by two primary challenges: the propensity for hallucinations and the rapid obsolescence of medical knowledge. Given the high stakes of clinical decision-making, the cost of incorrect information is prohibitive. However, retraining these models from scratch to incorporate new clinical data or correct errors is computationally expensive and often impractical. This paper introduces MedLaSA (Layer-wise Scalable Adapter), a novel model-editing strategy designed to surgically update specific medical facts and complex explanations without compromising the model's broader knowledge base.

The Challenge of Medical Model Editing

Model editing aims to modify specific knowledge within a pre-trained model while maintaining its performance on unrelated tasks. Existing approaches generally fall into two categories, each with distinct drawbacks:

  1. Locate-then-edit: These methods identify specific neurons or weights responsible for a fact and overwrite them. While direct, this often results in poor "locality," where updating one fact inadvertently "breaks" unrelated knowledge.
  2. Additional Parameters: These methods use external modules, such as adapters, to store new information. While safer for the base model's integrity, they often lack the precision required to handle the complex reasoning chains and explanatory rationales necessary for medical trust.

The authors identify a critical research gap: the need to edit not just simple triples (e.g., "Drug A treats Disease B") but also the explanatory ability—the underlying rationale that justifies a medical conclusion.

The MedLaSA Framework

MedLaSA combines the precision of localization with the safety of parameter-efficient fine-tuning through a "surgical" approach to model updates. The framework operates via three core mechanisms:

Causal Tracing and the Impact Matrix

The process begins by identifying which layers of the LLM are most influential for a specific piece of knowledge. By "corrupting" an input with noise and then selectively "restoring" hidden states, the researchers determine the contribution of each layer to a correct prediction. This results in an Impact Matrix, which maps specific medical facts to their corresponding neural representations across the model's architecture.

Soft Scaling and Layer-wise Adaptation

Unlike standard Low-Rank Adaptation (LoRA), which applies uniform weights across all layers, MedLaSA employs "soft scaling." It calculates a unique scale ($\alpha$) and rank ($r$) for the adapter in each layer based on that layer's importance as defined by the Impact Matrix. This ensures that layers identified as "hubs" for factual recall receive more significant updates, while less relevant layers remain largely untouched.

Parallel Adapters

These scalable adapters are integrated into the dense layers of the LLM. When the model processes a prompt related to the edited knowledge, the specific adapter for that "knowledge neighborhood" is activated with high intensity. This allows the model to retrieve the updated information while remaining "quiet" for unrelated topics, preserving the model's original capabilities.

Experimental Setup and Datasets

To evaluate MedLaSA, the researchers introduced two specialized benchmarks for medical model editing:

  • MedCF (Medical Counter Fact): Derived from the Drug Repurposing Knowledge Graph (DRKG), this dataset tests the model's ability to flip a fact (e.g., changing a known side effect) to assess how flexibly it can incorporate counterfactual updates.
  • MedFE (Medical Fact Explanation): Based on MedMCQA, this task requires the model to edit the rationale or explanation behind a medical fact, representing a significant increase in complexity over simple factual updates.

The models were evaluated on efficacy (success of the edit), generality (recognizing the edit in rephrased prompts), and locality (ensuring unrelated knowledge remains intact).

Results and Performance Analysis

MedLaSA demonstrated superior performance across all metrics compared to state-of-the-art methods like ROME, MEMIT, and standard LoRA:

  • High Efficacy: On the complex MedFE dataset, MedLaSA achieved an efficacy of 98.11%, significantly outperforming ROME (84.01%) and MEMIT (84.59%).
  • Superior Locality: While MEMIT often caused a "collapse" in unrelated knowledge—evidenced by drops in entity mapping scores exceeding 30%—MedLaSA maintained high scores across all locality metrics, ensuring that edits did not "leak" into unrelated domains.
  • Fluency and Consistency: Edited models retained their ability to generate natural, coherent text. The researchers found that semantic consistency was high; because similar content shares consistent scales, the model’s ability to recognize an edited fact when rephrased was naturally enhanced.

Conclusion and Future Directions

MedLaSA represents a significant step forward in making medical LLMs more reliable and easier to maintain. By treating knowledge as a heterogeneous entity distributed across layers, the framework allows for precise, surgical updates to both facts and explanations.

Future work will address the challenges of batch editing, where thousands of facts must be updated simultaneously, and adapter management to prevent parameter bloat as the number of edits grows. Ultimately, testing these methods against evolving real-world clinical guidelines will be the final step in moving these models from the research lab to the clinic.

Summary updated

BibTeX
@inproceedings{xu2024editing,
  author = {Derong Xu and Ziheng Zhang and Zhihong Zhu and Zhenxi Lin and Qidong Liu and Xian Wu and Tong Xu and Wanyu Wang and Yuyang Ye and Xiangyu Zhao and Enhong Chen and Yefeng Zheng},
  title = {{Editing Factual Knowledge and Explanatory Ability of Medical Large Language Models}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679673},
}
Figure