To Aggregate or Not to Aggregate. That is the Question: A Case Study on Annotation Subjectivity in Span Prediction (2024)

Abstract: This paper explores the task of automatic prediction of text spans in a legal problem description that support a legal area label. We use a corpus of problem descriptions written by laypeople in English that is annotated by practising lawyers. Inherent subjectivity exists in our task because legal area categorisation is a complex task, and lawyers often have different views on a problem, especially in the face of legally-imprecise descriptions of issues. Experiments show that training on majority-voted spans outperforms training on disaggregated ones.1

heading: 1 Introduction
text: Automatic categorisation of lay descriptions of problems into relevant legal areas is of critical importance for providers of free legal assistance (Mistica et al., 2021). In our case, we have access to a dataset where a legal problem description is annotated by multiple lawyers who first perform document-level annotation by choosing relevant legal areas,2 and then, for each legal area chosen, the lawyers highlight text spans that support their decision. These spans not only help justify the selected areas of law but also improve the interpretability of their decision.
The categorisation of legal areas is a complex problem, and lawyers sometimes have different views on a problem, especially when the task is performed on legally-imprecise descriptions of the personal circumstances of an individual. Therefore, subjectivity is inherent in our task. This subjectivity leads to annotation disagreements, both at the document- and the span-level. While such disagreements are often seen as noise that needs
1Code is available at https://github.com/kmkurn/ wassa2024.
2There are 32 possible legal areas including NEIGHBOURHOOD DISPUTES, ELDER LAW, and HOUSING AND RESIDENTIAL TENANCIES.
to be eliminated in data annotation (Plank, 2022), here they are signal because they are produced by subject-matter experts.
In this paper, we explore the task of automatic span prediction using our expert-annotated dataset, as illustrated in Table 1. Given a problem description (which is a short document) and an area of law, the task aims to predict text spans in the description that support the area of law label. We describe the development of machine learning models for the task that are trained on a corpus containing legal problem descriptions written by laypeople in English. Across various evaluation scenarios, we find that aggregating training span annotations outperforms keeping them disaggregated.

heading: 2 Problem Statement
text: Given a text expressed as a sequence of N words x = x1x2 . . . xN and a label l, the goal is to predict a set of non-overlapping spans S = {(bi, ei)}Mi=1 where 1 ≤ bi ≤ ei ≤ N such that the text segments {xbixbi+1 . . . xei}Mi=1 explain the reason for assigning l to x. In other words, bi and ei respectively denote the beginning and the end indices of the i-th span supporting the assignment of l to x. We cast the problem as sequence tagging by modelling the probability of S given x and l as
P (S | x, l) ∝ exp f(x,y, l) (1) 362
where y = y1y2 . . . yN is a sequence of N tags representing the spans in S, each yi corresponds to xi, and f is a real-valued function that measures the relevance of y in supporting the assignment of l to x. To get y from S, we use an encoding where yi takes one of 5 possibilities depending on the position of i in a span (Sekine et al., 1998):
1. singleton, if ∃(b, e) ∈ S where b = e = i; 2. beginning, if ∃(b, e) ∈ S where b = i < e; 3. end, if ∃(b, e) ∈ S where b < i = e; 4. inside, if ∃(b, e) ∈ S where b < i < e; and 5. outside, otherwise.
The span prediction problem is then equivalent to finding the highest scoring sequence
y⋆ = argmax y f(x,y, l).
The sequence y⋆ is then decoded to get the final predicted spans.

