<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>CSaRUS-CNN at AMIA-2017 Tasks 1, 2: Under sampled CNN for text classification</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Arjun Magge</institution>
          ,
          <addr-line>MS</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Biomedical Informatics, Arizona State University</institution>
          ,
          <addr-line>Scottsdale, AZ</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department of Biostatistics and Epidemiology, University of Pennsylvania</institution>
          ,
          <addr-line>Philadelphia, PA</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Most practical text classification tasks in natural language processing involve training sets where the number of training instances belonging to each of the classes are not equal. The performance of the classifier in such a case can be affected by the sampling strategies used in training. In this work, we describe a cost sensitive and random undersampling variants of convolutional neural networks (CNNs) for classifying texts in imbalanced datasets and analyze its results. The classifier proposed in this paper achieves a maximum F1-score of 0.414 placing 2nd on the ADR dataset and achieves a maximum F1-score of 0.652 placing 6th on the medication intake dataset.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>Method</title>
      <p>Input The datasets for the tasks contained tweets-ids and their respective categorical annotations. The first set of
annotations provided for the task was used as training dataset and the second set was used development/validation set.
The original texts were available for only about 40% of the annotations for Task-1 and 60% for Task-2. In Table 1, we
show the details the datasets for both tasks and their respective class distributions.</p>
      <p>Classifier For the CNN classifier used in this paper, we implemented our models based on the original CNN
architecture as proposed by Kim et. al. for sentence classification.10 We use this CNN architecture to construct cost
sensitive and random undersampling variants to tackle the class imbalance problem. The random undersampling
variant (Undersampling-CNN) is constructed by randomly sampling equal number of class-instances in each epoch. This
means that there are far fewer training instances in each epoch. The cost sensitive variant
For our experiments we use a fixed maximum sentence length of 50 words. All tweets with length less than 50 words
are padded with zeros. Sentences with more than 50 words are truncated. As pre-processing steps we tokenize each
tweet and normalize punctuations. For word embeddings, we use the word vectors generated using millions of tweets
containing drug names and made available by Sarker et. al.11 for mining health related data online.
Hyperparameters For experimentation we use filter sizes in the range of 1 to 5 words with the number of filters i.e.
model hidden dimensions in the range 50-150. The best models were obtained for filter combinations of 2,3,4 and 75
filters. A softmax cross-entropy function is used to compute the cost for optimization. For optimization, we use the
Adam Optimizer with a learning rate of 0.001.12 We employ dropout keep probability of 0.5 during training to prevent
overfitting.13 We also apply L2 regularization rate of 0.001 for training across 50 epochs. The model with the best
performance on the validation/development set is saved and used on the evaluation/test set. The Undersampling-CNN
had fewer training samples per iteration compared to training on the entire set. Hence, the Undersampling-CNN had to
be trained at half the learning rate i.e. 0.0005 and took around 40-50 epochs to arrive at the optimal model as compared
to 10-15 for CNN and CostSensitive-CNN models. Although we could add feature embeddings for each word in the
architecture, we do not add any task specific features.</p>
    </sec>
    <sec id="sec-3">
      <title>Results References</title>
      <p>In Table 2, we show the results for both tasks. For Task-1, the CostSensitive-CNN model was found to achieve the
best score. As described earlier, the Undersampling-CNN takes longer to train on all the randomized training samples
in majority class. However, the results did not show its improvement over the CNN or the CostSensitive-CNN model.</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion and Future Work</title>
      <p>In this work we evaluate a CNN classifer for detecting ADR and medication intakes as part of two shared tasks at
