作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2025, Vol. 51 ›› Issue (3): 283-292. doi: 10.19678/j.issn.1000-3428.0068948

• 开发研究与工程应用 • 上一篇    下一篇

基于中药关键词的序列到序列处方推荐模型

杨丰豪*(), 侯校, 赵紫娟, 强彦, 赵涓涓   

  1. 太原理工大学计算机科学与技术学院(大数据学院), 山西 晋中 030600
  • 收稿日期:2023-12-04 出版日期:2025-03-15 发布日期:2024-05-15
  • 通讯作者: 杨丰豪
  • 基金资助:
    国家自然科学基金(U21A20469); 国家自然科学基金(61972274)

Sequence-to-Sequence Prescription Recommendation Model Based on Chinese Medicine Keywords

YANG Fenghao*(), HOU Xiao, ZHAO Zijuan, QIANG Yan, ZHAO Juanjuan   

  1. College of Computer Science and Technology (College of Big Data), Taiyuan University of Technology, Jinzhong 030600, Shanxi, China
  • Received:2023-12-04 Online:2025-03-15 Published:2024-05-15
  • Contact: YANG Fenghao

摘要:

以中医处方推荐任务作为切入点, 现有处方推荐模型忽略草药配伍等领域知识信息, 导致推荐效果不佳、推荐处方偏离实际。为此, 提出一种基于序列到序列框架的中药关键词感知模型。在症状序列信息挖掘部分加入一种关键词感知网络, 拓展模型多分支结构, 并以处方君药作为关键词嵌入向量来挖掘处方配伍信息, 提升模型深层次知识特征表示能力, 提高推荐质量。设计一种交叉传播机制, 降低注意力累加过程中被过多关注的特征维度, 使得累加结果可以关注到未被关注区域, 降低推荐处方重复概率。提出一种混合软损失, 通过加大不同分布之间的差距, 惩罚重复关注同一位置行为。在2个公共临床中医处方数据集上的实验结果表明, 与TPGen、Herb-Know等其他深度学习模型相比, 该模型能够有效提升推荐处方质量, 解决模型生成过程中的重复问题, 其在Precision、Recall、F1值上相比最好的基准模型分别提升了约8、5、6百分点。此外, 消融实验结果也证明了各个模块的有效性。

关键词: 处方推荐, 序列到序列, 关键词, 交叉传播机制, 混合软损失

Abstract:

Taking the traditional Chinese medicine prescription recommendation task as an entry point, a keyword-aware model for traditional Chinese medicine based on a sequence-to-sequence framework is proposed. This is done to address the problems of existing prescription recommendation models that ignore domain knowledge information, such as herb compatibility, which can lead to poor recommendation effects and deviation of recommended prescriptions from the reality. A keyword-aware network is added to the symptom sequence information mining part to expand the multi-branch structure of the model, and prescription monarch medicine serves as the keyword embedding vector to mine the prescription dispensing information to enhance the model's ability to represent the deep knowledge features and improve the recommendation quality. A cross-propagation mechanism is proposed to reduce the feature dimensions that are over-attended in the attention accumulation process, ensuring that the accumulation result can focus on the unattended region, and reducing the probability of recommended prescription repetition. A hybrid soft loss function is also proposed to further improve the results by increasing the gap between different distributions and penalizing repeated attention to the same location behavior. The model is tested on two public clinical traditional Chinese medicine prescription datasets. The experimental results show that, compared with other deep learning models such as TPGen and Herb-Know, the model can effectively enhance the quality of recommended prescriptions and improve the repetition problem in the model generation process. It also improves the quality of recommended prescriptions compared with the best baseline model in terms of Precision, Recall, and F1 value by 8, 5, and 6 percentage points, respectively. In addition, the results of ablation experiments demonstrate the effectiveness of the modules.

Key words: prescription recommendation, sequence-to-sequence, keyword, cross-propagation mechanism, hybrid soft loss