<!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>
      <journal-title-group>
        <journal-title>FIRE</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Classi cation of Insincere Questions using SGD Optimization and SVM Classi ers</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Akshaya Ranganathan</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Haritha Ananthakrishnan</string-name>
          <email>haritha16038g@cse.ssn.edu.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thenmozhi D</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chandrabose Aravindan</string-name>
          <email>aravindancg@ssn.edu.in</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of CSE, SSN College of Engineering</institution>
          ,
          <addr-line>Chennai</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <volume>12</volume>
      <fpage>12</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>The burgeoning of online question and answer forums like Quora, Stack Over ow, etc. has helped answer millions of questions across the globe. However, this also simultaneously engendered the problem of Insincere Questions. Insincere questions are those that have a nonneutral undertone with no intention of seeking useful answers. The Classi cation of Insincere Questions task at FIRE 2019 did not just focus on binary classi cation of insincere questions, but went a step further and introduced a ne-grained classi cation of 6 labels, namely: rhetorical, hate speech, sexual content, hypothetical, other and sincere questions. The solution o ered by SSN NLP used a 2 level approach. The fundamental level comprised of SGD optimized SVM Classi cation model. In addition to this, the corpus was ltered based on frequently occurring, relevant keywords. This approach produced an accuracy of 48% With millions of questions being asked daily across myriad Q &amp; A platforms, there is a pressing need to eliminate redundant and potentially dangerous insincere questions. The sheer volume of questions asked every single day makes it a mammoth task for human moderators. Question forums such as Quora, Stack Over ow and Yahoo Answers used to deploy methods to manually weed out such insincere questions before the advent of Machine Learning and Natural Language Processing. If left unchecked, these questions can cause serious issues to the platform as well as the general morale of the users. Such insincere questions may even lead to a drastic decrease in the number of users or in some cases,</p>
      </abstract>
      <kwd-group>
        <kwd>Classi cation</kwd>
        <kwd>Insincere Questions</kwd>
        <kwd>SVM Classi er</kwd>
        <kwd>SGD</kwd>
        <kwd>Optimizer</kwd>
        <kwd>Relevant Keywords</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>or can negatively impact several users. Thus identi cation of Insincere questions
is cardinal. The data provided is an enhanced subset of the dataset provided by
Quora. The Quora dataset consists of 2 labels. The CIQ dataset consists of 6
labels of questions: - Rhetoric, Hate Speech, Sexually objectionable,
Hypothetical, Sincere and other questions. This ne-grained classi cation aims at not just
better identi cation of such questions but also providing tting countermeasures
for each type of question. SSN NLP proposed a supervised learning approach.
The solution is twofold: On the root level is SGD optimized SVM Classi er after
vectorizing. This solution is further re ned by ltering using the most relevant
keywords of the Hate Speech and Sexually objectionable content categories. The
overall accuracy of the model is around 53%.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Works</title>
      <p>
        Classi cation of insincere questions was originally an online competition hosted
