<!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>Simple Transformers in Rhetoric Role Labelling for Legal Judgements</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>B Sai Shridhar</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>S Kayalvizhi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>D Thenmozhi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>SSN College Of Engineering</institution>
          ,
          <addr-line>Chennai</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Legal case documents follow a common thematic structure with implicit sections like “Facts of the Case”, “Issues being discussed”, “Arguments given by the parties”, etc. These sections are popularly termed as "rhetoric roles". Knowledge of such semantic segments or roles will not only enhance the readability of the documents but also help in downstream tasks like computing document similarity, summarization, etc. The task is, given a legal document, to classify each sentence into 7 rhetoric roles. We compare ALBERT, BERT, RoBERTa and LaBSE for this task. The results show that BERT had the best accuracy at predicting the labels.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Legal documents</kwd>
        <kwd>Rhetoric labels</kwd>
        <kwd>BERT</kwd>
        <kwd>ALBERT</kwd>
        <kwd>RoBERTa</kwd>
        <kwd>LaBSE</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        In AILA 2020, the task of labelling rhetoric roles for legal judgments was solved by many
authors. In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] RoBERTa along with Bi-LSTM was used. In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] they combine TF-IDF features
and deep semantic features using BERT. Logistic regression, linear kernel SVM and AdaBoost
are used as classifiers. In [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] RoBERTa and a fully connected layer for classification was used.
In [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] they experiment with both TF-IDF features and BERT-based features for the task and
in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] they experiment with FastText and TF-IDF from the feature engineering aspect, and
Multi-layer perpceptron and Random Forest from the classifier aspect. From [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] we can see that
the RoBERTa and BERT transformers seem to be giving better performance.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Task &amp; Dataset Description</title>
      <p>The AILA 2021 Task 1 training data consists of 60 case documents. In each document the
sentences are labelled by one of the 7 categories:
1. Facts: sentences that denote the chronology of events that led to filing the case
2. Ruling by Lower Court: the cases in the dataset were given a preliminary ruling by
the lower courts (Tribunal, High Court etc.). These sentences correspond to the
ruling/decision given by these lower courts.
3. Argument: sentences that denote the arguments of the contending parties
4. Statute: relevant statute cited
5. Precedent: relevant precedent cited
6. Ratio of the decision: sentences that denote the rationale/reasoning given by the Supreme</p>
      <p>Court for the final judgement
7. Ruling by Present Court: sentences that denote the final decision given by the Supreme</p>
      <p>Court for that case document</p>
      <p>These documents were manually annotated by legal experts. In addition, we also included
the rhetoric labels of the AILA 2021 Task 2 dataset and the AILA 2020 Task 2 dataset. The labels
of these datasets were categorical variables so first we converted these variables to ordinal
encoded variables. In total we had 12170 text-label pairs to train the model.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Proposed Methodology</title>
      <p>
        The task involves the classification of sentences from legal case documents into 7 rhetoric roles.
