摘要: 目的:药物不良反应(adverse drug reaction, ADR)检索是药物警戒、临床辅助决策和患者用药咨询中的基础任务。已有基于检索增强生成和图检索增强生成的系统能够在规范化药物名称输入下完成已编目药物–副作用关系查询,但真实用户输入常包含商品名、别名、剂量/剂型文本、拼写错误和类别级查询需求。本文提出一种面向真实世界药物名称变体的增强型图检索增强生成方法,以提高闭集ADR知识检索在非规范输入下的可用性和鲁棒性。方法:本研究基于SIDER派生药物–副作用关系构建多关系ADR知识图谱,包含药物、药物别名、副作用和药理类别四类节点,以及药物–副作用、别名映射和药理归属三类关系。本文不进行模型训练或参数微调,而是将同源知识库中的药物–副作用关系组织为可查询图谱,并据此构造查询样本集。在检索流程中,系统首先执行查询路由和药物名规范化,再根据任务类型调用药物–副作用关系查询、别名解析、剂量/剂型清洗、药理类别路由和可选的大语言模型拼写纠错模块。本轮实验通过兼容统一聊天接口的远程推理服务调用Qwen2.5-72B-Instruct,主要用于无外部检索基线、自然语言解释和药名拼写纠错;二分类标签由图检索结果确定。结果:知识源包含124,243条药物–副作用正向关系;在20%保留边设置下,实际入图关系为99,394条,另有24,849条作为保留边。增强图谱包含1,105个药物节点、1,988个别名节点、4,073个副作用节点和945个药理类别节点。无外部检索大语言模型在100条平衡样本上的准确率为0.610、F1值为0.418,提示仅依赖参数记忆难以稳定完成ADR事实判断。为降低单次抽样波动,标准输入与5类扰动场景均采用“每种子100条平衡样本(正负例各50) + 5个随机种子”重复评测。增强型图检索在标准药名输入场景的F1值为0.918 ± 0.052;在别名、剂量/剂型文本、大小写/标点、轻度拼写错误和复合扰动场景下,F1值分别为0.935 ± 0.014、0.918 ± 0.052、0.918 ± 0.052、0.905 ± 0.061和0.948 ± 0.020,均高于精确匹配图检索基线。在药理类别约束下,类别内药物反查任务的F1值为0.844。结论:增强型图检索增强生成方法的价值不在于继续提高规范化输入下已经接近上限的图查询准确率,而在于将ADR图检索从“规范药名精确查表”扩展为可处理别名、剂量文本、拼写错误和药理类别查询的真实世界检索系统。多关系知识图谱、轻量级药名归一化和可选的大语言模型拼写纠错共同构成了面向ADR闭集知识访问的实用技术路径。
Abstract: Objective: Adverse drug reaction (ADR) retrieval is a core task in pharmacovigilance, clinical decision support, and patient medication consultation. Existing retrieval-augmented generation and graph retrieval-augmented generation systems can query curated drug-side-effect relations under canonical drug names, but real user inputs often contain brand names, aliases, dosage/form text, misspellings, and class-level query requirements. This study proposes an enhanced graph retrieval-augmented generation method for real-world drug-name variants to improve the usability and robustness of closed-set ADR knowledge retrieval under non-canonical inputs. Methods: We constructed a multi-relational ADR knowledge graph from SIDER-derived drug-side-effect relations, including drug, drug alias, side-effect, and pharmacological class nodes, as well as drug-side-effect, alias-mapping, and pharmacological-class relations. The study did not train or fine-tune model parameters; instead, it organized drug-side-effect relations from the same-source knowledge base into a queryable graph and constructed query samples from that resource. The retrieval pipeline first performs query routing and drug-name normalization, and then invokes drug-side-effect relation retrieval, alias resolution, dosage/form text cleaning, pharmacological class routing, and optional LLM-based drug-name correction according to the task type. In this reproducibility run, Qwen2.5-72B-Instruct was accessed through a unified chat-compatible remote inference service, mainly for the no-retrieval baseline, natural-language explanation, and optional drug-name correction; binary labels were determined by graph retrieval results. Results: The source knowledge base contained 124,243 positive drug-side-effect relations. Under a 20% held-out-edge setting, 99,394 relations were loaded into the graph and 24,849 relations were reserved as held-out edges. The enhanced graph contained 1,105 drug nodes, 1,988 alias nodes, 4,073 side-effect nodes, and 945 pharmacological class nodes. The no-retrieval LLM achieved 0.610 accuracy and 0.418 F1 on 100 balanced samples, indicating that parameter memory alone is insufficient for stable ADR fact judgment. To reduce sampling variation, standard-input and five perturbation scenarios were repeatedly evaluated using 100 balanced samples per seed, with 50 positive and 50 negative cases, across five random seeds. Enhanced graph retrieval achieved an F1 value of 0.918 ± 0.052 under canonical drug-name input. Under alias, dosage/form text, punctuation/case, mild misspelling, and mixed perturbations, the F1 values were 0.935 ± 0.014, 0.918 ± 0.052, 0.918 ± 0.052, 0.905 ± 0.061, and 0.948 ± 0.020, respectively, all higher than the exact-match graph retrieval baseline. Under pharmacological class constraints, class-constrained reverse drug retrieval achieved an F1 value of 0.844. Conclusion: The value of the enhanced graph retrieval-augmented generation method lies not in further inflating already high canonical-input graph-query scores, but in extending ADR graph retrieval from canonical-name exact lookup to a real-world retrieval workflow that can handle aliases, dosage text, misspellings, and pharmacological class queries. The multi-relational knowledge graph, lightweight drug-name normalization, and optional LLM-based correction together provide a practical technical path for closed-set ADR knowledge access.