by Kaggle: a platform for data scientists to implement Machine Learning
concepts and engage in a world-wide competition with other data scientists,
powered by Quora [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. This task mandated the use of word embedding models such
as GloVe and Word2Vec for text vectorization and had over 1400 submissions.
Cross-industry standard process for data mining (CRISP -DM) was used
by one of the teams in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], which is a life cycle model of knowledge discovery,
such as KDD. They used a combination of Logistic Regression and Naive Bayes
classi ers, support vector machines, Decision Trees and Random Forrest
algorithms for their modeling. A Deep Learning approach with Gated Recurrent
Units (GRU) was deployed by [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] in addition to supervised learning
methodologies. Apart from question forums, mass social networking sites like Twitter
and Facebook are being monitored for posts that are ironical, or pose as any
kind of security threat [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Our work involves the use of SGD Optimization and
TF-IDF Vectorization, with an additional layer of relevant keyword extraction
mechanisms.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Dataset Analysis and Preprocessing</title>
      <p>The training data released by FIRE 2019's CIQ task included 899 user's
questions that were assigned label belonging to 6 target values, whose distribution is
given in Table.1 The main challenge of data preprocessing was removing
stopwords and converting the text to lower case for uniformity.</p>
      <p>{ Text tokenization was performed using NLTK 2 toolkit, to divide the
sentence into words, which were later compared with a stop-word list. NLTK
English stopword list was used for this purpose.
{ In addition to this, punctuation marks, special characters, and
numbers were removed using regular expressions, as a consequence of text
tokenization.
2 https://www.nltk.org/
{ Since online questions contain numerous amounts of contractions such as
can't, won't, etc. (See Fig .1) and misspelled words such as "beleived "
we wanted to eliminate the fallacious e ect they would have on the overall
accuracy if they were considered as separate words. Contracted words were
expanded to their actual meaning, and misspelled words were corrected using
pre-de ned lists.
{ The Porter-Stemmer stemming algorithm was used to link any particular
word to its root. For example, the words speaking and speaks both are
derived from the root word speak. Hence, it would be much more practical
for the model to understand any derivatives of a root word, as the root itself
to evade discrepancies relating to the weight vectors of words.</p>
    </sec>
    <sec id="sec-4">
      <title>Methodology and Implementation</title>
      <p>
        The model used TF-IDF vectorizer [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Term Frequency (TF) implies the ratio
of the number of times a word is occurring in a document to the total number
of words in the document. It gives a measure of the frequency of a term in a
document. However, words like the will have a higher term frequency, but they
have little importance in the document. This problem is solved by using the
Inverse Document Frequency (IDF). IDF gives a measure of the occurrence of
a term across all documents of the corpus. The model uses Stochastic Gradient
Descent Optimiser upon Support Vector Machine Classi er (SVM) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. SGD was
the preferred choice of optimizer as it works relatively e ciently even in large
datasets, as the gradient of the loss is estimated one sample at a time, which is
randomly shu ed for performing the iteration. For a use case like the classi
cation of Insincere questions, this would prove e cient and scalable. Further, a
relevant keyword identi cation layer was added that scanned the training data
and extracted unique words that were not in the stop word list. Using sklearn's
Count Vectorizer, frequently occurring keywords for the labels Hate Speech,
and Sexual Content was obtained. Keywords for classes such as Hypothetical and
Rhetoric questions could not be easily distinguished from other English words,
and thus were not taken into consideration to avoid False positives.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Result Analysis</title>
      <p>The dataset contained 899 rows and 6 labels. The distribution of data amongst
the labels was widely varied ranging from about 488 questions for the Rhetoric
question category to a meager 20 questions in the Sincere Question category. This
distribution was re ected in the models performance. The model performed with
an accuracy of about 47.52%. A closer analysis of the results indicates that the
model performed well in identifying rhetoric questions. However, it was not able
to identify questions in the Sincere and other question category. These categories
had the least training data share. Moreover, the model also used a second layer
of ltering based on relevant keywords for the hate speech and sexually
objectionable question categories. The overall accuracy of the model can be improved
by having a more evenly distributed dataset. Some categories had extremely
few questions which proved any kind of re-sampling method futile. Yet another
direction to focus on while improving accuracy is to build e cacious lists of
keywords for each category. The distribution of predicted labels for our model
is given in Fig. 2, where the diagonal elements are the True Positives.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and future works</title>
      <p>Classi cation of insincere questions is a concept that will bene t not only social
media Q&amp;A platforms but also its users. It helps ensure the virtual safety of
its users and creates a neutral environment. It is also a cost-e ective, and
timee cient method, as it involves limited manpower as opposed to extant methods
of content quality assurance. Our team, SSN NLP used a supervised learning
model and produced an accuracy of 47.52%. Future developments for our model
would include
1. Using a pre-trained word embedding model such as Google's BERT to
improve our F1 scores.
2. Applying semi-supervised learning techniques to deal better with smaller
datasets</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Mungekar</surname>
            , Akshay, Nikita Parab, Prateek Nima, and
            <given-names>Sanchit</given-names>
          </string-name>
          <string-name>
            <surname>Pereira</surname>
          </string-name>
          .
          <article-title>"Quora Insincere Questions Classi cation</article-title>
          .
          <source>"</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Gaire</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rijal</surname>
            <given-names>B</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gautam</surname>
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sharma</surname>
            <given-names>S</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lamichhane</surname>
            <given-names>N.</given-names>
          </string-name>
          <article-title>Insincere Question Classication Using Deep Learning</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Qaiser</surname>
            , Shahzad &amp; Ali,
            <given-names>Ramsha.</given-names>
          </string-name>
          (
          <year>2018</year>
          ). Text Mining:
          <article-title>Use of TF-IDF to Examine the Relevance of Words to Documents</article-title>
          .
          <source>International Journal of Computer Applications</source>
          .
          <volume>181</volume>
          . 10.5120/ijca2018917395
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Robbins</surname>
            <given-names>H</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Monro S</surname>
          </string-name>
          .
          <article-title>A stochastic approximation method</article-title>
          .
          <source>The annals of mathematical statistics. 1951 Sep</source>
          <volume>1</volume>
          :
          <fpage>400</fpage>
          -
          <lpage>7</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Kaggle</given-names>
            <surname>Inc</surname>
          </string-name>
          .
          <year>2019</year>
          .
          <article-title>Quora Insincere Questions Classi cation: Detect toxic content to improve online conversations</article-title>
          . https://www.kaggle.com/c/ quora-insincere
          <article-title>-questions-classification</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Deshwal</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sharma</surname>
            <given-names>SK</given-names>
          </string-name>
          .
          <article-title>Twitter sentiment analysis using various classi cation algorithms</article-title>
          .
          <source>In2016 5th International Conference on Reliability</source>
          ,
          <article-title>Infocom Technologies and Optimization (Trends and Future Directions)(ICRITO) 2016 Sep 7</article-title>
          (pp.
          <fpage>251</fpage>
          -
          <lpage>257</lpage>
          ). IEEE.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>