Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 May 3:25:e44870.
doi: 10.2196/44870.

Transferability Based on Drug Structure Similarity in the Automatic Classification of Noncompliant Drug Use on Social Media: Natural Language Processing Approach

Affiliations

Transferability Based on Drug Structure Similarity in the Automatic Classification of Noncompliant Drug Use on Social Media: Natural Language Processing Approach

Tomohiro Nishiyama et al. J Med Internet Res. .

Abstract

Background: Medication noncompliance is a critical issue because of the increased number of drugs sold on the web. Web-based drug distribution is difficult to control, causing problems such as drug noncompliance and abuse. The existing medication compliance surveys lack completeness because it is impossible to cover patients who do not go to the hospital or provide accurate information to their doctors, so a social media-based approach is being explored to collect information about drug use. Social media data, which includes information on drug usage by users, can be used to detect drug abuse and medication compliance in patients.

Objective: This study aimed to assess how the structural similarity of drugs affects the efficiency of machine learning models for text classification of drug noncompliance.

Methods: This study analyzed 22,022 tweets about 20 different drugs. The tweets were labeled as either noncompliant use or mention, noncompliant sales, general use, or general mention. The study compares 2 methods for training machine learning models for text classification: single-sub-corpus transfer learning, in which a model is trained on tweets about a single drug and then tested on tweets about other drugs, and multi-sub-corpus incremental learning, in which models are trained on tweets about drugs in order of their structural similarity. The performance of a machine learning model trained on a single subcorpus (a data set of tweets about a specific category of drugs) was compared to the performance of a model trained on multiple subcorpora (data sets of tweets about multiple categories of drugs).

Results: The results showed that the performance of the model trained on a single subcorpus varied depending on the specific drug used for training. The Tanimoto similarity (a measure of the structural similarity between compounds) was weakly correlated with the classification results. The model trained by transfer learning a corpus of drugs with close structural similarity performed better than the model trained by randomly adding a subcorpus when the number of subcorpora was small.

Conclusions: The results suggest that structural similarity improves the classification performance of messages about unknown drugs if the drugs in the training corpus are few. On the other hand, this indicates that there is little need to consider the influence of the Tanimoto structural similarity if a sufficient variety of drugs are ensured.

Keywords: data mining; machine learning; medication noncompliance; natural language processing; pharmacovigilance; text classification; transfer learning.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: None declared.

Figures

Figure 1
Figure 1
Our approach, transfer learning based on chemical structures, assumes similarly structured corpora are transferable.
Figure 2
Figure 2
Value of F1 score for transfer learning.
Figure 3
Figure 3
The Tanimoto similarity between each drug.
Figure 4
Figure 4
Relationship between the Tanimoto similarity and F1 value for each drug.
Figure 5
Figure 5
Comparison of the accuracy of the 2 models. Sim is a model transfer learned from a data set of drugs with close similarity; Rnd is a model transfer learned from a data set of randomly selected drugs.
Figure 6
Figure 6
The Tanimoto similarity and F1 score pairs for each drug. OTC-rel type contains an over-the-counter (OTC) drug in one of the pairs; antipsycho type is a combination of antipsychotic medications such as sleeping pills, anxiolytics, and antischizophrenics; and other type is any other combination.).
Figure 7
Figure 7
Comparison of the results of transfer learning for drugs with similar structure and drugs with similar indications.
Figure 8
Figure 8
Scatterplot showing the relationship between the number of tweets and F1 value for each drug. G-m: general mention; G-u: general use; NC-s: noncompliant sales; NC-u/m: noncompliant use or mention.

Similar articles

Cited by

References

    1. Miller TA. Health literacy and adherence to medical treatment in chronic and acute illness: a meta-analysis. Patient Educ Couns. 2016;99(7):1079–1086. doi: 10.1016/j.pec.2016.01.020. https://europepmc.org/abstract/MED/26899632 S0738-3991(16)30041-6 - DOI - PMC - PubMed
    1. Long CS, Kumaran H, Goh KW, Bakrin FS, Ming LC, Rehman IU, Dhaliwal JS, Hadi MA, Sim YW, Tan CS. Online pharmacies selling prescription drugs: systematic review. Pharmacy. 2022;10(2):42. doi: 10.3390/pharmacy10020042. https://www.mdpi.com/resolver?pii=pharmacy10020042 pharmacy10020042 - DOI - PMC - PubMed
    1. Onishi T, Weissenbacher D, Klein A, O’Connor K, Gonzalez-Hernandez G. Dealing with medication non-adherence expressions in Twitter. Proceedings of the 2018 EMNLP Workshop SMM4H; The 3rd Social Media Mining for Health Applications Workshop & Shared Task; October 31, 2018; Brussels, Belgium. Association for Computational Linguistics; 2018. pp. 32–33. - DOI
    1. Bhattacharya M, Snyder S, Malin M, Truffa MM, Marinic S, Engelmann R, Raheja RR. Using social media data in routine pharmacovigilance: a pilot study to identify safety signals and patient perspectives. Pharm Med. 2017;31(3):167–174. doi: 10.1007/s40290-017-0186-6. - DOI
    1. Xie J, Zeng D, Liu X, Fang X. Understanding reasons for medication nonadherence: an exploration in social media using sentiment-enriched deep learning approach. Proceedings of the International Conference on Information Systems - Transforming Society with Digital Innovation; 38th ICIS 2017; December 10-13, 2017; Seoul, South Korea. Association for Information Systems; 2017. - DOI

Publication types