<!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>NLPRL@INLI-2018: Hybrid gated LSTM-CNN model for Indian native language identi cation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rajesh Kumar Mundotiya</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manish Singh</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anil Kumar Singh</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science and Engineering</institution>
          ,
          <addr-line>IIT(BHU), Varanasi</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Linguistics</institution>
          ,
          <addr-line>BHU, Varanasi</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Native language identi cation (NLI) focuses on determining the native language of the author based on the writing style in English. Indian native language identi cation is a challenging task based on users comments and posts on social media. To solve this problem, we present a hybrid gated LSTM-CNN model to solve this problem. The nal vector of a sentence is generated at hybrid gate by joining the two distinct vector of a sentence. Gate seeks the optimum mixture of the LSTM and CNN level outputs. The input word for LSTM and CNN are projected into high-dimensional space by embedding technique. We obtained 88.50% accuracy during training on the provided social media dataset, and 17.10% is reported in the nal testing done by Indian native language identi cation (INLI) workshop organizers.</p>
      </abstract>
      <kwd-group>
        <kwd>Bi-LSTM</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CNN
Glove.</p>
    </sec>
    <sec id="sec-2">
      <title>Introduction</title>
      <p>It was publicly used for prediction of native language of learner based on his/her
writing style. It was released in 2002 and updated in 2009.</p>
      <p>In the following sections; we mentions related work in Section 2, we describe
the proposed model and training procedure in Section 3, we show the result and
analysis in Section 4 and nally, draw conclusion in Section 6.
2</p>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>
        Native language identi cation is a new and signi cant problem. Language