heading: 3 Corpus
text: The corpus was collected by Justice Connect,3 an Australian public benevolent institution4 that connects laypeople seeking legal assistance with pro bono lawyers. On its website, Justice Connect allows help-seekers to describe their problem in free text format in English. After anonymising identifiable information, problem descriptions collected from July 2020 to early December 2023 were presented to a pool of lawyers to be annotated. Each annotator selected one or more out of the 32 areas of law that applied to the problem (thus it is a multi-label classification problem), representing the different law specialisations the case relates to. On average, a problem description is labelled with 3 areas of law. For each document-level area of law selected, the annotator then select spans of words5 that support their decision. On average, each problem description is annotated by 5 lawyers. This whole annotation process was carried out by Justice Connect. In other words, we do not perform any additional annotation and simply use the annotated corpus.
Relating to the problem statement in Section 2, the description and the area of law form the inputs x and l respectively, while the spans make up the output S. Together, the input and the output form
3https://justiceconnect.org.au 4As defined by the Australian government: https://www.acnc.gov.au/charity/charities/ 4a24f21a-38af-e811-a95e-000d3ad24c60/profile
5The number of words must be at least three.
a labelled example of the task. Following prior work on a similar corpus (Mistica et al., 2021), we employ 20-fold cross validation to create the training and the test sets and randomly take 10% of the training set to form the development set. Over the 20 folds we have a total of 35K unique problem description and legal area pairs, with a total of 3.8M words in the problem descriptions.

heading: 4 Method

heading: 4.1 Subjectivity-Aware Evaluation
text: Because of the inherent subjectivity of the labelling task, a test input (consisting of a problem description and an area of law) can have multiple valid span annotations whose boundaries may not match exactly. Specifically for a given problem description, the same area of law can be supported by different spans. Similarly, the same span can support different areas of law. To deal with this mismatched boundaries issue, we adopt both span- and word-level evaluation. To address the issue of multiple valid spans, we experiment with 2 types of gold spans: majority-voted and best-matched. With these strategies, we have a total of 4 combinations of evaluation setup.

heading: 4.1.1 Span- and Word-Level Evaluation
text: In span-level evaluation, a predicted span is considered correct if it starts from and ends at the same positions as a gold span. In other words, their span boundaries must match exactly to be considered equal.
In contrast, word-level evaluation considers a word in a predicted span as correct if it is also a word in a gold span. Put simply, this evaluation gives a positive score to two overlapping spans whose boundaries do not match exactly.
We use precision, recall, and F1 scores as evaluation metrics. We use the evaluation script6 of CoNLL-2000 chunking shared task (Tjong Kim Sang and Buchholz, 2000) to perform both types of evaluation.7

heading: 4.1.2 Majority-Voted and Best-Matched Gold Spans
text: We perform strict majority voting to get the majority-voted gold spans for evaluation. For example, if there are 2 annotators with the following span annotations:
6Downloadable from https://www.cnts.ua.ac.be/ conll2000/chunking/output.html.
7Word-level evaluation is achieved by passing -r as option.
1. [I was fired from work] because of [my complaint against my boss] months ago, 2. I was [fired from work] because of my [complaint against my boss months ago]
where square brackets denote a span, then the gold spans are fired from work and complaint against my boss. In other words, only words voted by more than 50% of the annotators are included. In particular, words voted by exactly 50% of the annotators are not included.
Another type of gold spans we experiment with is the best-matched spans. Given an input and its predicted spans, best-matched spans of that input are its span annotations against which the predicted spans result in the highest F1 score when evaluated. These span annotations must come from a single annotator. For instance, if (a) there are 2 annotators with the same span annotations as before, (b) the predicted span is only fired from work, and (c) span-level F1 is used, then the best-matched spans are the spans given by the second annotator. A similar approach has been used in automatic text summarisation (Lin, 2004).

heading: 4.2 Model
text: We parameterise the function f in Equation (1) with a neural sequence tagger. The tagger uses a pretrained language model to provide contextual word representations and a bidirectional LSTM (Hochreiter and Schmidhuber, 1997) with a CRF output layer (Collobert et al., 2011) as the classifier similar to previous work (Lample et al., 2016). We use the implementation provided by the open-source NLP library FLAIR (Akbik et al., 2019).8
Following prior work on a similar corpus (Mistica et al., 2021), we use the base and uncased version of BERT (Devlin et al., 2019) as the pretrained language model. The problem description and the area of law are joined and given as a single text input to BERT. For example, if the problem description is My landlord kicked me out without reason and the area of law is HOUSING AND RESIDENTIAL TENANCIES then the input is My landlord kicked me out without reason <sep> HOUSING AND RESIDENTIAL TENANCIES where <sep> marks the end of the problem description. Both <sep> and succeeding input words corresponding to the area of law are excluded from evaluation.
8Version 0.13.

