Knowledge extraction from medical literature using Recurrent Neural Networks

Similar documents
System Implementation for SemEval-2017 Task 4 Subtask A Based on Interpolated Deep Neural Networks

arxiv: v4 [cs.cl] 28 Mar 2016

A New Perspective on Combining GMM and DNN Frameworks for Speaker Adaptation

arxiv: v1 [cs.lg] 7 Apr 2015

Second Exam: Natural Language Parsing with Neural Networks

Unsupervised Learning of Word Semantic Embedding using the Deep Structured Semantic Model

arxiv: v1 [cs.lg] 15 Jun 2015

A Neural Network GUI Tested on Text-To-Phoneme Mapping

Deep Neural Network Language Models

Autoregressive product of multi-frame predictions can improve the accuracy of hybrid models

Training a Neural Network to Answer 8th Grade Science Questions Steven Hewitt, An Ju, Katherine Stasaski

Python Machine Learning

Residual Stacking of RNNs for Neural Machine Translation

Artificial Neural Networks written examination

Georgetown University at TREC 2017 Dynamic Domain Track

Глубокие рекуррентные нейронные сети для аспектно-ориентированного анализа тональности отзывов пользователей на различных языках

Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Architectures

Lecture 1: Machine Learning Basics

arxiv: v5 [cs.ai] 18 Aug 2015

POS tagging of Chinese Buddhist texts using Recurrent Neural Networks

QuickStroke: An Incremental On-line Chinese Handwriting Recognition System

(Sub)Gradient Descent

Modeling function word errors in DNN-HMM based LVCSR systems

Learning Structural Correspondences Across Different Linguistic Domains with Synchronous Neural Language Models

Modeling function word errors in DNN-HMM based LVCSR systems

Assignment 1: Predicting Amazon Review Ratings

Calibration of Confidence Measures in Speech Recognition

Semi-supervised methods of text processing, and an application to medical concept extraction. Yacine Jernite Text-as-Data series September 17.

Attributed Social Network Embedding

ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY DOWNLOAD EBOOK : ADVANCED MACHINE LEARNING WITH PYTHON BY JOHN HEARTY PDF

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

UNIDIRECTIONAL LONG SHORT-TERM MEMORY RECURRENT NEURAL NETWORK WITH RECURRENT OUTPUT LAYER FOR LOW-LATENCY SPEECH SYNTHESIS. Heiga Zen, Haşim Sak

Dropout improves Recurrent Neural Networks for Handwriting Recognition

Rule Learning With Negation: Issues Regarding Effectiveness

Cultivating DNN Diversity for Large Scale Video Labelling

Netpix: A Method of Feature Selection Leading. to Accurate Sentiment-Based Classification Models

arxiv: v2 [cs.ir] 22 Aug 2016

SINGLE DOCUMENT AUTOMATIC TEXT SUMMARIZATION USING TERM FREQUENCY-INVERSE DOCUMENT FREQUENCY (TF-IDF)

A study of speaker adaptation for DNN-based speech synthesis

Model Ensemble for Click Prediction in Bing Search Ads

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

SEMI-SUPERVISED ENSEMBLE DNN ACOUSTIC MODEL TRAINING

OPTIMIZATINON OF TRAINING SETS FOR HEBBIAN-LEARNING- BASED CLASSIFIERS

Semantic Segmentation with Histological Image Data: Cancer Cell vs. Stroma

Semi-Supervised GMM and DNN Acoustic Model Training with Multi-system Combination and Confidence Re-calibration

BUILDING CONTEXT-DEPENDENT DNN ACOUSTIC MODELS USING KULLBACK-LEIBLER DIVERGENCE-BASED STATE TYING

A JOINT MANY-TASK MODEL: GROWING A NEURAL NETWORK FOR MULTIPLE NLP TASKS

CS Machine Learning

NEURAL DIALOG STATE TRACKER FOR LARGE ONTOLOGIES BY ATTENTION MECHANISM. Youngsoo Jang*, Jiyeon Ham*, Byung-Jun Lee, Youngjae Chang, Kee-Eung Kim

arxiv: v1 [cs.cv] 10 May 2017

Human Emotion Recognition From Speech

IEEE/ACM TRANSACTIONS ON AUDIO, SPEECH AND LANGUAGE PROCESSING, VOL XXX, NO. XXX,

ON THE USE OF WORD EMBEDDINGS ALONE TO

TRANSFER LEARNING OF WEAKLY LABELLED AUDIO. Aleksandr Diment, Tuomas Virtanen

Introduction to Ensemble Learning Featuring Successes in the Netflix Prize Competition

arxiv: v1 [cs.cl] 27 Apr 2016

arxiv: v1 [cs.cl] 2 Apr 2017

Australian Journal of Basic and Applied Sciences

Word Segmentation of Off-line Handwritten Documents

Notes on The Sciences of the Artificial Adapted from a shorter document written for course (Deciding What to Design) 1

A Case Study: News Classification Based on Term Frequency

Statewide Framework Document for:

CSL465/603 - Machine Learning

arxiv: v1 [cs.lg] 20 Mar 2017

Rule Learning with Negation: Issues Regarding Effectiveness

Twitter Sentiment Classification on Sanders Data using Hybrid Approach

Ask Me Anything: Dynamic Memory Networks for Natural Language Processing

Speech Emotion Recognition Using Support Vector Machine

Activities, Exercises, Assignments Copyright 2009 Cem Kaner 1

Robust Speech Recognition using DNN-HMM Acoustic Model Combining Noise-aware training with Spectral Subtraction

Truth Inference in Crowdsourcing: Is the Problem Solved?

Getting Started with Deliberate Practice

Maximizing Learning Through Course Alignment and Experience with Different Types of Knowledge

Course Outline. Course Grading. Where to go for help. Academic Integrity. EE-589 Introduction to Neural Networks NN 1 EE

Softprop: Softmax Neural Network Backpropagation Learning

HIERARCHICAL DEEP LEARNING ARCHITECTURE FOR 10K OBJECTS CLASSIFICATION

Dialog-based Language Learning

INPE São José dos Campos

Dual-Memory Deep Learning Architectures for Lifelong Learning of Everyday Human Behaviors

SARDNET: A Self-Organizing Feature Map for Sequences

FBK-HLT-NLP at SemEval-2016 Task 2: A Multitask, Deep Learning Approach for Interpretable Semantic Textual Similarity

Pedagogical Content Knowledge for Teaching Primary Mathematics: A Case Study of Two Teachers

Improvements to the Pruning Behavior of DNN Acoustic Models

Deep search. Enhancing a search bar using machine learning. Ilgün Ilgün & Cedric Reichenbach

Reducing Features to Improve Bug Prediction

ADVANCES IN DEEP NEURAL NETWORK APPROACHES TO SPEAKER RECOGNITION

THE enormous growth of unstructured data, including

Machine Learning from Garden Path Sentences: The Application of Computational Linguistics

Product Feature-based Ratings foropinionsummarization of E-Commerce Feedback Comments

Exploration. CS : Deep Reinforcement Learning Sergey Levine

Experiments with SMS Translation and Stochastic Gradient Descent in Spanish Text Author Profiling

Classification Using ANN: A Review

Major Milestones, Team Activities, and Individual Deliverables

CS224d Deep Learning for Natural Language Processing. Richard Socher, PhD

On-Line Data Analytics

A Vector Space Approach for Aspect-Based Sentiment Analysis

DOMAIN MISMATCH COMPENSATION FOR SPEAKER RECOGNITION USING A LIBRARY OF WHITENERS. Elliot Singer and Douglas Reynolds

Unit Lesson Plan: Native Americans 4th grade (SS and ELA)

The open source development model has unique characteristics that make it in some

Learning From the Past with Experiment Databases

Transcription:

000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 Knowledge extraction from medical literature using Recurrent Neural Networks Abhimanyu Banerjee Department of Physics Stanford University manyu@stanford.edu Abstract The problem of extracting knowledge relationships from unstructured text has proved a challenge for NLP. We focus on extracting relationship information between drugs targeting bacteria from medical literature. Deep learning techniques have proved most fruitful of late in learning relationships from NLP tasks. We use a recurrent neural network architecture (LSTM) and use this to train on labeled sentences to decide whether a given relationship exists 1 Introduction Extracting knowledge and summarizing knowledge from reading unstructured text remains one of the large challenges in NLP. In this project I have focused on extracting medical relationships from bio-medical literature. A complete repository of relationships such as gene-gene, gene-drug, bacteria-drug will be extremely helpful for better understanding drug response[3]. The number of known and curated gene-gene relations is growing exponentially and is cataloged in databases such as BioGRID and ChEA. Medical literature itself is growing every year at a rapid rate and curating it by humans is too slow, so it would be really useful if we had a tool that could automatically curate these relationships for us. To be a little more concrete, I have focused on extracting relationships between drugs targeting bacteria. If we are given a sentence with a drug and a bacteria, we want to be able to say whether the drug has any action in targeting the bacteria. Deciding this is a challenge as context matters a lot. Below are two examples to illustrate this point. Figure 1: Drug(Levifloxacin) targets bacteria(s.maltophilia) is a a positive example The first example is a clear sentence from which we can read and say that Levifloxacin definitely targets the bacteria S.maltophilia. The second example is vague and there is no clear evidence of Ipipenem acting on Escherichia Coli. We want to learn examples such as the first and pick out such relationships(ie. Levifloxacin acts on S.maltophilia) and ignore examples such as the second as it does not reveal anything insightful. Deep learning approaches have been applied to several NLP tasks such as language modeling[4], sequence to sequence learning[5] with great successes. The natural architecture for learning on sequences is a reccurent neural network (RNN) or some variant of it. We use an LSTM architecture to learn on our data. 1

054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 Figure 2: Ipipenem and Escherichia Coli. It is not clear what their relationship is. A negative example 2 Dataset and pre-processing data Since there is not dataset of labeled sentences with drugs targeting bacteria, I had to create my own dataset for this purpose. I used the tool called [6]ddlite developed by Chris Re s group which is useful in rapid prototyping and extracting relations. Ddlite was very useful in setting up the dataset. I first downloaded a corpus of 14388 articles containing bacteria and drug mention keywords from Pubmed central. After downloading this, I extracted all sentences that contain both a drug name and a bacteria name from a dictionary match. I got a total of 7001 such sentences. We call such a sentence as a relation mention. The relation-mentions now need to be labeled with a positive or a negative label depending on whether they exhibit a target sort of relationship between the drug and the bacteria or not. To do this, we must write rules which we call Labeling functions in ddlite. Each Labeling function is a rule that assigns the sentence a +1 label if the relation exhibited meets the condition of a positive target relation, labels 1 if the sentence meets the condition of a negative relation and 0 if the labeling function is not conclusive and can not decide. These rules have to be designed well to pick out good examples as we do not want to add noisy labels which will affect our final training. We also want large coverage ie. our rules should be able to give a +1 or a 1 label to a large fraction of our data set. We do not want too many 0 labels as these are useless for training. I have written several rules(59 of them) that do labeling and got a coverage of about 60%, ie. I am able to label 60% of these sentences with a positive or a negative label. Some examples of labeling functions are: If we find the words target, degrade, infect, conducive in the sentence between the drug and bacteria, mark these sentences with a +1. Some examples of negative labeling functions: If the bacteria and drug are too far apart in the sentence, separated by > 20 tokens, mark it with a 1 as it is unlikely they have any relation. Often also things like chemical elements and nucleotides are mentioned as drugs, mark these as negative examples as well. Finally it may happen that a sentence may have several different labels, because of different labeling functions clashing. In this case we take a majority vote and assign a single label to the sentence. After doing this I finally generated a computer labeled dataset of 2157 sentences. Of this 906 have the label +1 and 1251 have the label 1. We hope that this dataset is good enough for training a deep learning model that would capture language features and from that learn what a postive or a negative example would look like. I split this dataset to 1600 for training, 300 for testing hyper-parameters and 257 for my development set. 2.1 pre training word-vectors I created a vocabulary of word embedding trained specifically for this task on Medical literature. I used a subset of the Medline corpus containing several thousand medical abstracts. The size of this corpus in all was 1.5GB and I got it from the lab I work in (Russ Altman s lab). The word vectors were trained using Tensorflows version of word2vec with skipgram and throwing out ultra rare tokens which occur < 5 times in the corpus. The dimension of the word embeddings is 128. Since the word embeddings generated contain both bacteria and drugs, I first did an initial experiment to see if there is any clustering of concepts ie. do well formed concepts such as a bacteria and a drug emerge from these word embeddings and can we visualize them? I plotted the 2D PCA of 2