learners are prone to make mistakes similarly if machines can learn the same
tendencies of making mistakes then it may help in developing systems for educational
domain. Several researchers worked on this problem and similar problem like
second language acquisition. One of the earliest work, Tomokiyo and Jones (2001)
tried to discriminate non-native statements from native statements, written in
English by Nave Bayes [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Kochmar et al. (2011) has performed experiments on prediction of the native
languages of Indo-European learners. He treated this problem as binary classi
cation and use linear kernel SVM. The features used for prediction were n-grams
and words. Also, The errors were tagged manually within the corpus [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Besides
this, some other [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] also used the SVM with di erent features.
In the recent past, word embedding and document embedding has gained much
attention along with other features. Vector representations for documents were
generated with distributed bag-of-words architectures using Doc2Vec tool. The
authors developed a native language classi er using document and word
embedding with an accuracy of 82% for essays and 42% on speech data [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Yang et
al. (2016) have purposed hierarchical attention network for classi cation
problem. They required vast corpus size attend the signi cant word and sentence by
attention mechanisms [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Kim (2014) used the convolutional neural network
and got a state-of-the-art accuracy, but it can hold contextual information till
window-size. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
In 2017 another shared task on NLI was organized. The corpus included essays
and transcripts of utterances. According to Malmasi et. al. (2017), the ensemble
methods and meta-classi ers with syntactic or lexical features were the most
e ective systems [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-4">
      <title>Model Description</title>
      <p>The model architecture is showed in gure 1.</p>
      <p>Each document includes m sentences and each sentence within a document
consists of n words. The word level input wi n projected into high-dimensional
vector space with the help of pretrained glove English word embedding, wi n2&lt;k,
where k is word vector's dimension, i and n represents sentence and word
respectively. The word level input is converted into sentence level input by using a
bidirectional LSTM. This is achieved by linearly combining the last hidden state
of forward and backward LSTM.</p>
      <p>
        xswtord = Wsf hsft + Wsrhrst + bs
Where, st 2 S, S is the total sentences in a document and hsft; hrst 2 &lt;k are
the forward and backward LSTM's end hidden states, respectively. wf ; wr
s s 2
&lt;k k and bs 2 &lt;k are trainable parameters and xswtord 2 &lt;k is the nal vector
representation of the sentence st. Similarly, with the help of bidirectional LSTM,
we will retrieve the single vector representation of the document. It will take
vector representation of the sentences [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] as input.
      </p>
      <p>
        xdwtord = Wdf hfdt + Wdrhrdt + bd
Where dt2D, D is the number of documents which is composed of the
combination of the last hidden state of the forward and backward LSTM, represented by
hfdt; hrdt 2 &lt;k respectively. wdf ; wdr 2 &lt;k k and bd 2 &lt;k are trainable parameters
and xdwtord 2 &lt;k is the nal vector representation of the sentence dt.
Convolutional neural network [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] helps to extract features by applying
convolving lters on input word vector. Let wt2&lt;k, where kth is the dimensional vector
like to the ith word in the document. A document length of length n m is
represented as:
(1)
(2)
w1:n m = w1
      </p>
      <p>A convolution operation involves a lter and the size of this lter size shows
h-gram of words. The lter moves over the entire document fw1:h; w2:h+1; ::::
; wn m h+1:n mg and generate features fc1; c2; ::::; cn m h+1g. These generated
features produce a feature map c.</p>
      <p>c = [c1; c2; ::::; cn m h+1]
(4)
Now we want to extract most important feature from feature map, so we apply
max-over-pooling on this feature map that gives maximum value ^c= maxfcg
as the feature crossponding to this particular lter. This process extracts one
feature from one lter. This model uses multiple lters with di erent h-gram to
extract multiple features. These di erent extracted features concatenated and
atten before passing in the dense layer. We have D documents, for each
document the entire process is repeated. The nal vector representation of the
sentence dt is xcdhtar2&lt;k where dt2D.</p>
      <p>The assumption is that, bidirectional LSTM can capture the entire document
features regarding language model into xdwtord and n-gram features for
convolutional neural network into xcdhtar. If both combine, then it may help to distinguish
the Indian languages. The gated word-char layer combines these two types of
vector generation from bidirectional LSTM and convolutional neural network. The
process of mixing generated vectors xdwtord and xcdhtar is done by gate gdt, where
gdt is also a dense layer with sigmoid activation function.</p>
      <p>
        gdt = (vgT xdwtord + bg)
xdt = (1
gdt)xdwtord + gdtxdt
char
Where vg2&lt;d and bg2&lt; are, weight vector and bias respectively which are
trainable parameters. Miyamoto and Cho (2016) applied this approach at word
level on language model to handle out-of-vocabulary and unusual words [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
Hashimoto and Tsuruoka (2016) has also applied a very similar approach on
compositional and non-compositional phrase embedding and achieved
state-ofthe-art score on verb disambiguation and compositionality detection tasks [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
The features from the gated word-char layer pass to the dense layer with softmax.
The output is the probability distribution over languages.
      </p>
      <p>p = sof tmax(vsT xdt + bs)
Where vs and bs are, weight vector and bias respectively which are trainable
parameters.
(5)
(6)
(7)
4
4.1</p>
    </sec>
    <sec id="sec-5">
      <title>Experiment</title>
      <sec id="sec-5-1">
        <title>Dataset</title>
        <p>We have evaluated our model on the dataset provided by the task organizers.
The dataset contains English comments of Facebook users. English comments
are written in native language by users whose native language includes Bengali
(BE), Hindi (HI), Kannada (KA), Malayalam (MA), Tamil (TA) and Telugu
(TE). The statistics of the train dataset are summarized in Table 1. We divided
the training dataset into training and validation data in the ratio of 90:10.</p>
      </sec>
      <sec id="sec-5-2">
        <title>Model con guration and training</title>
        <p>The given dataset is preprocessed to remove multiple occurrences of punctuation
symbols which occurred in between the sentences or at the end of the sentences.
Periods, question marks and exclamation marks are some of the punctuation
symbols that occurred in the available dataset. Punctuation symbols present at
the end of the sentence de nes the sentence boundary hence such kinds of
repeated symbols are replaced by single symbol. There were some occurrences of
emojis which are also removed. After preprocessing the obtained list of words
is lemmatized4 to obtain the root word using the grammatical rules of the
concerned language. There is variation in the occurrence of number of sentences and
number of words in a sentence for di erent language document. To overcome this
issue, we perform padding.</p>
        <p>Each word is represented in 100 dimensions vector using pre-trained glove
embedding. Glove embedding 5 is trained on 6 billion tokens of the combination of
Gigaword5 + Wikipedia2014 dumps. Some words are not present in glove
embeddings, which are represented by the glove vector dimension of random uniform
distribution range from -1 to +1. We have set 20 as maximum document length
and 300 as maximum sentence length. Number of hidden units is xed as 100 for
each directional layer at sentence level and document level. The convolutional
neural network uses three convolutional layer whose lter size is 2, 3 and 5
respectively however stride size is xed as 1 for all convolutional layer. A dense
layer of the convolutional neural network has 100 hidden units that represents a
document. We have 6 prediction classes (HI, BE, KA, MA, TA, TE), so number
of hidden units in nal prediction layer will be based on number of prediction
classes.
4 https : ==www:nltk:org=modules=nltk=stem=wordnet:html
5 https://nlp.stanford.edu/projects/glove/</p>
        <p>The entire network is trained by Adam optimizer with epoch and mini-batch
size of 15 and 10 respectively. Model is implemented on GeForce 840 GPU using
keras 6 neural network library.
5</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Result and Analysis</title>
      <p>The task organizers evaluated the model on di erent metrics such as precision,
recall and F-score for each language with overall accuracy. Two di erent test
sets are provided for evaluating the model. The number of document in test set1
and test set2 are 783 and 1185 respectively. The obtained result is given in Table
2. We obtain the overall accuracy of 15.3% for test set1 and 17.1% for test set2
Indian native language identi cation. Our model retrieved more relevant
documents for Tamil language as compared to other languages during testing phase.
For Hindi and Tamil language, our model achieves highest F1-score for Testset1
data.</p>
      <p>We obtained accuracy of 88.5% on training dataset however there is signi cant
drop in the result during the testing phase which indicates over- tting as a
probable reason. There is signi cant di erence in the number of documents shared
for the training and testing phase. Considering the size of trainable data used
during the training phase, our model was unable to predict more generalized
features due to this large number of random word embeddings were formed which
inturn re ects poor results during the testing phase.
6 https://keras.io/
The purposed hybrid gated LSTM-CNN model for identifying the Indian
native languages, namely Bengali, Hindi, Kannada, Malayalam, Tamil and Telugu,
posted on social media in English by the native speaker of those languages.
Each document is represented in a vector by combining the output obtained
using bidirectional-LSTM and convolutional neural network. We obtained better
accuracy in test set2 data as compared to the accuracy obtained in the test set1
data. The proposed system can be improved by applying hybrid gated
LSTMCNN model at word level instead of document level with dropouts.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Anand</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Barathi</given-names>
            <surname>Ganesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.B.</given-names>
            ,
            <surname>Singh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            ,
            <surname>Soman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.P.</given-names>
            ,
            <surname>Rosso</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <article-title>Overview of the INLI PAN at FIRE-2017 track on Indian native language identi cation (</article-title>
          <year>2017</year>
          ) CEUR Workshop Proceedings,
          <year>2036</year>
          , pp.
          <fpage>99</fpage>
          -
          <lpage>105</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Tomokiyo</surname>
            ,
            <given-names>L. M.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Jones</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>2001</year>
          , June).
          <article-title>You're not from'round here, are you?: naive Bayes detection of non-native utterance text. In Proceedings of the second meeting of the North American Chapter of the Association for Computational Linguistics on Language technologies</article-title>
          (pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          ).
          <article-title>Association for Computational Linguistics</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kochmar</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Identi cation of a writers native language by error analysis (Doctoral dissertation</article-title>
          ,
          <source>Masters thesis</source>
          , University of Cambridge).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mechti</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abbassi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Belguith</surname>
            ,
            <given-names>L. H.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Faiz</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          (
          <year>2016</year>
          ,
          <article-title>November)</article-title>
          .
          <article-title>An empirical method using features combination for Arabic native language identi cation</article-title>
          .
          <source>In Computer Systems and Applications (AICCSA)</source>
          ,
          <year>2016</year>
          IEEE/ACS 13th International Conference of (pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          ). IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Kosmajac</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Keselj</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>DalTeam@ INLI-FIRE-2017: Native Language Identi cation using SVM with SGD Training</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>118</fpage>
          -
          <lpage>122</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Vajjala</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Banerjee</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>A study of N-gram and Embedding Representations for Native Language Identi cation</article-title>
          .
          <source>In Proceedings of the 12th Workshop on Innovative Use of NLP for Building Educational Applications</source>
          (pp.
          <fpage>240</fpage>
          -
          <lpage>248</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Malmasi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Evanini</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cahill</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tetreault</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pugh</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hamill</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , ... &amp;
          <string-name>
            <surname>Qian</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>A report on the 2017 native language identi cation shared task</article-title>
          .
          <source>In Proceedings of the 12th Workshop on Innovative Use of NLP for Building Educational Applications</source>
          (pp.
          <fpage>62</fpage>
          -
          <lpage>75</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Miyamoto</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Gated word-character recurrent language model</article-title>
          .
          <source>arXiv preprint arXiv:1606</source>
          .
          <fpage>01700</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Hashimoto</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Tsuruoka</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Adaptive joint learning of compositional and non-compositional phrase embeddings</article-title>
          .
          <source>arXiv preprint arXiv:1603</source>
          .
          <fpage>06067</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dyer</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>He</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Smola</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Hovy</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Hierarchical attention networks for document classi cation</article-title>
          .
          <source>In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies</source>
          (pp.
          <fpage>1480</fpage>
          -
          <lpage>1489</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>Convolutional neural networks for sentence classi cation</article-title>
          .
          <source>arXiv preprint arXiv:1408</source>
          .
          <fpage>5882</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Anand Kumar</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barathi Ganesh</surname>
            <given-names>B</given-names>
          </string-name>
          and
          <string-name>
            <surname>Soman K P.</surname>
          </string-name>
          <article-title>"Overview of the INLI@FIRE-2018 Track on Indian Native Language Identi cation</article-title>
          .
          <source>In: In workshop proceedings of FIRE</source>
          <year>2018</year>
          , FIRE-2018, Gandhinagar, India, December 6-9, CEUR Workshop Proceedings.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>