heading: 4.3 Training
text: We experiment with two approaches to dealing with subjectivity in model training. The first approach (MV) aggregates span annotations with majority voting similar to how the majority-voted gold spans are constructed (Section 4.1). This approach resolves subjectivity by only including spans on which the majority of annotators agree.
The second approach is repeated labelling (REL) which treats multiple annotations of the same input as separate labelled examples (Sheng et al., 2008). In other words, annotations in the training set are left as they are without any attempt to aggregate them. This approach embraces subjectivity by treating all annotations equally.
While REL may seem counterintuitive because the same input can be presented with different annotations, these annotations may have consistent patterns. Spans that are often (resp. rarely) annotated give a strong signal of the presence (resp. absence) of a true span. We expect that models can learn the correct spans from these signals.
For both approaches, the tagger is trained for 10 epochs to maximise the probability of the sequence of tags in the training set. Both learning rate and batch size are tuned on the development set. The word-level F1 score against majority-voted spans is used as the hyperparameter tuning objective.

heading: 4.4 Comparisons
text: Baseline We employ a model that predicts spans randomly as a baseline (RANDOM) which reflects a model that does not perform any learning from data. The model tags each word in the input description with one out of 3 possibilities uniformly at random: start of a span, continuation of a span, or outside of any span. This sequence of tags is then decoded into a set of spans as the output.
Expert performance The majority-voted gold spans in Section 4.1 may not resemble spans produced by a real annotator. Therefore, even an expert annotator may not achieve perfect performance when evaluated against the majority-voted gold spans. We compute this expert performance to serve as a more realistic upper bound of model performance on our dataset. We estimate this performance by evaluating the performance of the best annotator of each test input, where best is defined as resulting in the highest F1 score against the majority-voted gold spans. Note that this is different from the best-matched spans mentioned in
Section 4.1 because here the gold spans are fixed to the majority-voted spans while the predicted spans come from the best annotator. While there are limitations to this estimation (see Limitations), we argue that the estimate is still useful as a point of reference.

heading: 5 Results
text: Table 2 shows that both MV and REL perform substantially better than RANDOM in terms of F1 scores for all 4 evaluation setups, indicating the potential of both methods. Comparing MV and REL across both types of gold spans, while the former is on par with the latter in word-level evaluation, MV outperforms REL substantially in span-level evaluation. This finding is consistent across precision and recall, and thus demonstrates that MV is overall superior to REL. However, the table also shows that RANDOM outperforms both MV and REL in terms of word-level recall across both types of gold spans, which points to an area for improvement.
While the performance numbers with majorityvoted gold spans are lower than the best-matched counterparts, the patterns of model performance are consistent across both types of gold spans. This result suggest that both types of gold spans are equally acceptable for handling subjectivity in span annotations. However, using the majority-voted gold spans has the advantage of time efficiency because the gold spans do not need to be recomputed when evaluating different models.
For majority-voted spans, Table 2a shows that model performance is still far behind expert performance, suggesting that there is still plenty of room for improvement. Furthermore, the expert performance is moderately high in span-level evaluation and approaches perfect performance in the word-level counterpart. This finding demonstrates that the majority-voted spans are realistic as they show a high degree of similarity to span annotations given by experts.