108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 the top 100 most frequently occuring drugs and bacteria for this purpose. Figure 3: 2D PCA of top 100 most frequent bacteria and drugs. Bacteria are in red and drugs are in blue The word embedding do not cluster well on meaning. As you can see from the figure, the clusters overlap a lot. The data-set for training word vectors is probably not large enough to have formed these well developed concepts. 3 Approach We use the recurrent neural network architecture framework because this is what is quite natural when you have sequential data. RNNs are very successful in learning on large sequences and modeling the sequences. We use a popular version of the RNN called as the LSTM (long short term memory) 3.1 Model-LSTM recurrent neural networks: The LSTM (long short term memory ) are a modified kind of recurrent neural networks. They were introduced by Hochreiter and Schmidhuber (1997)[7], and have been successfully used by many people in following work. They work tremendously well on a large variety of problems, and are now widely used. Vanilla RNN s can learn long term dependencies in principle but do not work well in practice. This is because they suffer from the problem of vanishing and exploding gradients. The LSTM solves this problem elegantly by defining a cell state that is a linear combination of a new state and the previous state. This allows it to remember information across several time steps and in practice has much better performance. The wonderful review article by Christopher Olah explains the concepts behind LSTM quite well [2]. The basic structure of the LSTM is shown in the picture below in figure 4: The state of the LSTM is referred to by the symbol C t This is updated at every step according to the update rules. The final hidden state h t is got from the cell state. 3.2 The LSTM update equations: The LSTM has 3 gates, a forget gate, an input gate and an output gate. The forget gate controls how much of the previous state we want to keep, the input gate regulates how important the current input information is and the output gate regulates the output. It is best understood by the equations: f t = σ(w f.[h t 1, x t ] + b f ) (1) Here f t is the forget gate, W f R (n n) and b f R (n). Similarly we also have an input gate and an update state: i t = σ(w i.[h t 1, x t ] + b i ) (2) C t = T anh(w c [h t 1, x t ] + b c ) (3) 3

162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 Figure 4: An unrolled LSTM recurrent neural network Here as before W i R (n n),w c R (n n),b i R (n),b c R (n) The input and forget gates act to determine how much of the old state to forget and how much of the new state to use to develop the output state. C t = f t C t 1 + i t C t (4) o t = σ(w o.[h t 1, x t ] + b o ) (5) h t = o t T anh(c t ) (6) Finally the output gate acts on the final state to produce the current hidden state. The output gate controls what it decides is important to outputted to the hidden state. Of course W o R (n n) and b o R (n) It is the final hidden state that we are interested in. The complicated dynamics of creating this state allows the LSTM to solve the vanishing, exploding gradient problems and learn well over long time steps. We finally feed the final hidden state to a softmax layer (with two output states) and train the neural network with the Cross Entropy cost for the Softmax layer. 4 Experiment: We train the LSTM using the cross entropy cost of the final hidden state. I modified a version of the LSTM code available to train MNIST [8]. Since tensorflow requires you to enter the number of steps in an RNN from before, you need to pad the sentences to a fixed length. What this means is that a special PAD symbol must be introduced in the embedding which is a zero vector. All shorter sentences than the padded length must have the PAD symbol at the end to make it of the fixed length. Larger sentences will get cut off. The average length of a sentence in my dataset was 38 tokens. The padded length is a hyper parameter that must be varied to get optimum performance. 4.1 Values of the hyper parameters used and tuned Each word in the dictionary has a fixed length of 128. The dimension of the hidden state is 200.Performance did not change with changing it to 256 Total epochs : 15 or 20 Number of steps is varied between 10 to 150. The average sentence length is 38 Learning rate :.001 Batch size : 30 I used the Adam optimizer to optimize. 4