We use the simpletransformers library to import the BERT, RoBERTa, LaBSE and ALBERT
transformers which we use as classifiers. We then select the 3 best models and measure the
macro F1, precision, and recall values to find the best suited classifier for the task.
4.1. BERT
BERT[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which stands for Bidirectional Encoder Representations from Transformers, is based
on Transformers, a deep learning model in which every output element is connected to every
input element, and the weightings between them are dynamically calculated based upon their
connection. BERT is designed to pre-train deep bidirectional representations from unlabeled text
by jointly conditioning on both left and right context in all layers. As a result, the pre-trained
BERT model can be fine-tuned with just one additional output layer to create state-of-the-art
models for a wide range of tasks, such as question answering and language inference, without
substantial task-specific architecture modifications.
      </p>
      <sec id="sec-4-1">
        <title>4.2. ALBERT</title>
        <p>The backbone of the ALBERT architecture is similar to BERT in that it uses a transformer
encoder (Vaswani et al., 2017) with GELU nonlinearities (Hendrycks &amp; Gimpel, 2016). The three
main diferences are:
• Splitting the embedding matrix into two smaller matrices using parameterized
factorization embeddings
• Cross layer parameter sharing
• Inter sentence Coherence Loss</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.3. RoBERTa</title>
        <p>
          RoBERTa stands for Robustly Optimized BERT Pre-training Approach. optimize the training
of BERT architecture in order to take lesser time during pre-training. It has almost similar
architecture as compare to BERT, but in order to improve the results on BERT architecture, the
authors made some simple design changes in its architecture and training procedure. These
changes are:
• Removing the Next Sentence Prediction Objective
• Training with bigger batch sizes and longer sequences
• Dynamically changing the masking pattern
4.4. LaBSE
LaBSE [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] stands for Language-Agnostic BERT Sentence Embedding. The architecture is based
on a Bidirectional Dual-Encoder (Guo et. al.) with Additive Margin Softmax (Yang et al.) with
improvements.It produces language-agnostic sentence embeddings for more than 100 languages
in a single model. The model is trained to generate similar embeddings for bilingual sentence
pairs that are translations of each other.
        </p>
        <p>We use these models as Multiclass Classification Models with the default parameters given by
simple transformers.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Results</title>
      <p>The BERT, ALBERT, RoBERTa and LaBSE classifiers are compared using their mcc scores and
evaluation loss on an evaluation data set. The results are shown in Table 1. The 3 best runs are
chosen for predicting the rhetoric values for the given test data. The Precision, Recall and Macro
F1-Score are calculated class wise and shown in Table 2. The overall score is then calculated
and shown in Table 3. From Table 2, we can see that LaBSE has the best precision scores for
Classifier</p>
      <p>Epochs</p>
      <p>Evaluation Loss
Classifier</p>
      <p>Metric</p>
      <p>Argument</p>
      <p>Facts</p>
      <p>Precedent</p>
      <p>BERT
ALBERT
RoBERTa</p>
      <p>LaBSE
5
5
5
5
precedent and ratio of decision and has the best scores for predicting statutes. The LaBSE model
does well in classifying statutes but poorly in classifying arguments whereas BERT was the
best at classifying Arguments and the worst at Statutes. RoBERTa performs the best at ratio
of decision and ruling by lower court classes. It also has highest precision with Facts. BERT
performs consistently in most class predictions and has the best overall scores as shown in
Table 3. All the classifiers struggle in the task of classifying decisions by lower courts with the
highest F-Score being only 0.1346.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>
        The task given was to semantically label the sentences in a legal document into 7 rhetoric roles.
Previously, the BERT and RoBERTa transformers, used as classifiers, produced the best results.
In this paper we use the simpletransformers library and import the classifiers BERT, ALBERT,
RoBERTa and LaBSE. First, we compare the runs of all 4 models and the 3 best performing
models were chosen to predict the test data set. In the test data set the BERT classifier performed
the best with RoBERTa being a close second. LaBSE outperformed the other two in predicting
statutes but performed significantly worse in classifying arguments and Ruling by Current
Court. The proposed method can be further improved by trying DynaBERT and ConvBERT
transformers [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>We would like thank the Department Of Science and Technology (DST)-SERB funding scheme
and HPC laboratory for providing the resources and space for our research.
Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized BERT
pretraining approach. CoRR, abs/1907.11692, 2019.
[14] V. Parikh, U. Bhattacharya, P. Mehta, A. Bandyopadhyay, P. Bhattacharya, K. Ghosh,
S. Ghosh, A. Pal, A. Bhattacharya., P. Majumder, Overview of the third shared task on
Artificial Intelligence for Legal Assistance at Fire 2021. In FIRE (Working Notes) - Forum for
Information Retrieval Evaluation, India, December 13-17, 2021.</p>
      <p>V. Parikh, U. Bhattacharya, P. Mehta, A. Bandyopadhyay, P. Bhattacharya, K. Ghosh, S. Ghosh,
A. Pal, A. Bhattacharya., P. Majumder, FIRE 2021 AILA track: Artificial intelligence for legal
assistance. In Proc. of FIRE 2021 - 13th Forum for Information Retrieval Evaluation, India,
December 13-17, 2021.
[15] P. Bhattacharya, P. Mehta, K. Ghosh, S. Ghosh, A. Pal, A. Bhattacharya., P. Majumder,
Overview of the Fire 2020 AILA track: Artificial Intelligence for Legal Assistance. In FIRE
(Working Notes) - Forum for Information Retrieval Evaluation, Hyderabad, India, December
16-20, 2020.</p>
      <p>P. Bhattacharya, S. Paul, K. Ghosh, S. Ghosh, A. Wyner, Identification of Rhetorical Roles of
Sentences in Indian Legal Judgments. In Proc. of JURIX 2019 - International Conference on
Legal Knowledge and Information Systems, 2019.
[16] V. Parikh, V. Mathur, P. Mehta, N. Mittal, P. Majumder, LawSum: A weakly supervised
approach for Indian Legal Document Summarization. arXiv preprint arXiv:2110.01188v3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Majumder</surname>
            ,
            <given-names>S. B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>rhetoric Role Labelling for Legal Judgements Using RoBERTa</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>22</fpage>
          -
          <lpage>25</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Gaoa</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ninga</surname>
            , H., Han,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kongb</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Qib</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Legal text classification model based on text statistical features and deep semantic features</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Jain</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agarwal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Sharma</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Spectre@ AILA-FIRE2020: Supervised rhetoric Role Labeling for Legal Judgments using Transformers</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>66</fpage>
          -
          <lpage>70</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Han</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Retrieval Model and Classification Model for AILA2020</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>82</fpage>
          -
          <lpage>86</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Balaji</surname>
            ,
            <given-names>N. N. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bharathi</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Bhuvana</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Legal Information Retrieval and rhetoric Role Labelling for Legal Judgements</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>26</fpage>
          -
          <lpage>30</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Bhattacharya</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghosh</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghosh</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mehta</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bhattacharya</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Majumder</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Overview of the FIRE 2020 AILA Track: Artificial Intelligence for Legal Assistance</article-title>
          .
          <source>In FIRE (Working Notes)</source>
          (pp.
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>[7] https://searchenterpriseai.techtarget.com/definition/BERT-language-model</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>[8] https://huggingface.co/transformers/model_doc/albert.html</mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>[9] https://huggingface.co/transformers/model_doc/RoBERTa.html</mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10] https://towardsdatascience.com
          <article-title>/labse-language-agnostic-bert-sentence-embedding-bygoogle-ai-531f677d775f</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11] https://towardsdatascience.com
          <article-title>/advancing-over-bert-bigbird-convbert-dynabertbca78a45629c</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Ashish</surname>
            <given-names>Vaswani</given-names>
          </string-name>
          , Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez,
          <string-name>
            <surname>Łukasz Kaiser</surname>
            , and
            <given-names>Illia</given-names>
          </string-name>
          <string-name>
            <surname>Polosukhin</surname>
          </string-name>
          .
          <year>2017</year>
          .
          <article-title>Attention is all you need</article-title>
          .
          <source>In Advances in neural information processing systems</source>
          , pages
          <fpage>5998</fpage>
          -
          <lpage>6008</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Yinhan</surname>
            <given-names>Liu</given-names>
          </string-name>
          , Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy,
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>