I trained an AI to make fake drug names…

Andrew Evans
Jul 21, 2017 · 2 min read

So I saw Dan Hon’s Medium story about using a recursive neural net to generate novel UK place names (which was in turn inspired by Janelle Shane’s New paint colors invented by neural network article), and I got to thinking that this would be perfect for pharmaceutical names…

I won’t repeat the technical instructions from Dan’s article — I pretty much used the same configuration he did (torch-rnn in a Docker container) — I just fed it a database of pharmaceutical product names instead of UK towns, and let its little mind spin.

The drug name database I chose was a CSV file list of drug product names from a public Github repo made available by Open Health Care. There was no special reason that I chose this — it was pretty much the first CSV list of drug product names I came across. It’s possible there are much more comprehensive and interesting lists out there, but this proved to be more than sufficient. I did some basic cleanup on the data (removing unneeded columns from the CSV, etc.) and just fed it in to the RNN trainer. I left in the form factor and dosing jsut for fun, since the RNN would likely handle that fine (which it did, with occasionally amusing results). The input data look somewhat like this:

Hydroxyzine HCl Tab 25mg
Cyproheptadine HCl Tab 4mg
Diphenhydramine HCl Tab 25mg
Diphenhydramine HCl Tab 50mg
Promethazine HCl Tab 10mg
Promethazine HCl Tab 25mg
Alimemazine Tart Tab 10mg
Epipen Auto-Inj 1/1000 1mg/ml 0.3ml
Acetylcy Tab Eff 600mg
Carbocisteine Cap 375mg
Carbocisteine Oral Soln 250mg/5ml
Codeine Phos Linct 15mg/5ml
Codeine Phos Linct 15mg/5ml S/F
Pholcodine Linct 5mg/5ml S/F

The results were marvelous — brand-new real-sounding drug names that don’t exist in the real world, like:

Teneprolenic Acid Cap 200mg
Liproxypenicine Tab 40mg
Cycloxicillone HCl Tab 400mg
Angentidine HCl Tab 60mg
Methylphenadine HCl Cap 100mg
Zomazole Tab 50mg
Spirifen Tab 2.5mg/5mg
Acometimide Tab 10mg
Hydromazine HCl Liq 1.5mg/5ml
Nabreline Liq Spec 100mcg/5mg/5ml
Cyclitine Eye Dps 5%
Hydroforalone Crm 5%
Methuamil Patch 50mcg/hr
Onemanol Tab 50mg
Mediaxab Tab 100mg
Adipimet Tab 10mg
Celopranol Crm 2%
Visulifine Tab 2mg
Terbanide Tab 25mg
Coviderone Inj 7.5mg/ml 3ml Amp
Gludanil Patch 2mg/24hrs
Breantholone Crm 1%
Zogestarin Enem 250mcg/24mg/ml
Brectropen Lot 0.9%
Azapamide Liq Spec 500mg/5ml
Doximoxipropan Tab 250mg

Zogestarin enema, anyone? Cyclitine eye drops? The most interesting ones seemed to pop out at a Softmax temperature of around 0.8. I’m interested to find some more comprehensive drug name data, if anyone has ideas. Also, I think I’ll try it with disease names next — stay tuned…

)
Andrew Evans

Written by

Bioinformatician, startup cofounder, American expat in Europe, cancer survivor

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade