arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.03407cs.CL
收藏

追踪大语言模型中的药理学知识

Tracing Pharmacological Knowledge In Large Language Models

School of Electrical and Computer Engineering(电气与计算机工程学院);Purdue University(普渡大学);Viterbi School of Engineering(维特比工程学院);University of Southern California(南加州大学);Stephen J. R. Smith Faculty of Engineering and Applied Science(工程与应用科学学院);Queen’s University(皇后大学);Department of Molecular and Cellular Biology(分子与细胞生物学系);Scripps Research(斯克里普斯研究学院)

Basil Hasan Khwaja, Dylan Chen, Guntas Toor, Anastasiya Kuznetsova

AI总结:

本研究通过因果性和探测性方法揭示大语言模型中药物组语义的分布式表示机制,发现早期层和中间token对编码药理学知识起关键作用。

摘要:

大语言模型(LLMs)在药理学和药物发现任务中表现出强大的实证性能,但它们如何编码药理学知识的内部机制仍不明确。在本研究中,我们通过因果性和探测性解释方法,调查了基于Llama的生物医学语言模型中药物组语义的表示和检索方式。我们通过激活修补技术定位药物组信息在模型各层和token位置的存储位置,并辅以在token级和sum-pooled激活上训练的线性探测器进行分析。我们的结果表明,早期层在编码药物组知识中起关键作用,最强的因果效应来自药物组跨度内的中间token而非最终的药物组token。线性探测进一步揭示,药理学语义分布在token上,并已存在于嵌入空间中,token级探测器表现接近随机,而sum-pooled表示法达到最大准确率。这些发现表明,LLMs中的药物组语义并非局限于单个token,而是源于分布式表示。本研究提供了对LLMs中药理学知识系统机制分析的首次系统性研究,为理解生物医学语义在大语言模型中的编码方式提供了见解。

英文摘要:

Large language models (LLMs) have shown strong empirical performance across pharmacology and drug discovery tasks, yet the internal mechanisms by which they encode pharmacological knowledge remain poorly understood. In this work, we investigate how drug-group semantics are represented and retrieved within Llama-based biomedical language models using causal and probing-based interpretability methods. We apply activation patching to localize where drug-group information is stored across model layers and token positions, and complement this analysis with linear probes trained on token-level and sum-pooled activations. Our results demonstrate that early layers play a key role in encoding drug-group knowledge, with the strongest causal effects arising from intermediate tokens within the drug-group span rather than the final drug-group token. Linear probing further reveals that pharmacological semantics are distributed across tokens and are already present in the embedding space, with token-level probes performing near chance while sum-pooled representations achieve maximal accuracy. Together, these findings suggest that drug-group semantics in LLMs are not localized to single tokens but instead arise from distributed representations. This study provides the first systematic mechanistic analysis of pharmacological knowledge in LLMs, offering insights into how biomedical semantics are encoded in large language models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