heading: 5.1 Experiments with Other Pretrained Language Models
text: We also experiment with an improved version of BERT known as DeBERTaV3 (He et al., 2023). Key differences include a more complex model architecture, a simpler pretraining objective, and a larger amount of pretraining data. We use the base version of DeBERTaV3 which has the same number of layers, attention heads, and hidden units
but four times the vocabulary size of the base version of BERT, as used in the previous experiment. We evaluate only against the majority-voted gold spans based on the previous findings. Due to time constraints, we use the hyperparameters (learning rate and batch size) tuned on the first fold (out of 20) for all the folds of the dataset.
Table 3 shows that both MV and REL outperform RANDOM substantially on both span- and word-level evaluations across all metrics except for word-level recall where RANDOM achieves the best score. This finding agrees with that of the BERT-based models. Looking at F1 scores, the table shows that REL is on par with MV in span-level evaluation and marginally outperforms MV in the word-level counterpart. This finding contradicts the results for BERT-based models, suggesting the effectiveness of REL with improved language models.
Furthermore, the table shows that for span-level evaluation, REL outperforms MV in precision but performs worse than MV in recall. In contrast, for word-level evaluation, MV outperforms REL in precision but performs worse than REL in recall. These findings suggest that with stronger language models, the best method depends not only on whether span- or word-level evaluation is prioritised but also on whether precision or recall is more crucial. These patterns of performance again contradict those of the BERT-based models, suggesting that the choice of pretrained language models is important. We leave the analysis on the possible reasons behind these findings and the evaluation on best-matched gold spans for future work.
Lastly, comparing to Table 2a, we see that DeBERTa-based models outperform the BERTbased counterparts across the board. This finding is unsurprising because DeBERTa was developed as an improvement over BERT (He et al., 2021).

heading: 6 Related Work
text: Pruthi et al. (2020) have studied the span prediction problem under the name of evidence extraction. However, their model also performs classification jointly and is trained in a semi-supervised manner. More importantly, they did not consider subjectivity in the span annotations. In contrast, we focus only on predicting spans, supervised learning, and incorporating subjectivity in model training and evaluation.
Previous work has leveraged a similar dataset of
legal problem descriptions (Mistica et al., 2021). They focussed on the text classification aspect where areas of law are assigned to a problem description. Different from their work, ours treats the area of law as given and focusses on predicting the spans that support the assignment of the area of law.
Our work falls within the broader theme of human label variation (Plank, 2022). Previous work has mainly focussed on text classification tasks (Leonardelli et al., 2023; Fornaciari et al., 2021; Nie et al., 2020, inter alia). In contrast, we focus on spans, which are still understudied in this area. Our work is also related to data perspectivism.9

heading: 7 Conclusion
text: We explore the task of automatically predicting text spans in a legal problem description that support the labelling of an area of law. We develop neural sequence taggers that deal with the inherent subjectivity of the task. Experiments across various subjectivity-aware evaluation setups show that
9https://pdai.info/
training on majority-voted annotations outperforms training on the disaggregated counterparts.
Limitations
The dataset we use in this work cannot be released publicly, which is a major limitation of our work in terms of reproducibility. This is because the topics discussed are sensitive, and more importantly, the help-seekers have not given their consent to share their data. Nevertheless, we believe our work still offers valuable scientific knowledge on handling subjectivity, especially in span annotation tasks.
For the evaluation using majority-voted gold spans, we estimate the expert performance by determining the best annotator of each test input. However, the majority-voted gold spans are a function of the best annotator’s spans. Thus, the estimated expert performance is dominated by test inputs that are annotated by fewer annotators. To mitigate this issue, a leave-one-annotator-out strategy can be employed, which we leave for future work.
The best-matched gold spans are likely to come from various annotators. Taken together, these spans may not reflect a realistic pattern of a single human annotator. A remedy is to evaluate against a
single best annotator. However, this approach is not straightforward in our case because an annotator may annotate only a subset of examples. We thus leave this approach for future work.

heading: Acknowledgements
text: We thank the anonymous reviewers for their constructive feedback on the paper. This research is supported by the Australian Research Council Linkage Project (project number: LP210200917) and funded by the Australian Government. This research is done in collaboration with Justice Connect, an Australian public benevolent institution.10

heading: Future Work
text: To mitigate this issue, a leave-one-annotator-out strategy can be employed, which we leave for future work. The best-matched gold spans are likely to come from various annotators. Taken together, these spans may not reflect a realistic pattern of a single human annotator. A remedy is to evaluate against a
single best annotator. However, this approach is not straightforward in our case because an annotator may annotate only a subset of examples. We thus leave this approach for future work