AMIA-2017. The classifiers presented in this work placed 2nd and 6th in tasks 1 and 2 respectively. As improvements
to the proposed classifiers, we would like to experiment with variants of cost sensitive training architectures in CNN
for tackling class imbalance problems as well as strategies to introduce controlled synthetic sentence variants for
oversampling the minority class.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Haibo</given-names>
            <surname>He</surname>
          </string-name>
          and
          <article-title>Edwardo A Garcia. Learning from imbalanced data</article-title>
          .
          <source>IEEE Transactions on knowledge and data engineering</source>
          ,
          <volume>21</volume>
          (
          <issue>9</issue>
          ):
          <fpage>1263</fpage>
          -
          <lpage>1284</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Shoushan</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Zhongqing</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>Guodong Zhou</surname>
          </string-name>
          , and
          <article-title>Sophia Yat Mei Lee</article-title>
          .
          <article-title>Semi-supervised learning for imbalanced sentiment classification</article-title>
          .
          <source>In IJCAI proceedings-international joint conference on artificial intelligence</source>
          , volume
          <volume>22</volume>
          , page
          <year>1826</year>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Xu-Ying</surname>
            <given-names>Liu</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jianxin Wu</surname>
          </string-name>
          , and
          <string-name>
            <surname>Zhi-Hua Zhou</surname>
          </string-name>
          .
          <article-title>Exploratory undersampling for class-imbalance learning</article-title>
          .
          <source>IEEE Transactions on Systems, Man, and Cybernetics</source>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>B</given-names>
          </string-name>
          (Cybernetics),
          <volume>39</volume>
          (
          <issue>2</issue>
          ):
          <fpage>539</fpage>
          -
          <lpage>550</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Xiao</given-names>
            <surname>Liu</surname>
          </string-name>
          and
          <string-name>
            <given-names>Hsinchun</given-names>
            <surname>Chen</surname>
          </string-name>
          .
          <article-title>Azdrugminer: an information extraction system for mining patient-reported adverse drug events in online patient forums</article-title>
          .
          <source>In International Conference on Smart Health</source>
          , pages
          <fpage>134</fpage>
          -
          <lpage>150</lpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Rachel</given-names>
            <surname>Ginn</surname>
          </string-name>
          , Pranoti Pimpalkhute, Azadeh Nikfarjam, Apurv Patki,
          <string-name>
            <surname>Karen</surname>
            <given-names>OConnor</given-names>
          </string-name>
          , Abeed Sarker,
          <string-name>
            <given-names>Karen</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and Graciela</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>Mining twitter for adverse drug reaction mentions: a corpus and classification benchmark</article-title>
          .
          <source>In Proceedings of the fourth workshop on building and evaluating resources for health and biomedical text processing</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Abeed</given-names>
            <surname>Sarker</surname>
          </string-name>
          ,
          <string-name>
            <surname>Karen</surname>
            <given-names>OConnor</given-names>
          </string-name>
          , Rachel Ginn, Matthew Scotch,
          <string-name>
            <given-names>Karen</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Dan</given-names>
            <surname>Malone</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Graciela</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>Social media mining for toxicovigilance: automatic monitoring of prescription medication abuse from twitter</article-title>
          .
          <source>Drug safety</source>
          ,
          <volume>39</volume>
          (
          <issue>3</issue>
          ):
          <fpage>231</fpage>
          -
          <lpage>240</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Abeed</given-names>
            <surname>Sarker</surname>
          </string-name>
          and
          <string-name>
            <given-names>Graciela</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>Portable automatic text classification for adverse drug reaction detection via multi-corpus training</article-title>
          .
          <source>Journal of biomedical informatics</source>
          ,
          <volume>53</volume>
          :
          <fpage>196</fpage>
          -
          <lpage>207</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Abeed</given-names>
            <surname>Sarker</surname>
          </string-name>
          , Rachel Ginn, Azadeh Nikfarjam,
          <string-name>
            <surname>Karen</surname>
            <given-names>OConnor</given-names>
          </string-name>
          , Karen Smith,
          <string-name>
            <given-names>Swetha</given-names>
            <surname>Jayaraman</surname>
          </string-name>
          , Tejaswi Upadhaya, and
          <string-name>
            <given-names>Graciela</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>Utilizing social media data for pharmacovigilance: A review</article-title>
          .
          <source>Journal of biomedical informatics</source>
          ,
          <volume>54</volume>
          :
          <fpage>202</fpage>
          -
          <lpage>212</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Ari</given-names>
            <surname>Klein</surname>
          </string-name>
          , Abeed Sarker, Masoud Rouhizadeh,
          <string-name>
            <surname>Karen O'Connor</surname>
            ,
            <given-names>and Graciela</given-names>
          </string-name>
          <string-name>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>Detecting personal medication intake in twitter: An annotated corpus and baseline classification system</article-title>
          .
          <source>BioNLP</source>
          <year>2017</year>
          , pages
          <fpage>136</fpage>
          -
          <lpage>142</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Yoon</given-names>
            <surname>Kim</surname>
          </string-name>
          .
          <article-title>Convolutional neural networks for sentence classification</article-title>
          .
          <source>EMNLP</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>Abeed</given-names>
            <surname>Sarker</surname>
          </string-name>
          and
          <string-name>
            <given-names>Graciela</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          .
          <article-title>A corpus for mining drug-related knowledge from twitter chatter: language models and their utilities</article-title>
          .
          <source>Data in brief</source>
          ,
          <volume>10</volume>
          :
          <fpage>122</fpage>
          -
          <lpage>131</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Diederik</given-names>
            <surname>Kingma</surname>
          </string-name>
          and
          <string-name>
            <given-names>Jimmy</given-names>
            <surname>Ba</surname>
          </string-name>
          .
          <article-title>Adam: A method for stochastic optimization</article-title>
          .
          <source>arXiv preprint arXiv:1412.6980</source>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Nitish</surname>
            <given-names>Srivastava</given-names>
          </string-name>
          , Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and
          <string-name>
            <given-names>Ruslan</given-names>
            <surname>Salakhutdinov</surname>
          </string-name>
          .
          <article-title>Dropout: a simple way to prevent neural networks from overfitting</article-title>
          .
          <source>Journal of machine learning research</source>
          ,
          <volume>15</volume>
          (
          <issue>1</issue>
          ):
          <fpage>1929</fpage>
          -
          <lpage>1958</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>