{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,9]],"date-time":"2026-04-09T04:53:07Z","timestamp":1775710387757,"version":"3.50.1"},"reference-count":38,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2026,4,7]],"date-time":"2026-04-07T00:00:00Z","timestamp":1775520000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Information"],"abstract":"<jats:p>Adverse drug reaction (ADR) detection is essential for ensuring drug safety and effective pharmacovigilance. The rapid growth of users\u2019 medication reviews posted on social media has introduced a valuable new data source for ADR detection. However, the large scale and high noise inherent in social media text pose substantial challenges to existing detection methods. Although large language models (LLMs) exhibit strong robustness to noisy and interfering information, they are often limited by issues such as stochastic outputs and hallucinations. To address these challenges, this paper proposes two generative detection frameworks based on Chain of Thought (CoT), namely LLaMA-DetectionADR for Supervised Fine-Tuning (SFT) and DetectionADRGPT for low-resource in-context learning. LLaMA-DetectionADR automatically generates CoT reasoning sequences to construct an instruction tuning dataset, which is then used to fine-tune the LLaMA3-8B model via Quantized Low-Rank Adaptation (QLoRA). In contrast, DetectionADRGPT leverages clustering algorithms to select representative unlabeled samples and enhances in-context learning by incorporating CoT reasoning paths together with their corresponding labels. Experimental results on the Twitter and CADEC social media datasets show that LLaMA-DetectionADR achieves excellent performance, with F1 scores of 92.67% and 86.13%, respectively. Meanwhile, DetectionADRGPT obtains competitive F1 scores of 87.29% and 82.80% with only a few labeled examples, approaching the performance of fully supervised advanced models. The overall results demonstrate the effectiveness and practical value of the proposed CoT-based generative frameworks for ADR detection from social media.<\/jats:p>","DOI":"10.3390\/info17040352","type":"journal-article","created":{"date-parts":[[2026,4,7]],"date-time":"2026-04-07T14:00:31Z","timestamp":1775570431000},"page":"352","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Adverse Drug Reaction Detection on Social Media Based on Large Language Models"],"prefix":"10.3390","volume":"17","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-0161-3932","authenticated-orcid":false,"given":"Hao","family":"Li","sequence":"first","affiliation":[{"name":"School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0872-7688","authenticated-orcid":false,"given":"Hongfei","family":"Lin","sequence":"additional","affiliation":[{"name":"School of Computer Science and Technology, Dalian University of Technology, Dalian 116024, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2026,4,7]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"401","DOI":"10.1111\/j.1365-2125.1994.tb05705.x","article-title":"International conference on harmonisation of technical requirements for registration of pharmaceuticals for human use (ICH)","volume":"37","author":"Baber","year":"1994","journal-title":"Br. J. Clin. Pharmacol."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"103460","DOI":"10.1016\/j.mex.2025.103460","article-title":"AI-Driven Pharmacovigilance: Enhancing Adverse Drug Reaction Detection with Deep Learning and NLP","volume":"15","author":"Khemani","year":"2025","journal-title":"MethodsX"},{"key":"ref_3","first-page":"1363","article-title":"The Role of Artificial Intelligence in Adverse Drug Reaction Monitoring: Current Status and Challenges","volume":"16","author":"Wei","year":"2025","journal-title":"Med. J. Peking Union Med. Coll. Hosp."},{"key":"ref_4","unstructured":"Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F.L., Almeida, D., Altenschmidt, J., Altman, S., and Anadkat, S. (2023). Gpt-4 technical report. arXiv."},{"key":"ref_5","unstructured":"Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozi\u00e8re, B., Goyal, N., Hambro, E., and Azhar, F. (2023). Llama: Open and efficient foundation language models. arXiv."},{"key":"ref_6","first-page":"22199","article-title":"Large language models are zero-shot reasoners","volume":"35","author":"Kojima","year":"2022","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Hsu, D., Moh, M., Moh, T.S., and Moh, D. (2021). Drug side effect frequency mining over a large twitter dataset using apache spark. Handbook of Artificial Intelligence in Biomedical Engineering, Apple Academic Press.","DOI":"10.1201\/9781003045564-11"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"321","DOI":"10.1007\/s40264-024-01505-6","article-title":"Leveraging natural language processing and machine learning methods for adverse drug event detection in electronic health\/medical records: A scoping review","volume":"48","author":"Golder","year":"2025","journal-title":"Drug Saf."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Murphy, R.M., Klopotowska, J.E., de Keizer, N.F., Jager, K.J., Leopold, J.H., Dongelmans, D.A., Abu-Hanna, A., and Schut, M.C. (2023). Adverse drug event detection using natural language processing: A scoping review of supervised learning methods. PLoS ONE, 18.","DOI":"10.1371\/journal.pone.0279842"},{"key":"ref_10","doi-asserted-by":"crossref","first-page":"MSB200998","DOI":"10.1038\/msb.2009.98","article-title":"A side effect resource to capture phenotypic effects of drugs","volume":"6","author":"Kuhn","year":"2010","journal-title":"Mol. Syst. Biol."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"90","DOI":"10.1145\/772862.772874","article-title":"Rule-based extraction of experimental evidence in the biomedical domain: The KDD Cup 2002 (task 1)","volume":"4","author":"Regev","year":"2002","journal-title":"ACM Sigkdd Explor. Newsl."},{"key":"ref_12","unstructured":"Rastegar-Mojarad, M., Elayavilli, R.K., Yu, Y., and Liu, H. (2016, January 4\u20138). Detecting signals in noisy data-can ensemble classifiers help identify adverse drug reaction in tweets. Proceedings of the Social Media Mining Shared Task Workshop at the Pacific Symposium on Biocomputing, Kohala Coast, HI, USA."},{"key":"ref_13","doi-asserted-by":"crossref","first-page":"62","DOI":"10.1016\/j.artmed.2016.05.004","article-title":"An ensemble method for extracting adverse drug events from social media","volume":"70","author":"Liu","year":"2016","journal-title":"Artif. Intell. Med."},{"key":"ref_14","first-page":"1","article-title":"Mining adverse drug reaction signals from social media: Going beyond extraction","volume":"2014","author":"Patki","year":"2014","journal-title":"Proc. Biolinksig"},{"key":"ref_15","unstructured":"Yang, M., Wang, X., and Kiang, M.Y. (2013, January 18\u201322). Identification of Consumer Adverse Drug Reaction Messages on Social Media. Proceedings of the Pacific Asia Conference on Information Systems (PACIS), Jeju Island, Republic of Korea. Available online: https:\/\/aisel.aisnet.org\/pacis2013\/193."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Kim, Y. (2014, January 26\u201328). Convolutional Neural Networks for Sentence Classification. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar.","DOI":"10.3115\/v1\/D14-1181"},{"key":"ref_17","first-page":"649","article-title":"Character-level convolutional networks for text classification","volume":"28","author":"Zhang","year":"2015","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_18","unstructured":"Huynh, T., He, Y., Willis, A., and Rueger, S. (2016). Adverse Drug Reaction Classification With Deep Neural Networks. Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, The COLING 2016 Organizing Committee."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Alimova, I., and Solovyev, V. (2018). Interactive attention network for adverse drug reaction classification. Proceedings of the Conference on Artificial Intelligence and Natural Language, Springer.","DOI":"10.1007\/978-3-030-01204-5_18"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Wu, C., Wu, F., Liu, J., Wu, S., Huang, Y., and Xie, X. (2018). Detecting tweets mentioning drug name and adverse drug reaction with hierarchical tweet representation and multi-head self-attention. Proceedings of the 2018 EMNLP Workshop SMM4H: The 3rd Social Media Mining for Health Applications Workshop & Shared Task, Association for Computational Linguistics.","DOI":"10.18653\/v1\/W18-5909"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"103896","DOI":"10.1016\/j.jbi.2021.103896","article-title":"Adversarial neural network with sentiment-aware attention for detecting adverse drug reactions","volume":"123","author":"Zhang","year":"2021","journal-title":"J. Biomed. Inform."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Sun, C., Qiu, X., Xu, Y., and Huang, X. (2019). How to fine-tune bert for text classification?. Proceedings of the China National Conference on Chinese Computational Linguistics, Springer.","DOI":"10.1007\/978-3-030-32381-3_16"},{"key":"ref_23","doi-asserted-by":"crossref","unstructured":"Qiu, Y., Zhang, X., Wang, W., Zhang, T., Xu, B., and Lin, H. (2023). Kesdt: Knowledge enhanced shallow and deep transformer for detecting adverse drug reactions. Proceedings of the CCF International Conference on Natural Language Processing and Chinese Computing, Springer.","DOI":"10.1007\/978-3-031-44696-2_47"},{"key":"ref_24","first-page":"148","article-title":"Multi-Feature Enhanced Adverse Drug Reaction Detection for Social Media","volume":"39","author":"Li","year":"2025","journal-title":"J. Chin. Inf. Process."},{"key":"ref_25","unstructured":"Bai, J., Bai, S., Chu, Y., Cui, Z., Dang, K., Deng, X., Fan, Y., Ge, W., Han, Y., and Huang, F. (2023). Qwen technical report. arXiv."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"1865","DOI":"10.1093\/jamia\/ocae037","article-title":"Taiyi: A bilingual fine-tuned large language model for diverse biomedical tasks","volume":"31","author":"Luo","year":"2024","journal-title":"J. Am. Med. Inform. Assoc."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Zitu, M.M., Owen, D., Manne, A., Wei, P., and Li, L. (2025). Large Language Models for Adverse Drug Events: A Clinical Perspective. J. Clin. Med., 14.","DOI":"10.3390\/jcm14155490"},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Fu, W., Lin, H., Xu, G., Qiu, Y., Wang, J., Diao, Y., and Zheng, P. (2024). Data Augmentation and Instruction Fine-Tuning for ADR Detection. Proceedings of the China Health Information Processing Conference, Springer.","DOI":"10.1007\/978-981-96-3752-2_1"},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"10088","DOI":"10.52202\/075280-0441","article-title":"Qlora: Efficient finetuning of quantized llms","volume":"36","author":"Dettmers","year":"2023","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Shum, K., Diao, S., and Zhang, T. (2023). Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled Data. Proceedings of the Findings of the Association for Computational Linguistics: EMNLP 2023, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2023.findings-emnlp.811"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Reimers, N., and Gurevych, I. (2019). Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Association for Computational Linguistics.","DOI":"10.18653\/v1\/D19-1410"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"73","DOI":"10.1016\/j.jbi.2015.03.010","article-title":"Cadec: A corpus of adverse drug event annotations","volume":"55","author":"Karimi","year":"2015","journal-title":"J. Biomed. Inform."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"e6396","DOI":"10.2196\/publichealth.6396","article-title":"TwiMed: Twitter and PubMed comparable corpus of drugs, diseases, symptoms, and their relations","volume":"3","author":"Alvaro","year":"2017","journal-title":"JMIR Public Health Surveill."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"103431","DOI":"10.1016\/j.jbi.2020.103431","article-title":"Exploiting adversarial transfer learning for adverse drug reaction detection from texts","volume":"106","author":"Li","year":"2020","journal-title":"J. Biomed. Inform."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Gao, Y., Ji, S., Zhang, T., Tiwari, P., and Marttinen, P. (2022). Contextualized graph embeddings for adverse drug event detection. Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Springer.","DOI":"10.1007\/978-3-031-26390-3_35"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Gao, Y., Ji, S., and Marttinen, P. (2024). Knowledge-augmented graph neural networks with concept-aware attention for adverse drug event detection. Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), ELRA and ICCL.","DOI":"10.63317\/4nkueto75a6m"},{"key":"ref_37","unstructured":"Liu, A., Feng, B., Xue, B., Wang, B., Wu, B., Lu, C., Zhao, C., Deng, C., Zhang, C., and Ruan, C. (2024). Deepseek-v3 technical report. arXiv."},{"key":"ref_38","unstructured":"Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Yang, A., and Fan, A. (2024). The llama 3 herd of models. arXiv."}],"container-title":["Information"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2078-2489\/17\/4\/352\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,4,9]],"date-time":"2026-04-09T04:26:50Z","timestamp":1775708810000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2078-2489\/17\/4\/352"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,4,7]]},"references-count":38,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2026,4]]}},"alternative-id":["info17040352"],"URL":"https:\/\/doi.org\/10.3390\/info17040352","relation":{},"ISSN":["2078-2489"],"issn-type":[{"value":"2078-2489","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,4,7]]}}}