Closing surveillance detection gaps for emerging digital drug discourse with ontology-enhanced large language models

Wait 5 sec.

IntroductionThe age-adjusted rate of drug-involved deaths in the US was ~250% higher than two decades ago1, despite a 24% reduction in overdose-related fatalities between 2023 and 20242. Adverse outcomes from overdoses extend beyond fatalities to other forms of measurable harm, including increased strain on the medical system. In 2024 alone the Drug Abuse Warning Network (DAWN) reported more than 8.4 million nonfatal drug-related emergency department (ED) visits in the US3. Meanwhile, the National Drug Early Warning System (NDEWS) identified parallel social media conversations around emerging drugs separately linked to increased ED visits in 2025, including synthetic opioids (e.g., nitazenes), opioid-like compounds (e.g., kratom), and polydrug-use combinations (e.g., benzodiazepines, kratom, or ketamine combined with fentanyl)4.Proactively addressing drug harm requires clinicians, health professionals, and policymakers to understand contemporary and evolving drug use trends as they emerge. Yet traditional epidemiologic surveillance systems (e.g., DAWN and others) contain built-in lags ranging from months to years5. Recommendations informed by epidemiologic patterns observed in data may occur even later. In addition, these systems, which typically measure prevalence and measurable impacts of drug use across communities and populations, similarly lack the capacity to capture new drug trends in places where they are likely to emerge, including the internet and social media.Analyzing social signals effectively can proactively identify emerging substances prior to harm6. As a data source, social media functions as a temporally proximal signal for individual and societal drug-related behaviors, beliefs, and actions from drug experimentation to addiction7. However, the pace at which social media users generate drug-related content exceeds current abilities to capture and effectively contextualize viral semantic signals for new drugs8. This ‘detection gap’ allows for new, seemingly viral drugs to escape surveillance unnoticed, typically after physical harm or healthcare burden is observed, as seen with spikes in kratom and nitazenes use9.Closing detection gaps require sustainable, accessible, and dynamic surveillance systems that reduce lag and are capable of contextualizing clinical and social signals as they emerge. Large Language Models (LLMs) and generative artificial intelligence (Gen-AI) are often considered logical solutions to address such gaps10. Yet, research also shows these models alone may be ill-equipped for tasks requiring extensive domain knowledge11. We propose embracing continuously-updating ontology-constrained LLM systems for real-time interpretation of drug-related digital discourse.The impact of semantic drift on drug surveillance modelsPrior studies have shown that social media’s broad popularity and loose content restrictions are conducive to drug promotion and content exposure12. Estimates suggest that about 10% of publicly accessible social media content advertises, depicts, or promotes illegal drugs13. Moreover, in prior studies, over 60% of adolescents reported encountering drug-related content on TikTok, Instagram, and Snapchat14, which represent the most used social media apps among younger populations.However, the true prevalence of drug content on social media potentially underestimated. Parker et al15. and Rao et al8. observed, for example, that even when strict inclusion and exclusion parameters are upheld, new lexicons for commonly misused or emerging drugs— which include abbreviations, colorful descriptors, emoji, and other coded referents—may escape detection during the data querying and interpretation phases. As emerging, time-bound, and audience-specific referents, many do not have universally analogous associations and may be general enough to have multiple, conflicting meanings—a referent for kratom is ‘tea’, a common beverage and slang term for gossip— which aids obfuscation and inhibits detection.Because coded referents can evade detection even when they are present at high volumes, the datasets containing them may exhibit weak signals and high noise levels. When these data are analyzed with natural language processing (NLP) and deep-learning, transformer-based models, output may be impacted by semantic drift, resulting in unclear or topically irrelevant findings. Human-driven qualitative methods are effective options to distill noise; however, analysis of social media data at pace with new drug and drug-related trends by human researchers ranges between substantially expensive (for smaller datasets) to logistically infeasible (at scale). Addressing these issues requires the field to leverage emerging technologies capable of temporal reasoning for rapid identification, and integrate them with evolving surveillance architectures.Conceptual framework: integrating dynamic ontologies with large language modelsDue to their well-established reasoning capability, computational fields have embraced Large Language Models (LLMs) as a sustainable and efficient social surveillance tool. Yet, studies also show that public-facing, black-box LLM models, which include ChatGPT, Gemini, Grok, Claude, and others, lack domain knowledge needed to reason effectively. Consequently, when LLMs are deployed for tasks where domain knowledge is needed, results may be prone to hallucinations or inaccuracies despite improvements in base LLM models over time11.Historically, drug inventories—i.e., NIDA’s Drugs A-Z database16 and the DEA’s Slang Terms & Code Words17—were reliable, primary sources of drug knowledge, including known coded referents. Entries in these databases were structurally arranged into a formalized taxonomy, tying broad drug-related facts (i.e., classes) to categories, pharmacologic names, brand names, routes of administration and previously identified slang terms. Yet, despite their utility, these taxonomies require regular human curation to maintain applicability l and it is sometimesunclear how often they are updated. Consequently, the extent to which these inventories comprising known slang terms are representative of emerging drug trends or shifts in referents is unknown.Despite limitations, the NIDA A-Z database and other drug inventories contain valuable translational information and can be re-envisioned as structured seed knowledge capable of improving LLM reasoning. This would occur through development of topical ontology frameworks, which are formalized structures that operationalize existing taxonomies as a machine-readable list of concepts (i.e., drug class) and their relationships with other concepts (i.e., effects, routes of administration, and alternative names)18.Beginning with an existing taxonomy, we extract all known information. Each element is re-specified as a description logic triple with a simple subject→ predicate→ object pattern19. The NIDA inventory specifies, for example, Xanax as a Schedule IV, controlled benzodiazepine that causes drowsiness and slowed breathing when combined with alcohol or other drugs. These concepts are connected as separate statements, such as: ‘Xanax—is a— Benzodiazepine; Benzodiazepines—can cause— drowsiness; and alcohol—interacts with— benzodiazepines. At this stage, encoded relationships allow for rapid information retrieval by querying subjects and predicate combinations (See Fig. 1 for a conceptual diagram).Fig. 1Full size imageConceptual diagram illustrating the construction of a dynamic ontology from a static inventory.In effect, formalized ontologies transform static inventories into knowledge graphs, which are machine-readable  lists of structured triples (i.e., as described above). When these knowledge graphs are layered over an LLM in what is called an ontology-grounded retrieval-augmented generation (oRAG) system, LLMs can query these knowledge graphs during inference to ground output rather than relying on the underlying base LLM model training parameters, which do not, by default, access or leverage such a system.Conceptually, this system operates in three stages: (1) at point of inference, the LLM retrieves matching triples to predict the classification of new or ambiguous terms, (2) when a term has no matching triple, the term is flagged as a new candidate referent rather than forced into a classification, and (3) candidate referents are held for expert review, with the source text (i.e., an individual social media entry where the term was identified), surrounding context (i.e., n-grams preceding and following the candidate term), and date of identification (i.e., to track term popularity), before being approved and added to the oRAG as a new triple.With the added oRAG inferencing layer, LLM outputs are tailored more effectively to domain-specific tasks20. This allows for more efficient and accurate querying through chatbot interfaces and enables models to perform more tasks where such knowledge is needed more effectively. For example, in the statement, “To relax, I took a pill, drank a beer, and passed out”, the LLM will refer to the oRAG layer to identify possible drugs delivered as a ‘pill’ and linked to relaxation and alcohol-induced sedation. In turn, this allows the LLM to narrow its decision making to a restrained list of substances with those properties, such as a benzodiazepine, rather than defaulting to an unconstrained or ‘zero-shot’ derived classification.There are benefits to consider with this system. Older social surveillance strategies were obfuscated by noise and conflicting terms for drugs; this system uses relational reasoning21 to rapidly distinguish whether a term, such as ‘tea’, refers to gossip, a beverage, or as a referent to nitazenes depending on surrounding context. By using relational reasoning, it is likewise possible to predict whether a new term, emoji, or similarly obscure referent may refer to a drug, and by extension its potential relationship to other substances. Critically, as new data are continuously fed through the LLM, the ontology is bidirectionally updated to reflect new observations, which helps the ontology remain current and relevant as new trends emerge.As with all AI applications, model validation is critical to uphold the integrity of the system and inferences generated from within this system22. Model validation will be needed to confirm, for example, whether an LLM’s ontology-guided classification of an ambiguous term is both extracted correctly and classified in a manner that aligns with its pharmacologic properties. Approaches to validate these models are diverse including using additional RAG-enabled, workflows23. However, with many researchers calling for greater human oversight of AI applications, expert human review is especially important to consider. This could occur via a number of evaluation frameworks24, such as relying on expert human coders to evaluate data streams for coded referents, assigning a manual classification, independently running the same data through the oRAG, and evaluating the degree of disagreement between human and machine, and routing disagreements back into ontology refinement periodically as new terms emerge.Dynamic ontologies and LLM integration impact on public health research and practiceAs of June 2025, DAWN, which was previously operated by the Substance Abuse and Mental Health Services Administration (SAMHSA), discontinued data collection as part of a broader initiative to align with changing federal priorities3. Such a shift underscores the vulnerability of surveillance systems that are not built on a sustained and funding-independent infrastructure.Compounding the issue is a second challenge that is unique to surveillance of drug use or other plausibly clandestine behaviors—namely, unlike most domains where oRAGs have been deployed (i.e., medical decision making25, electronic health record extraction and interpretation26, and others), coded drug referents, in comparison to other oRAG deployment tasks, are subject to intentional obfuscation and proliferation for the specific purpose of evading surveillance. Consequently, drug-related communication is better understood as a linguistics problem necessitating a linguistics-oriented solution. Without the capability to identify and track referents efficiently and accurately, we risk losing years of progress in addressing niche components of the US drug crisis such as social media drug exposure and online illicit drug sales.LLMs are a notably robust, accessible, and modifiable innovation in computational social science research. Yet, without additional domain knowledge, LLMs deployed for drug surveillance tasks may be prone to miss or misclassify new coded referents. In contrast, ontological frameworks, knowledge graphs, and oRAGs offer a solution to enhance LLM reasoning at pace with the proliferation of online content27.Separately, neither of these approaches is innovative and their individual applications and contributions are well established. However, when ontologies, knowledge graphs and oRAGs are used in harmony, their combined application constitutes a specific  contribution in this context: namely that many existing systems have not been designed to handle language that evolves specifically to evade detection. Anchoring the system to an ontology, specifically,  keeps the model grounded in language itself, rather than surface-level pattern matching, even as that language continues to shift. Powering the system with an LLM offers an avenue for continuous and potential open development, which supports ongoing drug surveillance even in the absence of some traditional sources of data (e.g., DAWN).Qualities of this system carry additional benefits across public health practice. At the population level, researchers may be able to identify new and emerging drug slang prior to mass clinical or media attention. At the community level, researchers, clinicians, and outreach workers may be able to glean region-specific slang and lay-language information about contemporary drug use independent of static inventories that may be outdated. Finally, at the individual level, the systems described herein can be further leveraged to construct chatbots to support recovery efforts. In effect, these chatbots would be designed to converse with people in recovery in language that most likely resonates with their specific situation.ConclusionExisting surveillance systems have long lag times even when support for these systems is strong, which is not a given. Dynamic solutions have the potential to expedite trend detection in a sustainable manner. These systems could support actionable science capable of addressing drug use digital environments and informing new intervention strategies. Without adaptive, open surveillance systems, it is plausible that emerging drug trends will continue to be detected only after clinical harm occurs. Off-the-shelf LLMs offer a step in the right direction. But without refinement, LLMs’ performance in detection of evolving, coded drug referents may be sufficiently inadequate as to be counterproductive in an increasingly interconnected digital world.Data availabilityNo datasets were generated or analysed during the current study.ReferencesGarnett M. F. Drug Overdose Deaths in the United States, 2003–2023. 2024;.CDC. CDC Reports Nearly 24% Decline in U.S. Drug Overdose Deaths. CDC Newsroom. February 25, 2025. Accessed July 17, 2026. https://www.cdc.gov/media/releases/2025/2025-cdc-reports-decline-in-us-drug-overdose-deaths.htmlSubstance Abuse and Mental Health Services Administration. 2024 Drug Abuse Warning Network (DAWN) National Annual Estimates | CBHSQ Data. Accessed March 11, 2026. https://www.samhsa.gov/data/data-we-collect/dawn-drug-abuse-warning-network/annual-releases/2024National Drug Early Warning System. Novel Surveillance» National Drug Early Warning System (NDEWS). 2025. Accessed March 11, 2026. https://ndews.org/novel-surveillance/Idahor, C. O. et al. Infectious disease surveillance in the era of big data and AI: opportunities and pitfalls. Cureus 17, e93929. https://doi.org/10.7759/cureus.93929 (2025).Article  PubMed  PubMed Central  Google Scholar Nagem Lopes L. P., Ramos-Silva A., Gallo de Castro A., Corrêa de Matos G. Potential utility of social media in pharmacovigilance to identify adverse events and safety signals: a scoping review. Res Soc Adm Pharm. Published online February 16, 2026. https://doi.org/10.1016/j.sapharm.2026.02.003Valdez, D. & Patterson, M. S. Computational analyses identify addiction help-seeking behaviors on the social networking website Reddit: Insights into online social interactions and addiction support communities. PLoS Digit Health 1, e0000143, https://doi.org/10.1371/journal.pdig.0000143 (2022).Article  PubMed  PubMed Central  Google Scholar Rao, V. K. et al. Digital epidemiology of prescription drug references on X (Formerly Twitter): neural network topic modeling and sentiment analysis. J. Med Internet Res. 26, e57885, https://doi.org/10.2196/57885 (2024).Article  PubMed  PubMed Central  Google Scholar Durbhakula D. S. The Opioid Crisis We’re Not Measuring. TIME. November 19, 2025. Accessed March 11, 2026. https://time.com/7334846/hidden-opioid-crisis-nitazenes-testing-gap/Maity, S. & Saikia, M. J. Large language models in healthcare and medical applications: a review. Bioengineering 12, 631, https://doi.org/10.3390/bioengineering12060631 (2025).Article  PubMed  PubMed Central  Google Scholar Yang, R. et al. Large language models in health care: development, applications, and challenges. Health Care Sci. 2, 255–263, https://doi.org/10.1002/hcs2.61 (2023).Article  PubMed  PubMed Central  Google Scholar Kazemi, D. M., Borsari, B., Levine, M. J. & Dooley, B. Systematic review of surveillance by social media platforms for illicit drug use. J. Public Health 39, 763–776, https://doi.org/10.1093/pubmed/fdx020 (2017).Article  Google Scholar Fuller, A., Vasek, M., Mariconti, E. & Johnson, S. D. Understanding and preventing the advertisement and sale of illicit drugs to young people through social media: A multidisciplinary scoping review. Drug Alcohol Rev. 43, 56–74, https://doi.org/10.1111/dar.13716 (2024).Article  PubMed  Google Scholar Fuller, A., Vasek, M., Mariconti, E. & Johnson, S. D. Platforms, risk perceptions, and reporting: the impact of illicit drug advertisements on social media among UK secondary students. Harm Reduct. J. 22, 154. https://doi.org/10.1186/s12954-025-01299-5 (2025).Article  PubMed  PubMed Central  Google Scholar Parker, M. A., Valdez, D., Rao, V. K., Eddens, K. S. & Agley, J. Results and methodological implications of the digital epidemiology of prescription drug references among twitter users: latent dirichlet allocation (LDA) analyses. J. Med Internet Res. 25, e48405, https://doi.org/10.2196/48405 (2023).Article  PubMed  PubMed Central  Google Scholar National Institute on Drug Abuse (NIDA). Drugs A to Z | National Institute on Drug Abuse (NIDA). 2026. Accessed March 11, 2026. https://nida.nih.gov/research-topics/drugs-a-to-zDrug Enforcement Administration (DEA). Drug Slang Code Words. 2017. Accessed March 11, 2026. https://www.dea.gov/documents/2017/2017-05/2017-05-01/drug-slang-code-wordsOrellana, D. & Mandrick, W. The ontology of systems engineering: towards a computational digital engineering semantic framework. Procedia Comput Sci. 153, 268–276, https://doi.org/10.1016/j.procs.2019.05.079 (2019).Article  Google Scholar Horrocks I. OWL: A Description Logic Based Ontology Language. In: van Beek P., ed. Principles and Practice of Constraint Programming—CP 2005. Springer; 2005:5-8. https://doi.org/10.1007/11564751_2Amugongo, L. M., Mascheroni, P., Brooks, S., Doering, S. & Seidel, J. Retrieval augmented generation for large language models in healthcare: a systematic review. PLOS Digit Health 4, e0000877, https://doi.org/10.1371/journal.pdig.0000877 (2025).Article  PubMed  PubMed Central  Google Scholar Dehal R. S., Sharma M., Rajabi E. Knowledge Graphs and Their Reciprocal Relationship with Large Language Models. Mach Learn Knowl Extr. 2025;7. https://doi.org/10.3390/make7020038Resnik, D. B. & Hosseini, M. The ethics of using artificial intelligence in scientific research: new guidance needed for a new tool. AI Ethics 5, 1499–1521, https://doi.org/10.1007/s43681-024-00493-8 (2025).Article  PubMed  Google Scholar Hamed, A. A. & Rocha, L. M. Protocol for evaluating ChatGPT in biomedical association generation and verification using a RAG-enabled, cross-model majority voting workflow. STAR Protoc. 7, 104533. https://doi.org/10.1016/j.xpro.2026.104533 (2026).Article  PubMed  PubMed Central  Google Scholar Brunyé, T. T. Human evaluation of large language models: a review and protocol selection framework. AI 7, 174, https://doi.org/10.3390/ai7050174 (2026).Article  Google Scholar Gao, Y. et al. Leveraging medical knowledge graphs into large language models for diagnosis prediction: design and application study. JMIR AI 4, e58670, https://doi.org/10.2196/58670 (2025).Article  PubMed  PubMed Central  Google Scholar Zelin, C., Chung, W. K., Jeanne, M., Zhang, G. & Weng, C. Rare disease diagnosis using knowledge guided retrieval augmentation for ChatGPT. J. Biomed. Inf. 157, 104702. https://doi.org/10.1016/j.jbi.2024.104702 (2024).Article  Google Scholar Pan, S. et al. Unifying large language models and knowledge graphs: a roadmap. IEEE Trans. Knowl. Data Eng. 36, 3580–3599, https://doi.org/10.1109/TKDE.2024.3352100 (2024).Article  Google Scholar Download referencesAcknowledgementsThis editorial was not supported by an external funding source. We also acknowledge that no data or underlying source code was used for this conceptual perspective paper.Author informationAuthors and AffiliationsDept. of Applied Health Science, Indiana University School of Public Health, Bloomington, IN, USADanny Valdez, Xue-Jing Liu & Jon AgleyDept. of Linguistics, Indiana University, Bloomington, IN, USADamir CavarDept. of Epidemiology and Biostatistics, Indiana University School of Public Health, Bloomington, IN, USAMaria A. ParkerAuthorsDanny ValdezView author publicationsSearch author on:PubMed Google ScholarDamir CavarView author publicationsSearch author on:PubMed Google ScholarMaria A. ParkerView author publicationsSearch author on:PubMed Google ScholarXue-Jing LiuView author publicationsSearch author on:PubMed Google ScholarJon AgleyView author publicationsSearch author on:PubMed Google ScholarContributionsD.V. Conceptualization, Manuscript main text writing D.C. Conceptualization, Methodological Evaluation M.A.P. Manuscript Editing and Refinement X.J.L. Diagram Visualization, Manuscript Editing J.A. Manuscript Writing, Manuscript EditingCorresponding authorCorrespondence to Danny Valdez.Ethics declarationsCompeting interestsThe authors declare no competing interests.Additional informationPublisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.Rights and permissionsOpen Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.Reprints and permissionsAbout this article