Tracing Pharmacological Knowledge In Large Language Models
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 11 of its 23 references that are in the map. First posted on arXiv 3 Mar 2026.
Builds on
11 of 23 references.
References · 11
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
- 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 328
- 2020Probing Pretrained Language Models for Lexical Semanticscited by 156
- 2019Probing Natural Language Inference Models through Semantic Fragmentscited by 64
- 2024Understanding and Patching Compositional Reasoning in LLMscited by 45
- 2025Elucidating Mechanisms of Demographic Bias in LLMs for Healthcarecited by 8
- 2022Review of Natural Language Processing in Pharmacologycited by 3
Built on by
Not cited yet.