<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ali Usman on Medium]]></title>
        <description><![CDATA[Stories by Ali Usman on Medium]]></description>
        <link>https://medium.com/@ali.muhammad.usman08?source=rss-a8c6b246c419------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_Vw3bakYC83V3Kv8</url>
            <title>Stories by Ali Usman on Medium</title>
            <link>https://medium.com/@ali.muhammad.usman08?source=rss-a8c6b246c419------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:55:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ali.muhammad.usman08/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How AI will Revolutionize the Process of Clinical Trials]]></title>
            <link>https://medium.com/@ali.muhammad.usman08/how-ai-will-revolutionize-the-process-of-clinical-trials-332e73434b8d?source=rss-a8c6b246c419------2</link>
            <guid isPermaLink="false">https://medium.com/p/332e73434b8d</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[clinical-trials]]></category>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ali Usman]]></dc:creator>
            <pubDate>Sun, 31 Dec 2023 01:16:57 GMT</pubDate>
            <atom:updated>2023-12-31T02:04:19.189Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*am4aMfRmTMGFKFm2" /><figcaption>Photo by <a href="https://unsplash.com/@cdc?utm_source=medium&amp;utm_medium=referral">CDC</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>How AI Will Revolutionize the Process of Clinical Trials</h3><p>In this article, I will be creating three machine learning models for clinical trials that are able to predict whether a clinical trial will succeed or fail. The three machine learning models will predict clinical trial outcomes, assess patient mortality to help with trial enrollment by mitigating patient risks, and improve trial design through trial similarity searching!</p><p>One of the most promising drugs ever tested was Entresto in 2019 for heart failure. Heart failure accounted for 700,000 deaths and was the leading cause of death in the United States. Entresto had the potential to save hundreds of thousands of lives and was projected to reach a <strong>peak sale of 5-billion dollars</strong>. However, in phase III clinical trial testing with 4,822 patients <strong>Entresto failed </strong>and didn’t reduce cardiovascular death. The clinical trial of Entresto lasted for<strong> 5 years</strong> (2014–2019) and <strong>costed $200 million</strong>. The outcome of the Entresto trial highlighted major flaws in the clinical trial process.</p><blockquote><strong>What if we could predict the outcome of the Entresto clinical trial before wasting $200 million and 5 years of testing? What if we could optimize clinical trials using AI?</strong></blockquote><p><strong>Table of Contents:</strong></p><ol><li><strong>What are Clinical Trials</strong></li><li><strong>PyTrial — Machine Learning for Clinical Trial Applications</strong></li><li><strong>Clinical Trial Outcome Prediction</strong></li><li><strong>Patient Outcome Prediction</strong></li><li><strong>Trial Similarity Searching</strong></li><li><strong>The Future of Clinical Trials is AI</strong></li></ol><h3>What are Clinical Trials?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*CsfpmgZ5m7Y3LHBm.png" /><figcaption>Four different phases of clinical trials. Photo from <a href="https://lustgarten.org/clinical-trial-phases/">Lustgarten Foundation</a>.</figcaption></figure><p>In drug development, clinical trials test a drug candidate or treatment on patients. Clinical trials help to determine a drug’s safety and efficacy through four phases. A new drug must pass through phases I, II, and III before receiving FDA approval. Phase IV trials are conducted after FDA approval to monitor the drug’s safety and effectiveness.</p><h4><strong>In a nutshell the four phases of a clinical trial are:</strong></h4><p><strong>Phase I: </strong>Phase I involves around <strong>20 to 100 patients </strong>to test out the drug. Phase I can take several months and tells us valuable information about what a drug’s safety or dose should be. Around <strong>70% of drugs make it past to the next phase</strong>.</p><p><strong>Phase II: </strong>Phase II can take around several months to 2 years to test a drug’s efficacy and side effects. Phase II can involved <strong>several hundred patients,</strong> and <strong>only 33% of drugs make it to the next phase</strong>.</p><p><strong>Phase III:</strong> Phase III tests for a drug’s efficacy and monitors any adverse reactions. <strong>300 to 3,000 patients</strong> test out the drug candidate over the course of 1 to 4 years, with only<strong> 25–33% of drugs moving to the next phase</strong>.</p><p><strong>Phase IV: </strong>Phase IV comes after FDA approval and is used to monitor the drug’s safety and efficacy.</p><p>The estimated cost for pivotal clinical trials came out to be <strong>$48 million</strong> dollars with an interquartile range <strong>(IQR) of $20 million to $102 million</strong>. In a 2014 study by Tufts, researchers estimated the average cost of a Phase III trial to be <strong>$225 million</strong>. With $225 million you could <strong>buy 450 houses or 32 Superbowl Ads</strong>!</p><blockquote><strong>Why does it matter how much money we spend when we are creating these life-saving drugs?</strong></blockquote><p>While creating life-saving drugs is a great use of resources, the hard truth is that <strong>only 10% of drugs pass clinical trials</strong> meaning <strong>90% of drugs fail </strong>in the clinical trial stage. A massive amount of money, time, and resources are funneled into clinical trials that produce <strong>NO significant results.</strong> There has to be a better way to optimize clinical trial. To figure out how to change the process of clinical trials, we first need to understand what major problems lead to high costs and unsuccessful results in clinical trials.</p><h3>Major Problems and Solutions for Clinical Trials</h3><p><strong>Clinical Trial Outcomes: </strong>As mentioned before<strong> 90% of clinical trials fail</strong>. This is due to many reasons such as the lack of a drug’s efficacy, poor-drug like properties, and poor trial design. Imagine how much money and time could be saved if we simulated the results of a clinical trial before they even happened. We would be able to know whether a clinical trial would succeed or fail. Well, with AI this is no longer a dream. An AI model could look at the target disease, drug-candidate, eligibility criteria for patient recruitment, and other trial design consideration to give an output of whether the clinical trial would fail or succeed. By <strong>implementing AI to predict clinical trial outcomes</strong>, we could<strong> save $48 million </strong>per pivotal clinical trial by <strong>eliminating all failed clinical trials</strong>!</p><p><strong>Patient Outcome Prediction: </strong>Clinical trials involve thousands of patients recruited to test out the drug candidate. It costs <strong>$41,100</strong> just to work with one patient in a clinical trials and with <strong>30% of patients dropping out</strong> the costs for clinical trials can become astronomical. Implementing AI to predict a patient’s reaction to treatment would be extremely beneficial for clinical trials. Patient outcome predictions would improve trial enrollment, help to develop personalized treatment plans to reduce the risk of giving harmful treatments to patients, and help with patient selection. For example, if a patient is predicted to have an adverse reaction to a treatment or drug it is safer to not recruit the patient at all.</p><p><strong>Trial Similarity Search: </strong>In many cases a trial’s design and planning phase can be crucial to a clinical trial’s success. AI can be used to output a similarity score between a current trial and a trial that has already been completed. Using AI to refer back to prior trials has many benefits and can provide references points in trial design such as eligibility criteria, sample size and controls. Scientists can enhance the likelihood of success in a current trial by studying the designs of previous trials. This process is like learning valuable insights from the errors and successes of others, to ensure the success of a clinical trial.</p><h3>PyTrial — Machine Learning for Clinical Trial Applications</h3><p><a href="https://github.com/RyanWangZf/PyTrial"><strong>PyTrial is a Python library</strong></a> with great documentation on implementing machine learning (ML) in clinical trials. I’m grateful to have used their library and documentation to create my project. Go check out their <a href="https://arxiv.org/abs/2306.04018">research paper</a> for more information!</p><p>Here was my process of building machine learning models to tackle three major problem with clinical trials which was clinical trial outcome prediction, patient outcome prediction, and trial similarity searching!</p><h3><strong>1. Clinical Trial Outcome Prediction</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*ANbuQSFryze-OXux_X9w4A.png" /><figcaption>Clinical Trial Outcome Prediction. Photo from <a href="https://arxiv.org/pdf/2306.04018.pdf">PyTrial Research Paper</a>.</figcaption></figure><p>As mentioned before <strong>90% of clinical trials fail</strong> and by predicting whether a trial will succeed or not <strong>millions of dollars could be saved</strong>, so here’s how I made the ML model that can predict the outcome of clinical trials.</p><h4>Cell 1: Importing Clinical Trial Outcome Data</h4><pre>#Load Demo Data<br>from pytrial.data.demo_data import load_trial_outcome_data<br>from pytrial.data.trial_data import TrialOutcomeDatasetBase</pre><p>The PyTrial library importsloads_trial_outcome_datawhich loads all the trial outcome prediction (TOP) data. TOP data has the 3 distinct phases of clinical trials and contains vast amounts of data involving different trials, treatments/drug candidates, conditions/diseases, and features which are target pathways for the drug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*Y_Ff7Qh-ZRwXXtUArhaYyg.png" /><figcaption>TOP Datasets for each phase. Photo from <a href="https://arxiv.org/pdf/2306.04018.pdf?">Pytrial research paper</a>.</figcaption></figure><p>Next, the PyTrial library imports TrialOutcomeDatasetBase which uses Pandas, a data analysis library, to handle all the data. This means that the TrialOutcomeDatasetBasehandles all the input data for our machine learning model. The function will trim down on all the data and just use the necessary parts for the ML model.</p><h4>Cell 2: Splitting the Data</h4><pre>df_train = load_trial_outcome_data(phase=&#39;I&#39;, split=&#39;train&#39;)[&#39;data&#39;]<br>df_val = load_trial_outcome_data(phase=&#39;I&#39;, split=&#39;valid&#39;)[&#39;data&#39;]<br>df_test = load_trial_outcome_data(phase=&#39;I&#39;, split=&#39;test&#39;)[&#39;data&#39;]<br><br>train_data = TrialOutcomeDatasetBase(df_train)<br>valid_data = TrialOutcomeDatasetBase(df_val)<br>test_data = TrialOutcomeDatasetBase(df_test)</pre><p>This first line imports load_trial_outcome_datato collect all the data for phase I and issues the data for training in the df_trainvariable. A similar process is used to bring up all the data for validation and testing. For validation the variabledf_valstores all the data and the df_testvariable has all the data for testing.</p><p>Next, a new variable train_datais created to store all the input data for the ML model. df_traincontains all the data for phase I training and we use TrialOutcomeDatasetBaseto manipulate the data and create the input data. The same process is used to to create the valid_data and test_data variables which have all the validation and testing data for the ML model.</p><blockquote><strong>So what does the data used to make the model contain?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvguaz-tfjv9NQjM0fLUvA.png" /><figcaption>Input Data used for Phase I of Clinical Trial Outcome Prediction.</figcaption></figure><p>Here are all the different features used in the input data for training, testing, and validation in the ML model:</p><p><strong>NCT ID: </strong>A NCT ID tells us the identification number of a registered clinical trial and can be used to look up basic information about a trial on <a href="https://clinicaltrials.gov/">ClinicalTrials.gov.</a> The NCT ID was used later on in the model’s output to identify the specific trial predicted.</p><p><strong>Status: </strong>A status of each clinical trials is given and each trial is either labelled as completed, active and not recruiting, withdrawn, or terminated.</p><p><strong>Why_stop:</strong> This section of the data provides a brief description (if applicable) of why a trial was either withdrawn or terminated.</p><p><strong>Label: </strong>A label of 1 is given to active and completed trials to indicate the trial’s success or continuation. A label of 0 is given to terminated and withdrawn clinical trials that have failed.</p><p><strong>Phase: </strong>For each trial the phase of the clinical trial is given. In this case, all the phases would be I as the model will be predicting outcome for phase I trials.</p><p><strong>Diseases</strong>: The diseases each clinical trial focuses on is given. The disease is relevant as success rates of clinical trials can be correlated to the specific disease the clinical trials is working to make a treatment for.</p><p><strong>ICD Codes: </strong>ICD codes or<strong> </strong>International Classification of Disease codes are alphanumeric codes that give us information on diseases, symptoms, and severity of a disease or injury. An example of an ICD code is “E10.9” which stands for type 1 diabetes.</p><p><strong>Drugs:</strong> The name of the drug candidate can help to provide more context into the treatment the clinical trial is testing which can help predict the outcome of a clinical trial.</p><p><strong>Smiles: </strong>Simplified Molecular Input Line Entry System (SMILES) is a notation system that represents a chemical structure in text. For example, a simple “C” represents CH4 or methane. SMILES represent the chemical composition of a drug candidate and can provide us information on a drug’s efficacy, structure, and properties of the compound. All this information about a drug candidate can help to predict the outcome of a clinical trial.</p><p><strong>Criteria:</strong> If applicable any information on the criteria of a clinical trial is provided. The criteria of a clinical trial can provide a holistic view on whether a clinical trial had the intended results or not.</p><p><strong>Title:</strong> The title of the clinical trial is provided which can help verify the model’s output of whether the clinical trial failed or succeeded. The title can also provide information on the what the clinical trial is testing.</p><p><strong>Study_first_submitted_data: </strong>This part of the data tells us when the study was first submitted to <a href="https://www.clinicaltrials.gov/">ClinicalTrials.gov</a>. Overall, all these pieces of data provides crucial information on clinical trials and helps with determining whether a clinical trial succeeded or not because the definition of success is different for each clinical trial.</p><h4><strong>Cell 3: Preparing the XGBoost Model</strong></h4><p>Now that all the data is inputted the model must be made and then trained.</p><pre>from pytrial.tasks.trial_outcome import XGBoost<br>model = XGBoost()</pre><p>The PyTrial library imports the XGBoost (eXtreme Gradient Boosting) model for training. The XGBoost model is a tree ensembled method that uses gradient boosting. Now what does this actually mean?</p><blockquote><strong>The XGBoost model combines multiple individual models typically decision trees as base learners and uses gradient boosting to design a more accurate model.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*6bKX8w_Ck2PRFgn9ztowNg.png" /><figcaption>Structure of decision trees. Photo from <a href="https://www.nvidia.com/en-us/glossary/data-science/xgboost/">Nvidia</a>.</figcaption></figure><p>A decision tree is a hierarchical structures that comprises of nodes that represent the input and branches that denote outcomes of different decisions. Each node in a decision tree analyzes a particular subsection of the data with each branch representing possible answers and outcomes. The XGBoost model uses sequential decision making to provide an outcome. Next, the XGBoost model utilizes gradient boosting which iteratively addresses errors made in previous decision trees to create a more effective model. A loss function is calculated for each decision tree so the model can learn from previous mistakes and refine the model with each iteration. The XGBoost model also uses ensemble learning which averages the prediction/output made by all the individual decision tree models to provide a more accurate output. An XGBoost model was chosen as all these features improve accuracy in clinical trial outcome prediction.</p><p>model = XGBoost this line specifies that model is an XGBoost model.</p><h4>Cell 4: Training the Model</h4><pre><br>model.fit(train_data, valid_data)<br><br>#Example of Validation Accuracy showing the first 10 lines in total there were 100 lines<br>[0] validation_0-auc:0.61418<br>[1] validation_0-auc:0.64493<br>[2] validation_0-auc:0.63045<br>[3] validation_0-auc:0.61119<br>[4] validation_0-auc:0.59806<br>[5] validation_0-auc:0.58075<br>[6] validation_0-auc:0.58821<br>[7] validation_0-auc:0.58269<br>[8] validation_0-auc:0.56955<br>[9] validation_0-auc:0.58418<br>[10] validation_0-auc:0.57433<br></pre><p>Now, we use the model.fit function to train the model with the training data and then validate the predictions. During training the model analyzes the training data and learns from the data to make a prediction. The model.fit function optimizes parameters when it trains the model, which leads to higher accuracy. This means that the model goes through the entire dataset, makes predictions, calculates losses, and reiterates parameters in the model. Lastly, the model validates its predictions using valid_data and outputs an accuracy.</p><h4>Cell 5: Predicting Clinical Trial Outcomes</h4><p>Once the model is made we can test the model on clinical trials and see whether the model is accurate or not.</p><pre>prediction = model.predict(test_data)<br>print(prediction[:50])</pre><p>We create a new variable called prediction that gives us an output on the testing data. We use the model.predict function to obtain predictions from the ML model. model.predict first uses the input data for which we wanted predictions for, applies the XGBoost ML model to make predictions, and stores an output for the predictions.</p><p>print(prediction[:50]) this line prints out 50 clinical trials and their predicted values that indicate success and failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXqm4UaknPCNH9prIywbOg.png" /><figcaption>50 Clinical Trial Outcome Predictions</figcaption></figure><p>The predictions all have an NCT ID which specifies what type of clinical trial it was. Next, each predicted clinical trial has a value from 0 to 1. <strong>0 indicates the failure of a clinical trial and 1 indicates the success of a clinical trial.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ks6N-r4ve59_QBnQDKDMoQ.png" /><figcaption>Success Rate of Two Clinical Trials</figcaption></figure><p>In particular, I wanted to focus on clinical trials NCT02000700 and NCT02050815. The model predicted clinical trial<strong> NCT02000700 had close to a 100% success rate</strong> and so would be successful. In contrast,<strong> NCT02050815 had the lowest success rate at only 9%</strong> meaning the trial had a 91% chance of failing. We can also verify our findings on <a href="http://clinicaltrials.gov/">ClinicalTrials.gov </a>and check if the model was right or not in its prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lGKdvSBaPHkQKNtWfANgPw.png" /><figcaption>Completion of Clinical Trial NCT02000700. Photo from <a href="https://clinicaltrials.gov/search?cond=NCT02000700">Clinical Trials.gov</a>.</figcaption></figure><p>The model predicted clinical trial NCT0200700 had a <strong>100% success rate </strong>and the<strong> trial was completed proving the model was correct</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jjP4F5azCGyEzvdpXLm2Q.png" /><figcaption>Termination of Clinical Trial NCT02050815. Photo from <a href="https://clinicaltrials.gov/search?cond=NCT02050815">ClinicalTrials.gov</a>.</figcaption></figure><p>The model only predicted a <strong>9% success rate for NCT02050815 </strong>meaning there was a 91% chance of failure. The <strong>model accurately predicted this low chance of success </strong>as t<strong>he clinical trial was terminated!</strong></p><h3><strong><em>2. Patient Outcome Prediction</em></strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*vp1-de5ZFRAtpu6OLOy97g.png" /><figcaption>Patient Outcome Prediction. Photo from<a href="https://arxiv.org/pdf/2306.04018.pdf"> PyTrial Research Paper</a>.</figcaption></figure><p>In clinical trials, <strong>30% of patients drop out</strong> leading to<strong> massive financial burden</strong>. By implementing AI and ML to <strong>assess a patient’s mortality score</strong> clinical trials can save time, money, and select the right patients to conduct a successful clinical trial. Here’s how ML can be used to predict patient outcomes!</p><h4><strong>Cell 1: Inputting Patient Outcome Data</strong></h4><pre>from pytrial.tasks.indiv_outcome.data import SequencePatient</pre><p>We use the PyTrial library to import SequencePatientwhich contains seven different oncology clinical trials with <strong>thousands of patients of varying conditions</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*JIIp7J2CbHR3-fl5FMPafg.png" /><figcaption>Dataset Imported for Patient Outcome Prediction. Photo from<a href="https://arxiv.org/pdf/2306.04018.pdf?"> PyTrial Research Paper</a>.</figcaption></figure><p>A new variable seqdata is created that stores the new inputted training data coming from the importedSequencePatient dataset.</p><pre># Build the train data<br>seqdata = SequencePatient(<br>    data={&#39;v&#39;:data[&#39;visit&#39;][:-200], &#39;y&#39;:data[&#39;y&#39;][:-200], &#39;x&#39;:data[&#39;feature&#39;][:-200]},<br>    metadata={<br>        &#39;visit&#39;:{&#39;mode&#39;:&#39;dense&#39;, &#39;order&#39;: data[&#39;order&#39;]},<br>        &#39;label&#39;:{&#39;mode&#39;:&#39;tensor&#39;},<br>        &#39;voc&#39;:data[&#39;voc&#39;],<br>        &#39;max_visit&#39;:20,<br>        }<br>    )</pre><p>In Cell 1seqdata which is the training data contains information on patients visits (vist), demographics (feature), order of events in visits (order), information on patient level outcomes (y), and a patient’s medical history (voc).</p><p>vist: vist represents the number of visits each patient had. For example, a visit could be for medical events or check-ups a patient undergoes during the clinical trial.</p><p>feature: feature contains information about the patients in a tabular form. This could include a patient&#39;s demographic data, medical history through electronic records, and gene expression.</p><p>order: order is a variable representing the order of events in a patient’s visit. For instance, a visit could be a diagnosis, medication, treatments or checkups. order looks at the sequence of events in a visit.</p><p>y: yis the target label or the output that the model is trying to predict. For example, in our patient-level outcome prediction model, y would contain the predicted outcomes for each patient, such as the likelihood of developing a certain condition or experiencing a specific event during the clinical trial.</p><p>voc: vocstands for vocabulary and specifies events. It is a term used in ML to map index numbers to the exact names of events which contains the encoded event data either in numerical or categorical values. For example, in clinical trials, the vocvariable might contain the specific names of medical procedures, diagnoses, reports on a patient’s well-being, or reaction to treatments. This allows for the interpretation of the data and predictive analysis.</p><p>All these variables allow us to look deeper into a patient’s history and reaction to treatment to help with patient outcome prediction. Interestingly to note, all the data is considered sequential because the data is arranged in a sequences where the order of data points matter. In sequential data, each data point is dependent on other data points in the sequence. Our data is sequential as the number and order of visits affect other data points.</p><pre>#Build the test data<br>val_seqdata = SequencePatient(<br>    data={&#39;v&#39;:data[&#39;visit&#39;][-200:], &#39;y&#39;:data[&#39;y&#39;][-200:], &#39;x&#39;:data[&#39;feature&#39;][-200:]},<br>    metadata={<br>        &#39;visit&#39;:{&#39;mode&#39;:&#39;dense&#39;, &#39;order&#39;: data[&#39;order&#39;]},<br>        &#39;label&#39;:{&#39;mode&#39;:&#39;tensor&#39;},<br>        &#39;voc&#39;:data[&#39;voc&#39;],<br>        &#39;max_visit&#39;:20,<br>        }<br>    )</pre><p>val_seqdatais the testing data for the ML model <strong>that was created the same way</strong>seqdata was created. First, SequencePatient is loaded to bring up all the data and then the dataset is reformatted to become testing data for the ML model. The new testing data val_seqdata is made with information on patients visits (vist), patient’s demographics such as race or gender(feature), order and sequence of events in visits (order), information on patient level outcomes (y), and a patient’s medical history (voc) to support predictive analysis.</p><h4>Cell 2: Importing the RNN Model</h4><pre>from pytrial.data.patient_data import SeqPatientCollator # function to process the input SequencePatient dataset<br>from pytrial.tasks.indiv_outcome.sequence import RNN</pre><p>With the large amount of input data given we needed a function to process all the data for the model. To process all the data, we use the PyTrial library and import SeqPatientCollator. Next, we import the RNN (recurrent neural network) model as the model type. A RNN model is well-suited to handle sequential data and so was chosen for the patient outcome prediction model. RNN’s have the ability to remember and utilize information from previous time steps and so RNN’s handle sequential data well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*-hDmA_FF8Rqccvw2RzSnyg.png" /><figcaption>RNN’s vs. Feed-Forward Neural Networks. Photo from<a href="https://www.geeksforgeeks.org/introduction-to-recurrent-neural-network/"> GeeksforGeeks</a></figcaption></figure><p>RNN’s differ from traditional feedforward networks in their approach to handling data. Feed-forward neural networks process input data linearly while RNN’s are recursive and can loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*nhHUl_HTtQAviyzFi-FiiQ.png" /><figcaption>Layers in an RNN model with cyclic connections. Photo from <a href="https://www.researchgate.net/figure/Generalized-recurrent-neural-network-architecture-with-two-hidden-layers-The-NN_fig3_335159004">ResearchGate</a>.</figcaption></figure><p>RNN’s also have cyclic connections meaning the model can retain and propagate information through time steps meaning they can go back and forth which is useful for sequential data. Now that we know what RNN’s, let’s see how they trained the patient outcome prediction model!</p><h4>Cell 3: Creating Model Parameter&#39;s</h4><pre>model = RNN(<br>    vocab_size=[len(data[&#39;voc&#39;][o]) for o in data[&#39;order&#39;]], # get the vocab size for each type of events to build the event embedding layer<br>    orders=data[&#39;order&#39;], # similar, we need an order<br>    mode=&#39;binary&#39;,<br>    max_visit=20,<br>    bidirectional=True,<br>    epochs=20,<br>    batch_size=16,<br>    device=&#39;cpu&#39;,<br>)<br>model.fit(train_data=seqdata, valid_data=val_seqdata)</pre><p>We first specify that the model is a RNN with model = RNN, then we go into the specifications of the model. Next, we input the voc function which tells us about the encoded event data that can specify medical procedures, diagnoses, adverse reactions to drugs, and visits for the patients in a clinical trial. The model also looks at other variables in the data such as gene expression, electronic health record’s (EHR), and patient demographics.</p><p>vocab_size=[len(data[&#39;voc][o]) for o in data [&#39;order]] this line gathers the vocabulary size for each type of event in a clinical trial. Events are specific occurrences or instances in the data and they are built into their own event embedding layers in the model.</p><p>orders=data[&#39;order] this line created another embedded layer for the order function which is the sequence of events in a visit.</p><p>mode=binary the RNN model is set to binary because the model’s output will be from 0 to 1 which is the predicted patient mortality rate’s.</p><p>max_visit=20 this line specifies that the model will look at the sequential data with a maximum of 20 visits.</p><p>bidirectional=True this means that the model can process input sequences in both forward and backward directions, allowing the RNN model to capture information from past and future steps simultaneously.</p><p>epochs=20 specifies the amount of epochs trained for. An epoch is when the model trains on the entire dataset and optimizes the algorithm to minimize the loss function for the next epoch.</p><p>batchsize=16 a batch size is the number of training examples utilized in one iteration of the training process. It is a hyperparameter that defines the number of samples that will be propagated through the neural network.</p><p>device=cpu this specifies the model will be trained on a central processing unit (CPU).</p><p>model.fit(train_data=seqdata, valid_data=val_seqdata) trains the model on data withmodel.fit initiating the training of the model. This line also specifies that the train_data is seqdata which is the sequential data made for testing. The same is also the case for valid_data=val_seqdatafor validation. The RNN model is iterative when training and the model always saves the highest accuracy after going through each epoch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*AdVOZvfVJGzayUw48YS8OA.png" /><figcaption>RNN model training thorough 20 epochs.</figcaption></figure><h4>Cell 4: Predicting Patient Outcomes</h4><pre>predict = model.predict(seqdata)<br><br>print(predict[:20])<br><br>#Output:<br>1.[[0.03759647]<br>2.[0.3407742 ]<br>3.[0.08466253]<br>4.[0.04212925]<br>5.[0.07062326]<br>6.[0.61914057]<br>7.[0.11943546]<br>8.[0.28911486]<br>9.[0.03431963]<br>10.[0.1817149 ]<br>11.[0.10272896]<br>12.[0.4975288 ]<br>13.[0.23787639]<br>14.[0.53194153]<br>15.[0.5683119 ]<br>16.[0.42574254]<br>17.[0.05658188]<br>18.[0.10878944]<br>19.[0.01620503]<br>20.[0.54372704]]<br></pre><p>predict = model.predict(seqdata) this line saves all the predictions from seqdata (training data) into the predict variable. print(predict[:20]) prints out 20 predictions for patient mortality rates.</p><blockquote><strong>So what does the output tell us and why is patient outcome predictions important?</strong></blockquote><p>The output is a <strong>binary number ranging from 0 to 1</strong> and tells us how a person will react to drug candidates or treatment given in clinical trials. For example, <strong>Patient 1 has a mortality rate of 0.03 or 3%</strong>, this means that the <strong>patient would be an ideal candidate for the clinical trial </strong>and would be safe to test the drug candidate . On the other hand, <strong>Patient 6 has a mortality rate of 0.62 or 62%</strong> indicating that the <strong>patient would most likely have an adverse reaction to the drug candidate or treatment </strong>and so shouldn’t be a patient in a clinical trials. It costs <strong>$41,100 </strong>to recruit a patient to a clinical trials and <strong>30% of patients drop out</strong>, by implementing AI clinical trials could screen patients more effectively and save massive amounts of money. As demonstrated, an AI algorithm predicting mortality rates also helps to ensure the safety of patients in clinical trials.</p><h3>3. Trial Similarity Searching</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*EL3lCgwDwCvyIpMf4H35YQ.png" /><figcaption>Trial Similarity Search. Photo from <a href="https://arxiv.org/pdf/2306.04018.pdf">PyTrial Research Paper</a></figcaption></figure><p>Over <strong>90% of clinical trials fail </strong>and these failures can still teach other scientists on trial design. We can all learn from past clinical trial success and failures to improve planning to ensure clinical trial success’ occur much more often. Using AI to provide a similarity score can help scientists plan their own trial by looking at other relevant trials. Similarity scores can help to provide reference points on trial design, patient eligibility for recruitment, outcome measures, sample size, and endpoints. A similarity score can also act as an indicator as to whether a clinical trial is on the path of success or if major changes in the planning need to be made. So here’s how I made a ML model to output similarity scores!</p><h4>Cell 1: Downloading Clinical Trial Data</h4><pre>from pytrial.data.demo_data import load_trial_document_data<br>data = load_trial_document_data()<br>df = data[&#39;x&#39;].sample(10000)</pre><p>We first use the PyTrial library to input load_trial_document_data which contains data on 447,709 clinical trials. Out of the 447,709 clinical trials 311,485 were used in self-supervised training. Self-supervised learning involves using data without giving instructions to the model or labelling the data. Instead, the model learns from the inherent structure of the data and patterns within the input data to come up with conclusions.</p><p>data = load_trial_document_data this line downloads the 447,709 clinical trials from <a href="https://clinicaltrials.gov/">ClinicalTrials.gov</a> which was &gt;1.4GB. df = data[&#39;x&#39;].sample(10000) creates variable df which reduces the dataset of 447,709 clinical trials to a sample size of 10,000 clinical trials.</p><h4><em>Cell 2: Doc2Vec Model</em></h4><pre>from pytrial.tasks.trial_search import Doc2Vec</pre><p>Now that we have the input data we need to create the model. We first use the PyTrial library and import Doc2Vec. We use Doc2Vec a model that can find similarities between documents and outputs a numerical similarity score. This computed similarity score can be used in clinical trial documents for trial similarity searching.</p><blockquote><strong>How does the Doc2Vec Model work and how can it be used for trial similarity searching?</strong></blockquote><p>Doc2Vec is a unsupervised machine learning algorithm that converts documents to vectors. In a Doc2Vec model, a vector is a mathematical representation of a document. <strong>Vectors </strong>aren’t just a single number, but a<strong> set of numbers that capture the meaning and context of a document</strong>. Doc2Vec was first presented in this <a href="https://arxiv.org/abs/1301.3781">article</a> by Mikolov et. al. Doc2Vec is heavily dependent on the word2vec model and understanding word2vec is crucial for context.</p><h4>Word2Vec</h4><p>The word2vec model produces vectors of the words. By producing vectors the word2vec model allows maintains the relationship between words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*8_oKbmmRgScZ0w_2.png" /><figcaption>A vector space with relationships between words. Photo from<a href="https://medium.com/red-buffer/doc2vec-computing-similarity-between-the-documents-47daf6c828cd"> Medium article.</a></figcaption></figure><p>The word2vec representation uses two main algorithms: Skip-Gram and Continuous Bag-of-Words (CBOW).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vQQYzTqqSx27ESXjMa7lQ.png" /><figcaption>Comparison of CBOW and SkipGram. <a href="https://kavita-ganesan.com/comparison-between-cbow-skipgram-subword/">Photo from Kavita Ganesan</a>.</figcaption></figure><p>The skip-gram model tries to predict a word given the surrounding context. The following figure shows that when the target word “sat” is given to the model, it tries to predict the surrounding words with context and outputs “The cat sat on the mat”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*pmAGvTeOH5lJWUxk.png" /><figcaption>Visual Representation of Skip-Gram</figcaption></figure><p>A CBOW model does the opposite process of what the skip-gram model does. CBOW tries to predict the next word with context. In the following figure, the context or inputted words are “the cat sat” is sent to the model and it tries to predict the next word based on context. The model predicts the next word to be “on”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/0*BOoGcptT6lBWajvB.png" /><figcaption>Visual Representation of Continuos Bags-of-words (CBOW)</figcaption></figure><h4>Doc2Vec</h4><p>The Doc2Vec model is an extension of word2vec and so Doc2Vec also employs the skip-gram and CBOW models. Doc2Vec creates vectors that represent similarities between documents and this allows for similarity analysis in a numerical fashion. Doc2Vec also utilizes GenSim (Generate Similar) a widely used Python library for natural language processing (NLP). GenSim helps with creating document vectors and calculating similarities between them. GenSim allows for the adjustment of the dimension of the vector representation, faster training, and the exposure of tuning parameters, making it easier to work with Doc2Vec.</p><p>Doc2Vec was used in the trial similarity searching as the clinical trial documents can be generated as vectors and Doc2Vec allows for similarity analysis between clinical trials documents. Doc2Vec gives each clinical trial document a numerical vector that can then be compared with other numerical vector scores to find similar trials.</p><h4>Cell 3: Preparing the Doc2Vec Model</h4><pre>model = Doc2Vec(<br>    emb_dim=128,<br>    epochs=50,<br>    num_workers=8,<br>    )<br><br>model.fit(<br>    {&#39;x&#39;: df,<br>    &#39;fields&#39;:[&#39;title&#39;, &#39;disease&#39;, &#39;intervention_name&#39;],<br>    &#39;tag&#39;: &#39;nct_id&#39;}<br>    )</pre><p>We first specify the model as Doc2Vec. Next, emb_dim=128 refers to the embedding dimension which tells us the vector space in which documents are embedded. The value of 128 indicates the documents are embedded into a 128-dimensional vector space. Each clinical trial document is a numerical vector with 128 elements, which are real numbers representing the vector representation of a clinical trial document. This allows the model to capture and process the contextual meaning of the clinical trial documents in a 128-dimensional space. This can lead to more effective representations of the documents, leading to a better model.</p><p>epochs=50 we then specify the model will train for 50 epochs.</p><p>num_workers=8 specifies the number of worker processes that will occur in the model. A worker process is responsible for uploading the data and updating the model weight’s during training. The line specifies 8 worker processes will occur and this can help with improving the efficiency of the training process.</p><p>model.fit is used to train the model and the model will look at df which is the 10,000 clinical trial documents. The model will also look at variable field which contains information on the title of a clinical trial (title), the disease or condition the clinical trial is focusing on (disease), and the treatment the clinical trial created (intervention_name).</p><h4>Cell 4: Printing the Results</h4><pre>preds = model.predict({<br>    &#39;x&#39;: df.iloc[:20], # check the top-k similar trials for 20 trials<br>    &#39;fields&#39;: [&#39;title&#39;],}, <br>    top_k=5)</pre><p>We create the predsvariable that stores all the prediction from model.predict. &#39;x&#39;: df.iloc[:20]specifies that 20 trials will be outputted. &#39;fields&#39;: [&#39;title&#39;],}, we specify that the titles of 20 clinical trials will be shown. top_k=5 tells that the top 5 most similar trials will be shown. So the output will consist of 20 clinical trials with their study titles and that for each of the 20 clinical trials the top 5 most similar trials will be shown.</p><pre>for i,pred in enumerate(preds):<br>    test_nct = df.iloc[i][&#39;nct_id&#39;]<br>    test_title = df.iloc[i][&#39;title&#39;]<br>    print(f&#39;test nct_id: {test_nct}, title: {test_title}, rank_list {pred} \n&#39;)</pre><p>for i,pred in enumerate(preds):creates a loop to go through all the predictions (preds). enumerate is a function used to track the index of each prediction, which is assigned to i.</p><p>test_nct = df.iloc[i][&#39;nct_id&#39;]:This line extracts the NCT ID (&#39;nct_id’) at the index i (which is the the current iteration in the loop) and assigns it to the variable test_nct.</p><p>test_title = df.iloc[i][&#39;title&#39;]: The title of each clinical trial is extracted and assigned to the variable test_title.</p><p>print(f&#39;test nct_id: {test_nct}, title: {test_title}, rank_list {pred} \n&#39;):prints the NCT ID, title of the study, and numerical trial similarity prediction values for the current iteration of the loop.</p><blockquote><strong>So what are the results and what can they tell us?</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5_lR1rkdb9y_cx7GsPRrA.png" /><figcaption>Trial Similarity Search Output</figcaption></figure><p>The output shows clinical trials with their ID and title of the study. Each clinical trial has the <strong>top 5 most similar trials </strong>brought up as well. For example, the model shows that <strong>clinical trial NCT04115358 </strong>the study on “Evaluation of Hyaluronic Acid Pulpotomies in Primary Molars” has a <strong>0.76 or 76% trial similarity with clinical trial NCT00702377</strong>.</p><p>Trial similarity search can help scientists learn from relevant trials to look at endpoints, patient recruiting, trial sites, previous treatments, and much more information. Trial similarity searching can prevent failures in clinical trials by allowing scientists to look at references for their own trial.</p><h3>The Future of Clinical Trials is AI</h3><p>Clinical trials are widely inefficient with a <strong>success rate of 10%</strong>. Clinical trials <strong>costs $48 million for pivotal trials and $200 million for phase III clinical trials</strong>. It is clear that most clinical trials waste massive amounts of money, time, and resources. However, by implementing machine learning models this doesn’t have to be the case.</p><ol><li>As shown with the case of Entresto<strong> millions of dollars could be saved</strong> if the outcomes of clinical trials could be predicted before they even happened. Scientists would know whether the clinical trial was a failure or success from the start, and this gives them the chance to plan accordingly. For example, if a trial was predicted to fail scientists would have the foresight and chance to adjust the trial’s design before spending millions of dollars. The machine learning model shown in this article demonstrates the ML models for predicting clinical trial outcomes can accurately predict outcomes and thus help save millions in clinical trials.</li><li>It costs clinical trials a whopping <strong>$41,100 to work with just one patient</strong>. Costs become astronomical as <strong>hundreds to thousands of patients are needed</strong> and with a <strong>30% dropout rate</strong> the cost to replace patients skyrockets further. The ML model shown to predict patient outcomes and mortality rates can help assess a patient’s suitability for a clinical trial. The ML model shown looks at a patient’s health records, gene expressions, reaction to the treatment, demographics, and many other factors to provide a holistic view on whether the patient should take the treatments. Predicting mortality rates also allow for patient safety, personalized treatment plans, and patient selection. If a patient has a high mortality rate then the patient shouldn’t be selected for the clinical trial. For clinical trials, patient outcome prediction can also help with trial enrollment, avoiding administering adverse treatments to patients, and save money on selection as patient dropouts would be solved.</li><li>The planning and trial design can be crucial as to whether a clinical trial can succeed or not. Over 90% of clinical trials fail and by <strong>looking at these failures</strong>, <strong>new clinical trials can learn from this and adapt to improve their own trial design to succeed</strong>. The ML model using Doc2Vec outputs a similarity score for trial and provides reference trials for scientists. A reference trial can provide information on sample size, controls, and patient eligibility. It’s like learning from other people’s work to succeed on your own clinical trial. AI can also provide input on trial design, sample size, treatments, endpoints, measures for safety, trial sites, and outcome measures. A similarity score can also indicate as to whether a clinical trial will success or if major changes in the planning need to be made to avoid failure.</li></ol><p>Implementing AI with clinical trials can go beyond clinical trial outcome prediction, patient outcome prediction, and trial similarity searching. <strong>AI has so many use cases for clinical trials </strong>and AI could also be used for patient matching, trial site selection, and patient data generation. Utilizing AI can revolutionize the process of clinical trials and streamline the approach to <strong>save massive amounts of time, money, and resources</strong> because <strong>AI is the future of clinical trials.</strong></p><p>Thank you so much for reading my article! I hope you learnt more about how AI will revolutionize clinical trials! If you want you can reach out to me here:</p><p><strong>Email:</strong> ali.muhammad.usman08@gmail.com</p><p><strong>LinkedIn:</strong> <a href="https://www.linkedin.com/in/ali-usman-40091925b/">https://www.linkedin.com/in/ali-usman-40091925b/</a></p><p><strong>Substack: </strong><a href="https://substack.com/profile/173343618-ali-usman">https://substack.com/profile/173343618-ali-usman</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=332e73434b8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using AI to Speed Up the Drug Development Process]]></title>
            <link>https://medium.com/@ali.muhammad.usman08/using-ai-to-speed-up-the-drug-development-process-b947b8a89cd8?source=rss-a8c6b246c419------2</link>
            <guid isPermaLink="false">https://medium.com/p/b947b8a89cd8</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[medicine]]></category>
            <category><![CDATA[chemistry]]></category>
            <category><![CDATA[biology]]></category>
            <category><![CDATA[drug-discovery]]></category>
            <dc:creator><![CDATA[Ali Usman]]></dc:creator>
            <pubDate>Wed, 01 Nov 2023 01:43:19 GMT</pubDate>
            <atom:updated>2023-11-01T01:45:25.367Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The Code Cracker: AI and Drug Development — A Prescription for Progress</strong></p><p>Let’s paint a familiar scene: you’re snug in your bed, feeling unwell, and your hand instinctively reaches for a familiar bottle of Advil. It’s a moment that resonates with nearly all of us because, at some point in our lives, we’ve turned to prescription drugs to ease our discomfort. Astonishingly, over half of Canadian adults between the ages of 18 and 79 have sought relief in at least one prescription medication within the past month. So, we’ve all been there, relying on these medications for comfort, but have you ever wondered how drugs are made? Well, prescription drugs are made through the process of drug discovery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UZ7fWXQ2Pya9UEmp" /><figcaption>Photo by <a href="https://unsplash.com/@myriamzilles?utm_source=medium&amp;utm_medium=referral">Myriam Zilles</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>💊 <strong>What is the drug development process? </strong>💊</h3><p>So, what is the drug discovery process? The process of creating new drugs for commercial use involves the process of finding new molecules/compounds, developing a usable drug, and then receiving FDA approval. A potential medicine must have basic research done first and pass a pre-clinical trial. Next, the drug must pass through multiple clinical trials. After a drug passes through clinical trials, it must receive FDA approval, and even more monitoring must be done before a drug is brought to the public. It costs an astounding <strong>$2.6 billion</strong> just to get a drug to the public. The process of drug development is lengthy, costly, and a high-risk process that takes between<strong> 10–15 years </strong>and <strong>$1–2 billion</strong> for new drugs to receive approval. Another major problem is that <strong>90% of clinical drugs fail</strong>.</p><h3>💊 Eroom’s Law 💊</h3><p>The drug discovery process is so slow it has received its law to describe the phenomenon. Eroom’s law states that drug discovery is becoming slower and more expensive over time despite technological improvements. The inflation-adjusted cost of developing new drugs doubles each year. Interestingly, Eroom’s law is the opposite of Moore’s, which states that technologies become faster and cheaper over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*l4itgTuAl-qj5zFDmBsOOw.png" /><figcaption>Eroom’s Law</figcaption></figure><p>But to understand why Eroom’s law exists and why drug development takes so long, we first need to understand what clinical phases are.</p><h3>💊 Preclinical Studies 💊</h3><p><strong>Target Validation</strong>: Ensuring that a drug is both effective and safe is crucial in drug development. Target validation plays a vital role. A target, which could be a protein or a gene, needs to be proven effective, safe, and suitable for drug development. Some targets are more suited for small drug discovery, while others are better for inhibitions. Identifying and confirming these good targets helps us better understand their role in diseases and potential side effects. Biomedical data mining has significantly improved the identification of these targets, using various sources like research papers and genetic information. By enhancing our confidence in drug targets, target validation helps to focus resources on promising paths, ultimately leading to more effective and safe medications.</p><p><strong>High Throughput Screening (HTS)</strong>: In drug discovery and development, HTS is employed to rapidly assess potential drug candidates or compounds to identify those with the desired biological activity. HTS aims to efficiently evaluate thousands of chemical or biological substances as potential drug candidates. Currently, artificial intelligence (AI) is being utilized to enhance the efficiency of this screening process.</p><p><strong>Testing for Drug-like properties: </strong>Potential drug candidates undergo a carefully structured process after thorough testing and evaluation. The aim is to ensure these drugs are effective, safe, and act as expected from standard medications. This refinement involves studying how a drug’s chemical structure affects its performance in the body, with experts in medicinal chemistry making changes to enhance its effectiveness while minimizing unintended side effects. Another critical aspect is ensuring the drug enters the bloodstream efficiently and optimizing how the body absorbs, distributes, breaks down, and eliminates it. This is essential for the drug to work as intended. Achieving these goals requires a keen focus on the drug’s chemical properties, like how well it dissolves and interacts with the body. Ultimately, the goal is to create a medicine that works effectively and safely.</p><p><strong>Toxicity Testing: </strong>Examining drug safety is a crucial step in creating new medicines. Scientists conduct various tests to understand how these drugs might affect patients, paying close attention to potential adverse effects. These tests occur at different stages of drug development and help determine safe dosages and how the drug interacts with our bodies. The main goal is to strike the right balance between a drug being effective and not causing harm to the people who use it. This process helps eliminate unsafe candidates and ensures that the drugs we create are both beneficial and safe for people.</p><h4>💊 <strong>Clinical Trials </strong>💊</h4><p>If a drug can pass these tests, it will move onto clinical trials for further testing.</p><p><strong>There are four main phases in clinical trials:</strong></p><p><strong>Phase 1:</strong> Around<strong> 20 to 100 participants</strong> with a disease/condition volunteer to test the drug. Phase 1 can take several months, and around <strong>70% of drugs </strong>move onto the next stage. Phase 1 can tell us more about safety and dosages.</p><p><strong>Phase 2: </strong>In Phase 2, <strong>several hundred people </strong>with the disease/condition volunteer to test the drug, which can take several months to 2 years. Only <strong>33% of drugs</strong> will move onto the next phase; the purpose of phase 2 is to examine efficacy and side effects.</p><p><strong>Phase 3: </strong>For Phase 3, around <strong>300 to 3,000 volunteers</strong> will test the drug. The length of the study ranges from 1 to 4 years, and phase 3 monitors adverse reactions and efficacy. Around <strong>25–30% of drugs</strong> will move on to the next phase.</p><p><strong>Phase 4: </strong>In phase 4, <strong>several thousand volunteers</strong> with the disease/condition will volunteer to determine the drug’s safety and efficacy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xR5nNwL9g369ykYvMtdIIw.png" /></figure><h3>💊 <strong>Why do drugs fail clinical tests? </strong>💊</h3><p><strong>Lack of clinical efficacy: </strong>Around <strong>40% to 50%</strong> of drugs fail to lack clinical efficacy. This means drugs fail because they aren’t able to achieve their desired result. The high rate of clinical efficacy failures in drug development can be attributed to several key factors. These include the complexity of diseases and our incomplete understanding of their mechanisms, limitations in preclinical models, patient variability, safety concerns, challenges in trial design, stringent regulatory requirements, financial constraints, publication bias, competition, and ethical considerations.</p><p><strong>Unmanageable toxicity: </strong>Unmanageable toxicity also accounts for <strong>30%</strong> of failed drugs. Drug candidates can fail in clinical development due to unmanageable toxicity, primarily stemming from rigorous safety testing in human trials. If a drug induces severe or unexpected side effects that cannot be effectively controlled, it can lead to trial termination or drug withdrawal. Additionally, dose-response relationships are vital; some drugs show dose-dependent toxicity, making it challenging to establish a safe dosing regimen when the therapeutic and toxic doses are close. Unintended off-target effects, individual variability, and organ toxicity can also contribute to drug development failure. The complexities of managing drug toxicity in clinical development are further highlighted by cumulative toxicity over time, a narrow therapeutic index, and ethical concerns about risk-benefit balance.</p><p><strong>Poor drug-like properties: </strong>Poor drug-like properties accounted for 30%-40% of drug development failures in the 1990s; now, they only account for <strong>10%-15% of</strong> drug development failures today. A drug’s pharmacokinetics involving ADME (absorption, distribution, metabolism, and excretion) significantly influences efficacy. Challenges like limited absorption, rapid metabolism, or inadequate distribution can hinder therapeutic levels. Maintaining chemical stability is essential to preserve the drug during storage and administration. Oral medications depend on bioavailability, ensuring the dose reaches circulation; issues like low solubility or liver metabolism can compromise it. Toxicity may arise from poor target selectivity or unintended interactions, jeopardizing trials. Poorly soluble compounds require complex formulations, raising costs and risks. Drug interactions can impact pharmacokinetics, leading to potential side effects. Metabolic stability, unpredictable pharmacokinetics, and specific physical characteristics can affect drug suitability. Failing to comply with regulatory guidelines may lead to approval delays.</p><p><strong>Lack of a commercial need and poor planning: </strong>Poor strategic planning or clinical study conduct accounts for around <strong>10%</strong> of failures in drug development. The lack of market need and poor planning can impede drug discovery in various ways. When a new drug fails to meet market demand or address unmet medical needs, it may struggle to secure investment and market acceptance, resulting in financial losses and project abandonment. Resource misallocation, encompassing time, funds, and expertise, leads to inefficiencies, delays, and budget overruns, hindering drug development. Inadequate strategic planning causes disarray and inefficiency in drug development efforts, wasting resources and time. Ignoring regulatory requirements can introduce obstacles, delays, or regulatory rejection. Subpar planning can affect clinical trial design and execution, potentially leading to failures or delays. Securing funding becomes challenging without a clear market rationale, discouraging investor support for projects lacking commercial potential. Neglecting the competitive landscape and existing treatment options may result in non-competitive drug development. Poor planning can also impact intellectual property strategies, manufacturing, supply chains, health economics, and pricing, further influencing a drug’s commercial success.</p><h3>💊 AI x Drug Development 💊</h3><p>If you aren’t familiar, AI, which stands for Artificial Intelligence, can be likened to the magician of the digital realm. It’s the enchanting force that animates computers, empowering them to learn, reason, and, occasionally, crack a joke (although they’re not known for their humour). AI is the mastermind behind your virtual chatbot pals, the wizardry within your voice-activated assistants, and the secret ingredient that keeps your inbox free of pesky spam (a true lifesaver, right?).</p><p><strong>So what are some applications with AI and drug development?</strong></p><p><strong>Drug Discovery:</strong> AI analyzes vast datasets to identify potential drug candidates, predicting how different compounds will behave. This speeds up the early stages of drug discovery.</p><p><strong>Target Identification:</strong> AI helps pinpoint disease targets by analyzing genetic and molecular data, making it easier to identify the root causes of diseases.</p><p><strong>Drug Design and Optimization: </strong>AI generates and optimizes drug molecules with desired properties, such as high efficacy and low toxicity.</p><p><strong>Biomarker Discovery</strong>: AI finds biomarkers to predict disease progression and treatment responses, paving the way for personalized medicine.</p><p><strong>Drug Repurposing:</strong> AI identifies existing drugs that can be repurposed for new uses, saving time and resources.</p><p><strong>Clinical Trial Optimization:</strong> AI optimizes clinical trials by predicting outcomes, identifying suitable patient populations, and streamlining protocols.</p><p><strong>Drug Safety and Toxicity Prediction: </strong>AI predicts safety issues and toxicity early in the development process, reducing failures.</p><p><strong>Data Mining and Analysis</strong>: AI processes vast biomedical data to extract insights, improving decision-making.</p><p><strong>Natural Language Processing (NLP):</strong> AI analyzes scientific literature, patient records, and clinical notes to extract valuable information.</p><p><strong>Automation and Robotics:</strong> AI-driven automation accelerates laboratory processes, speeding up testing and analysis.</p><p><strong>Regulatory Compliance:</strong> AI ensures drug development processes meet regulatory requirements.</p><p><strong>Drug Manufacturing and Quality Control:</strong> AI optimizes production and quality control, maintaining consistency and high quality.</p><h3>💊 Introducing Insilico Medicine💊</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*vdFR7wrp9yqNM5T8rZ3R3Q.png" /></figure><blockquote>“Our revolutionary drug discovery engine utilizes millions of data samples and multiple data types to discover signatures of diseases and identify the most promising targets for billions of molecules that already exist or can be generated <em>de novo</em> with preferred sets of parameters”</blockquote><p><strong>InSilico Medicine</strong> is a groundbreaking company in the field of drug development, capitalizing on advanced AI methods to drive innovation. Their data-driven strategies speed up the discovery of potential drug candidates and streamline the journey from identifying therapeutic targets to conducting clinical trials. Through proficient analysis of intricate biological and chemical data, InSilico Medicine has focused on reducing lengthy timelines and high costs linked to drug development. Their inventive approaches hold the potential to provide more secure and efficient treatments to patients requiring medical solutions. Currently, Insilico Medicine has three main applications for drug development: <strong>PandaOmics</strong>, <strong>Chemistry42</strong>, and <strong>inClinico</strong>. InSilico Medicine shows us how AI is being merged with drug development. Let’s dive deeper into how these AI algorithms work in each application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*W2WG7HFPyxrDE9Cu" /></figure><h4>💊 <strong>PandaOmics </strong>💊</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vYkiTjw4mdPuSTQi" /></figure><p><strong>PANDA-Omics</strong> is a comprehensive AI-driven platform that analyses biological data at various “omics” levels, including genomics, proteomics, and metabolomics. Here’s a step-by-step summary of how AI is utilized in PANDA-Omics:</p><ol><li>PANDA-Omics begins by integrating and aggregating massive volumes of biological data from diverse sources. This data includes information about genes, proteins, metabolites, and their interactions.</li><li>AI algorithms are employed to clean and preprocess the integrated data. This step ensures the data is consistent, accurate, and ready for analysis.</li><li>PANDA-Omics uses feature extraction techniques to identify significant patterns and characteristics within the data. This involves reducing the dimensionality of the data while retaining essential information.</li><li>AI-driven algorithms analyze the data to uncover correlations, associations, and potential biomarkers. These algorithms can identify significant genes, proteins, or metabolites that play a role in a particular biological process or disease.</li><li>PANDA-Omics uses machine learning algorithms to build predictive models. These models can estimate the likelihood of specific outcomes, such as disease risk or treatment response, based on the analyzed omics data.</li><li>AI techniques are applied to construct biological networks, representing interactions between genes, proteins, and metabolites. This network analysis helps in understanding the complex relationships within biological systems.</li><li>PANDA-Omics leverages AI to identify potential biomarkers, molecules or features that can indicate a disease, condition, or biological process. These biomarkers can be used for diagnostic or therapeutic purposes.</li><li>AI-driven target identification helps in identifying potential drug targets within the biological networks. These targets represent specific proteins or genes that could be targeted for drug development.</li><li>PANDA-Omics can assist in drug discovery by predicting how potential drug compounds might interact with the identified targets and analyzing their potential effectiveness.</li><li>The platform’s AI capabilities can be used to develop personalized treatment strategies based on an individual’s omics data, allowing for tailored medical interventions.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zVmhZq3glQu71Ydu" /><figcaption>The journey of how PandaOmics went from a research paper idea to an AI application</figcaption></figure><h4>💊 Chemistry42 💊</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*549oNGnYUeGAuVBL" /><figcaption>Chemistry42’s AI-driven platform with reward functions</figcaption></figure><p><strong>Chemistry42 </strong>is a cutting-edge AI-driven platform focused on drug discovery and chemical compound design. Here’s a step-by-step summary of how AI is utilized in Chemistry42:</p><ol><li>AI algorithms are employed to generate novel chemical compounds. These algorithms explore chemical space and consider the structural and property constraints to design molecules with desired characteristics.</li><li>AI models predict the molecular structures and properties of designed compounds. This includes estimating a compound’s stability, solubility, and pharmacokinetics.</li><li>Chemistry42 uses AI to predict how well a designed compound binds to a specific target, such as a protein associated with a disease. The binding affinity prediction helps assess a compound’s potential as a drug candidate.</li><li>AI-driven models are utilized to assess the potential toxicity of designed compounds. This step is crucial in identifying compounds that may have adverse effects and need further optimization.</li><li>AI algorithms optimize the properties of designed compounds based on specific criteria, such as maximizing binding affinity and minimizing toxicity.</li><li>Machine learning models are applied to prioritize the designed compounds, ranking them based on their potential as drug candidates. This step helps in selecting the most promising molecules for further investigation.</li><li>Chemistry42’s AI enables an iterative design process where the algorithms continuously learn from the results of experiments and simulations. This iterative approach refines the compound designs over time.</li><li>AI-driven algorithms assist in designing and interpreting high-throughput screening experiments, allowing for the efficient testing of numerous compounds to identify those with desired biological activity.</li><li>AI is employed to screen large chemical libraries and identify compounds that have the potential to interact with a specific target or protein of interest.</li><li>AI techniques help in the structural analysis of chemical compounds, including 2D and 3D visualization, to understand their conformation and how they interact with biological targets.</li></ol><p>By integrating AI at each step of the drug discovery process,<strong> Chemistry42</strong> accelerates the identification and optimization of potential drug candidates. This approach enhances the efficiency of drug discovery, reduces costs, and increases the likelihood of developing effective therapeutic compounds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/0*-DJKDh9itInyubi5" /><figcaption>Chemistry42’s interface for creating generative experiments</figcaption></figure><h4>💊 inClinico 💊</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*_W2vl3VDhR_2FpKt" /><figcaption>inClinico platform to predict clinical trial outcomes</figcaption></figure><p><strong>InClinico </strong>is an AI-driven platform that focuses on clinical trials and personalized medicine. Here’s a step-by-step summary of how AI is utilized in InClinico:</p><ol><li>InClinico begins by integrating and aggregating diverse patient data, including electronic health records, genetic information, clinical history, and other relevant medical data.</li><li>AI algorithms are employed to clean, standardize, and preprocess the patient data, ensuring consistency and accuracy in the analysis.</li><li>Machine learning models are used to build predictive models that can estimate various clinical outcomes, such as disease progression, treatment response, and patient prognosis.</li><li>AI-driven algorithms analyze patient data to generate personalized treatment plans. These plans are tailored to the individual patient’s genetic, molecular, and clinical profile, ensuring that treatments are optimized for their specific needs.</li><li>InClinico uses AI to optimize the design and execution of clinical trials. This includes patient recruitment, stratification, and predicting the likely success of a trial based on historical data.</li><li>AI algorithms analyze real-world evidence from patient data to provide insights into the long-term effectiveness and safety of treatments.</li><li>AI models can predict the progression of diseases, allowing for early interventions and personalized patient care.</li><li>InClinico employs AI to predict adverse events or side effects associated with treatments, helping healthcare providers and patients make informed decisions.</li><li>The platform uses AI to identify biomarkers that can serve as indicators of disease progression or treatment response.</li><li>AI algorithms continuously monitor patient responses to treatment, allowing for adjustments to treatment plans as needed.</li><li>InClinico uses AI for data security and compliance, ensuring that patient data is protected and compliant with relevant healthcare regulations.</li></ol><p>By integrating AI at each step of the clinical trial process, <strong>InClinico</strong> streamlines and optimizes patient care and research. This approach helps healthcare providers make data-driven decisions, tailor treatments to individual patients, and improve the efficiency and success of clinical trials.</p><h3>💊 How much time and money can AI save 💊</h3><p>Recently, the company’s early investment in deep learning has proven fruitful, as a drug candidate discovered through its AI platform is now progressing into Phase 2 clinical trials for treating idiopathic pulmonary fibrosis, a relatively rare respiratory ailment resulting in a gradual decline in lung function.</p><p>InSilico Medicine employed generative AI at every stage of the preliminary drug discovery process. This encompassed tasks such as pinpointing a molecule suitable for drug targeting, creating innovative drug candidates, assessing the candidates’ affinity with the target, and even forecasting the results of clinical trials. Traditional methodologies for accomplishing these tasks would have incurred costs exceeding <strong>$400 million</strong> and a lengthy time frame of up to <strong>six years</strong>. However, leveraging generative AI-enabled InSilico to achieve these milestones at just <strong>one-tenth of the cost</strong> and <strong>one-third of the time</strong>, with the first phase of clinical trials initiated merely two and a half years after project commencement.</p><blockquote>Alex Zhavoronkov, CEO of InSilico Medicine, emphasized the significance of this achievement: “This first drug candidate that’s advancing to Phase 2 is a true testament to our end-to-end approach in merging biology and chemistry with deep learning. It marks a pivotal milestone not only for our organization but for the entire field of AI-accelerated drug discovery.”</blockquote><h3>💊 The Road Ahead: The Future of AI and Drug Development 💊</h3><p>The future of AI in drug development is incredibly promising, with innovative technologies and approaches transforming how new medicines are discovered, designed, and brought to market. Here are some key steps and trends that we can expect in the future of AI in drug development:</p><p><strong>AI-Driven Drug Discovery:</strong> AI will be pivotal in accelerating drug discovery. Advanced machine learning algorithms will analyze massive datasets of biological and chemical information to identify potential drug candidates, predict their behaviour, and optimize their properties. AI-driven approaches will expedite the identification of molecules with therapeutic potential.</p><p><strong>Personalized Medicine:</strong> AI will enable the development of personalized treatments based on an individual’s genetic, molecular, and clinical profile. By analyzing patient data, AI algorithms will recommend the most effective treatments tailored to each patient’s unique characteristics. This will lead to more targeted and efficient therapies, minimizing side effects.</p><p><strong>Drug Repurposing:</strong> AI will continue to identify existing drugs that can be repurposed for new uses. By analyzing the relationships between compounds, diseases, and biological pathways, AI can help discover novel applications for drugs already approved for other conditions. This approach can significantly reduce development time and costs.</p><p><strong>Optimized Clinical Trials:</strong> AI will optimize the design and execution of clinical trials. Machine learning models will assist in patient recruitment, stratification, and predicting the likelihood of trial success. This will reduce the time and resources required for clinical testing and increase the chances of successful drug approvals.</p><p><strong>Early Detection and Prevention:</strong> AI algorithms will predict disease progression and treatment responses, enabling early interventions and preventive measures. By continuously monitoring patient data, AI can alert healthcare providers to changes in a patient’s condition, improving patient care and outcomes.</p><p><strong>Data Security and Compliance:</strong> With the increasing use of patient data and sensitive information, AI will continue to focus on data security and regulatory compliance. AI-driven solutions will ensure patient data is protected, and drug development processes comply with healthcare regulations, such as HIPAA in the United States and GDPR in the European Union.</p><p><strong>AI in Drug Manufacturing:</strong> AI will optimize drug manufacturing and quality control processes. AI-driven systems will maintain consistency and high-quality standards in drug production, reducing variability and ensuring that each batch meets regulatory requirements.</p><p><strong>AI-Driven Biomarker Discovery:</strong> AI will be crucial in identifying biomarkers that predict disease progression and treatment responses. These biomarkers will aid in the development of more precise and effective therapies.</p><p><strong>Global Collaboration:</strong> The drug development community will see increased collaboration on AI projects. Researchers, pharmaceutical companies, and technology firms will work together to pool resources, share data, and collectively advance the field, addressing common challenges and accelerating progress.</p><p>The future of AI in drug development holds great promise for faster, more cost-effective, and personalized medicine. As AI technologies evolve and become more sophisticated, they will revolutionize the pharmaceutical industry, ultimately benefiting patients by bringing safer and more effective drugs to market more quickly.</p><h3>💊 In a Nutshell 💊</h3><ul><li>It costs<strong> $2.6 billion</strong> to bring a drug to the public. The process of drug development takes between <strong>10–15 years </strong>and costs<strong> $1–2 billion</strong>.</li><li>The drug discovery process is so slow it has been characterized by <strong>Eroom’s law</strong>, which states that even though technology has advanced, drug discovery is becoming slower and more expensive.</li><li>Preclinical studies involve target validation, high throughput screening (HTS), testing for drug-like properties, and toxicity testing to move on to clinical trials.</li><li>Clinical trials involve four phases to test for dosages, efficacy, and toxicity. Clinical trials involve participants with the disease/condition to test the drug.</li><li>Around<strong> 40–50%</strong> of drugs fail due to clinical efficacy, <strong>30% </strong>of drugs fail due to unmanageable toxicity,<strong> 10%-15%</strong> of drugs fail due to poor drug-like properties, and <strong>10%</strong> fail due to poor planning.</li><li>AI can revolutionize drug discovery with endless applications such as clinical trial optimization, drug safety and toxicity prediction, target identification, etc.</li><li><strong>Insilico Medicine </strong>is a groundbreaking company that combines AI with drug development and has applications like <strong>PandaOmics</strong>, <strong>Chemistry42,</strong> and <strong>inClinico</strong>.</li><li><strong>PandaOmics</strong> is an AI-driven platform that analyses biological data such as genomics, proteomics, and metabolomics.</li><li><strong>Chemistry42</strong> focuses on drug discovery and optimizing chemical compounds using AI.</li><li><strong>inClinico </strong>focuses on clinical trials and personalized medicine outcomes.</li><li>Recently, InSilico Medicine has discovered a drug through its AI platform. The drug is now in phase 2. By employing these methods, Insilico Medicine has saved<strong> one-tenth</strong> and<strong> one-third</strong> of the time developing a new novel drug.</li><li>AI-based drug discovery is the future!!</li></ul><h3>Sources</h3><p><a href="https://www.policymed.com/2014/12/a-tough-road-cost-to-develop-one-new-drug-is-26-billion-approval-rate-for-drugs-entering-clinical-de.html"><strong>https://www.policymed.com/2014/12/a-tough-road-cost-to-develop-one-new-drug-is-26-billion-approval-rate-for-drugs-entering-clinical-de.html</strong></a></p><p><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3058157/"><strong>https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3058157/</strong></a></p><p><a href="https://www.linkedin.com/pulse/accelerating-drug-discovery-ai-jorge-bastos"><strong>https://www.linkedin.com/pulse/accelerating-drug-discovery-ai-jorge-bastos</strong></a></p><p><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9293739/"><strong>https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9293739/</strong></a></p><p><a href="https://www.science.org/content/blog-post/eroom-s-law"><strong>https://www.science.org/content/blog-post/eroom-s-law</strong></a></p><p><a href="https://bmcneurol.biomedcentral.com/articles/10.1186/1471-2377-9-S1-S2"><strong>https://bmcneurol.biomedcentral.com/articles/10.1186/1471-2377-9-S1-S2</strong></a></p><p><a href="https://www.fda.gov/patients/drug-development-process/step-3-clinical-research"><strong>https://www.fda.gov/patients/drug-development-process/step-3-clinical-research</strong></a></p><p><a href="https://lustgarten.org/clinical-trial-phases/"><strong>https://lustgarten.org/clinical-trial-phases/</strong></a></p><p><a href="https://insilico.com/"><strong>https://insilico.com/</strong></a></p><p><a href="https://expo.taiwan-healthcare.org/en/news_detail.php?REFDOCID=0pyqq0sjrthci27r"><strong>https://expo.taiwan-healthcare.org/en/news_detail.php?REFDOCID=0pyqq0sjrthci27r</strong></a></p><p><a href="https://insilico.com/pandaomics"><strong>https://insilico.com/pandaomics</strong></a></p><p><a href="https://insilico.com/chemistry42"><strong>https://insilico.com/chemistry42</strong></a></p><p><a href="https://insilico.com/inclinico"><strong>https://insilico.com/inclinico</strong></a></p><p><a href="https://www.cnbc.com/2023/06/29/ai-generated-drug-begins-clinical-trials-in-human-patients.html"><strong>https://www.cnbc.com/2023/06/29/ai-generated-drug-begins-clinical-trials-in-human-patients.html</strong></a></p><p><a href="https://www.eurekalert.org/news-releases/993844"><strong>https://www.eurekalert.org/news-releases/993844</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b947b8a89cd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>