216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 5 Results: Since my training set is small (1800) sentences, the model overfits on the training data. The model is quite sensitive to the length of the padded sentence used (the number of steps). I got the best performance for number of steps equal to 50 with a classification accuracy of 65% on the dev. set. I have plotted the performance of the classification algorithm on the dev. set as a function of the number of steps used in figure5. Figure 5: Classification accuracy on the dev set as a function of the number of steps used It is interesting that we have a peak performance near the average sentence length of my data. Very small lengths are expected to be bad as we cut off too much information. Very long sentence lengths get confused on the shorter sentences as they have too many trailing zeros from the padding. Due to this they get stuck in local minima that they can t come out of and do not have good performance. I have also plotted the dev set accuracy as a function of number of training epochs. This turned out to be quite instructive and we can see how the sentences which are padded to larger lengths get stuck in local minima of the cost during training and the accuracy does not change much(unless it jumps abruptly out of the minima) The shorter padded sentence length of 65 shows increasing accuracy (on dev set) with training epochs. The large padded length of 150 shows no improvement from one epoch to the next. It is stuck in local minimas. However it jumps out of one local minima only to be stuck in another. 6 Conclusions Our LSTM model is clearly able to learn as we have about 65% classification on the dev.set. However we are limited by our data which is computer generated so, we do not know whether it is learning actual relationships or just fitting the rules I have defined with my labeling functions. It will be amazing to have a good human labeled dataset for this purpose. Acknowledgments I really wish to thank my friend Raunaq for helping out with the project and homework. This course would not have been as much fun without his help. I also want to thank Emily Mallory for helping me learn ddlite and being a mentor. Thanks to Yuhao Zhang for giving me the medline data to train word vectors and being there to discuss different deep learning models. 5

270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 Figure 6: Classification accuracy on the dev set as a function training epoch and sentence length= 65 Figure 7: Classification accuracy on the dev set as a function training epoch and sentence length= 150. Note how the accuracy randomly jumps from one local minima to another References [1] Wojciech Zaremba & Ilya Sutskever & Oriol Vinyals (2014) Recurrent Neural Network Regularization arxiv:1409.2329 [2] Christopher Olah -Understanding LSTM Networks http://colah.github.io/posts/2015-08-understanding- LSTMs/ [3] Emily Mallory & Ce Zhang & Chris Re & Russ Altman(2015) Large-scale extraction of gene interactions from full-text literature using DeepDive Bioinformatics first published online September 3, 2015 doi:10.1093/bioinformatics/btv476 6

324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 [4]Tomas Mikolov & Martin Karafiat & Lukas Burget & Jan Honza Cernocky & Sanjeev Khudanpur - Recurrent neural network based language model INTERSPEECH. Vol. 2. 2010 [5]Sutskever Ilya & Oriol Vinyals and Quoc V. Le. Sequence to sequence learning with neural networks. Advances in neural information processing systems. 2014. [6]DDLITE by Chris Re et. al https://github.com/hazyresearch/ddlite [7]Hochreiter, Sepp, & Jrgen Schmidhuber. Long short-term memory. Neural computation 9.8 (1997): 1735-1780. [8]https://github.com/aymericdamien/TensorFlow-Examples 7