Bonafide at LegalLens 2024 Shared Task: Using Lightweight DeBERTa Based Encoder For Legal Violation Detection and Resolution
Paper · 2024 · Shikha Bordia
Summary
An online complaint can describe a practice that affected many people, yet finding the relevant passage and connecting it to a legal case are different jobs. The Bonafide entry to LegalLens tackles both. Its first system marks passages that name a law, describe the alleged violation, identify who committed it, or identify who was affected. Its second system reads a pair of texts and judges whether a legal case summary supports, contradicts, or leaves open the connection suggested by a post. LegalLens evaluates these jobs as named entity recognition and natural language inference.
Both systems adapt lightweight DeBERTaV3 encoders. For detection, the authors compare several versions of GLiNER, which looks for passages corresponding to supplied category names. The strongest version encodes the passage and the category names separately. Keeping the highest-confidence prediction when a category has competing extractions brings development micro F1 to 60.01%. The description of the alleged violation is the hardest category to recover. Its annotated passages are longer on average, and recall is lower than for the other categories. On the shared-task test set, the detection system scores 33.00% F1 and places sixth.
For case matching, the authors adapt Tasksource, an encoder already trained to express many classification tasks as inference between paired texts. They use Mixtral 8x7B to paraphrase both sides of the training pairs while retaining their labels. Development macro F1 rises from 76.31 to 84.73 in the paper’s table, and the article reports 81.02% F1 for the fine-tuned Falcon 7B baseline in its comparison. The augmented system improves the reported development score in every legal domain. On the shared-task test set, it scores 65.30% F1 and places fifth.
The augmentation experiments give the paper its most informative comparison. The added examples help when the annotation is a relationship that paraphrases are meant to preserve. Generating new examples for detection yields no reported improvement, and adding a further round of paraphrases for case matching produces a gain the authors describe as disproportionate to the increase in data. The two development studies show where these particular choices helped. The separate test scores show how the resulting systems performed in the shared task.
Deep dive: Bonafide at LegalLens 2024 Shared Task: Using Lightweight DeBERTa Based Encoder For Legal Violation Detection and Resolution
Bonafide uses lightweight DeBERTa encoders to find alleged legal violations in online text and match them with class action cases. · about 30 minutes to read
The problem and its context
Finding the allegation inside a complaint
The paper starts from a practical problem in Legal AI. People describe consumer complaints on social networks and in online reviews. A passage of that kind can contain material relevant to a legal violation, but its useful parts are embedded in unstructured prose. The volume of such material makes it difficult to identify potentially relevant complaints and determine which legal issues they raise. The motivation is to make that material searchable and comparable in ways that could matter for individual rights and legal obligations.
LegalLens gives the detection system a concrete output. It must identify the words that refer to a law or regulation, the words that describe the conduct, the party said to have committed it, and the party affected by it. A response that merely marks a whole post as relevant would leave those questions unanswered. Returning specific spans, which are stretches of the original text, makes the contribution of each marked passage visible. This is an information extraction task in which the locations and categories of the findings both matter.
The category for the conduct is particularly important for understanding the task. In ordinary usage, an entity might suggest a person, an organization, or something else that can be named compactly. LegalLens also treats the description of an alleged violation as an entity. That description can cover an action together with the wording that explains it. Learning what the category means and learning how far its annotation extends are separate difficulties. A system may recognize the relevant part of a complaint while still having trouble locating the full span expected by the benchmark.
The party categories also depend on the role a passage plays. VIOLATED BY refers to the actor said to have committed the violation. VIOLATED ON refers to the affected party. Recognizing that some words refer to a party is therefore only part of the task. The classifier must use the surrounding account to determine which role the mention occupies. LAW and VIOLATION make a different distinction. The former names the authority at issue, and the latter captures the conduct described in the complaint. Together, the categories give the detection task a specific structure drawn from the legal scenario.
Connecting a post to a case
The second LegalLens task asks about a relationship between texts. The premise is a summary of legal news, and the hypothesis is a synthetic social media post written to resemble an account of a possible violation. A premise is the text taken as the starting evidence. A hypothesis is the text whose relationship to that evidence is being assessed. Here the scenario is matching possible violations with existing complaints from resolved class action cases.
Natural language inference, or NLI, supplies the categories for this judgment. Entailed means the premise supports the hypothesis under the task’s framing. Contradict means the texts are in conflict on the relevant claim. Neutral covers cases in which the premise leaves that claim unresolved. The distinction between conflict and insufficient support is important. Two texts can mention similar conduct or belong to the same legal domain while leaving the proposed connection uncertain. The label concerns what the two texts say in relation to each other.
The first task therefore asks where the relevant words are and what function they serve. The second asks what one text supports about another. This distinction shapes how the paper trains its systems. Detection supervision has to specify locations inside a text. Inference supervision gives a label to a whole pair. A change to the wording of a training example can affect those forms of supervision differently. For detection, rewriting a sentence can move or reshape the passages that need labels. For inference, rewriting can leave the pair’s label intact if the meanings and their relationship are preserved.
The shared-task motivation connects the two jobs, since an extracted account of a violation could be relevant to matching a complaint with a case. The experiments give each job its own benchmark and evaluate it against its own target. This matters when reading the results. A high score on the inference benchmark measures decisions about the supplied pairs. A high score on detection would measure recovery of their own categories and spans from a different input. The paper’s task setup lets each kind of decision be examined on its own terms.
How earlier work framed the tasks
The paper traces entity recognition from statistical approaches to neural encoders. Its early examples include maximum entropy systems, hidden Markov methods, and conditional random fields. Conditional random fields were used to make sequence-labeling decisions jointly, so a label at one position could be considered alongside neighboring labels. The authors then describe the use of recurrent networks that read context in both directions, sometimes retaining a conditional random field as the final labeling layer. They place the move to attention-based encoders after those developments, following the introduction of the Transformer.
For legal text specifically, the related work discusses systems built around BERT-family encoders and combinations with bidirectional recurrent layers or conditional random fields. It includes encoders adapted to legal material, such as LEGAL-BERT, and cites earlier work on legal entity recognition. The authors treat LegalLens as a change in what needs to be recognized. Its complaint roles and conduct spans are the categories of interest, so previous success on legal entity recognition provides architectural precedents while leaving this particular label inventory to be learned. BERT · LEGAL-BERT
GLiNER offers a way to start with an encoder trained for general entity recognition and then supply the categories needed for LegalLens. In discussing the choice, the authors point to prior zero-shot evaluations of GLiNER, where a system applies learned recognition behavior to categories supplied for the evaluation. The Bonafide experiment goes further by training on LegalLens examples. General recognition ability gives it a starting point, while the shared-task examples teach it what counts as a law, an actor, an affected party, or a conduct span in these inputs.
The historical account for inference starts with symbolic and rule-based approaches to entailment. The paper then credits larger annotated collections, including SNLI, MultiNLI, and XNLI, with enabling data-driven approaches. These benchmarks supply examples of the relationship to be learned across many text pairs. The authors cite Transformer systems such as RoBERTa and XLNet as subsequent advances on inference benchmarks. They also identify generalization across domains and languages as a continuing problem. LegalLens gives that concern a specific form by asking systems trained on some kinds of legal material to make judgments about another. SNLI · MultiNLI · RoBERTa · XLNet
Data augmentation is the third strand of related work. The authors describe using a text generator to enlarge a training collection when annotated examples are limited. The useful question for LegalLens is what can be varied while keeping the intended supervision dependable. For recognition, they ask a generator to create more examples from demonstrations. For inference, they ask it to vary the wording of existing pairs. Both procedures increase the variety of training text, but they place different demands on the generator. New detection examples need internally consistent labels and boundaries. An inference paraphrase needs to preserve the evidence and claim that made the original label appropriate.
The method, step by step
Two starting points for the same encoder family
The systems share a DeBERTaV3 foundation and start from different trained checkpoints. A checkpoint is a saved set of learned parameters that can be loaded and trained further. The detection checkpoint comes from GLiNER, with prior training on Pile-NER. The inference checkpoint comes from Tasksource, which brings experience from many tasks recast into a common inference format. This choice gives each branch a starting point whose predicted output already resembles the output LegalLens expects.
Fine-tuning means continuing training on examples from the target task so that the existing representation and prediction layers become better suited to it. In this paper the adaptation happens separately. In the detection branch, the encoder and its span-scoring layers learn which parts of a complaint fit the task’s category names. In the inference branch, the encoder learns how the evidence in a legal news summary relates to a proposed account of a violation. The systems share an architectural family, but their training examples, prediction units, and inference procedures are distinct.
How Bonafide trains and runs both LegalLens systems
The steps in order.
Detection starts with category names and a passage
For a detection example, the text and the requested entity categories are the system’s inputs. The words in the text provide the potential spans. The names of the categories tell GLiNER what kinds of spans to seek. During training, the annotations identify the relevant boundaries and say which category applies to each marked passage. During prediction, the system assigns scores to its proposed span–category matches.
The names matter because GLiNER represents the categories as text. Supplying LAW, for instance, gives the system a label representation to compare with possible spans in the complaint. The same input structure accommodates the other roles. The output still depends on how the checkpoint was trained and on the LegalLens annotations used during adaptation. The category names organize the decision, and the training examples show what their application looks like in the benchmark.
The original GLiNER configuration uses a single bidirectional encoder. Bidirectional encoding lets a position be represented in light of material on either side. In this configuration, the entity labels are separated by [SEP] tokens and joined with the complaint text before encoding. The separator marks a boundary in the input sequence. Because the labels and complaint enter together, they participate in the same encoding step. This is one way of giving the encoder access to both the question about category membership and the text it must inspect.
The bi-encoder separates these inputs. It represents the label text and the complaint text in separate encoder passes. The eventual span decision still depends on the label and the passage, but the representations are first constructed separately. The distinction from the single-encoder configuration concerns when the two inputs can influence each other. In the single-encoder version that opportunity arises during their shared encoding. The bi-encoder brings the separately produced representations together for the decision about a span.
The poly-encoder is the third design in the comparison. The paper describes it as fusing the representations of the labels and input sequence to capture their interactions. At the level the paper documents, the comparison is about how a system handles two kinds of text: the description of what to look for and the passage that may contain it. The architectures give those inputs different opportunities to interact. The experiment uses named checkpoints from these families, including small and base versions. The paper obtains the pretrained checkpoints from the Hugging Face hub.
Detection training and prediction
The GLiNER experiments use dropout of 0.5 and a batch size of 8. Dropout temporarily suppresses some activations during training, and a batch is the group of examples processed for a parameter update. AdamW performs the updates. The initial learning rate is 1e-5 for the pretrained DeBERTaV3 backbone and 5e-5 for the parts that the paper identifies as lacking pretraining, including the feed-forward and span-representation layers. A learning rate sets the scale of a parameter update. Here the setup allows the layers responsible for the task output to change faster than the pretrained backbone at the start.
The initial training stage runs for a maximum of 10 epochs. An epoch is a pass through the training collection. The schedule begins with a 10% warm-up, during which the learning rate is brought up before the main decay phase. A linear scheduler then reduces the rate. The authors save the best checkpoint from this stage, lower the learning rate to 5e-6, and continue training that checkpoint until convergence. The second stage takes an already selected state and gives it a period of smaller adjustments.
For the training objective, the authors choose focal loss to address class imbalance. A loss assigns a penalty to predictions during training and directs the updates toward reducing that penalty. Focal loss changes the emphasis among training decisions by downweighting those the system already handles confidently. The paper specifies alpha 0.75 and gamma 2. Alpha is the weighting parameter, and gamma controls how strongly easy decisions are downweighted. The paper gives these settings in prose and supplies no displayed loss equation. The results therefore describe the focal-loss configuration used in the run, with its individual contribution left open by the experiments.
At prediction time, the system uses a threshold of 0.8 when computing the recognition metrics. The threshold controls whether a scored candidate is accepted as an extraction. The authors then add a category-wise filtering rule. When the system returns competing spans assigned to the same entity category, the rule keeps the one with the highest confidence. It operates on predictions already produced by the trained encoder.
The threshold and the rule make different decisions. Thresholding asks whether a candidate is strong enough to be returned. The rule asks which candidate to keep when several returned spans share a category. As a consequence, a span can clear the threshold and still be removed because another candidate of that type has a higher score. The authors introduce the filter to remove false positives. Its behavior follows from a simple assumption about the output wanted for a category, and the experiment measures the effect after the encoder has been trained.
New detection examples require new annotations
The detection augmentation uses few-shot learning in the prompt to Mixtral 8x7B. In this setting, few-shot refers to giving the generator a small set of demonstrations so it can produce material in the same format. The paper’s appendix describes a prompt containing the task description and three examples randomly selected from the detection training data. The authors use the resulting synthetic examples to train the best recognition candidate they had identified.
This augmentation asks the generator to create another usable instance of the task. A plausible complaint is only part of such an instance. The spans associated with its category labels also have to make sense under the annotation scheme. For example, the training signal for VIOLATION depends on the extent of the conduct description, while the signals for the party roles depend on who did what to whom. These requirements follow from the output format even when the generated text reads naturally. The paper documents the prompt design and reports the training outcome, leaving the properties of individual generated examples unmeasured.
Mixtral’s role ends at data preparation in this branch. GLiNER still supplies the scores for complaints at inference time. The generator contributes possible training material, while the trained encoder is responsible for decisions about new inputs. That separation is also present in the inference branch, where the synthetic data procedure is more constrained.
Case matching starts from a common inference format
Tasksource provides the initial checkpoint for matching complaints to cases. The paper describes Tasksource as a framework that standardizes preprocessing across datasets for multitask learning and evaluation. Its checkpoint has been trained on 600+ English tasks using an inference format for classification. The idea is to put otherwise different decisions into a common form that can be learned by one encoder. For LegalLens, that starting form already corresponds to the task: an input pair receives a label that describes the relationship between its parts.
A LegalLens training item contains a premise and a hypothesis. The premise is the legal news summary, and the hypothesis is the synthetic post that represents a potential violation. The original supervision assigns the pair one of Entailed, Contradict, or Neutral. Fine-tuning gives Tasksource specific examples of how those classes apply to legal cases and accounts of alleged conduct. The output is a label for the pair as a whole. There is no requirement in this benchmark to reproduce entity spans or to highlight the sentence that determined the label.
The holdout design is central to the procedure. The paper names Consumer Protection, Privacy, TCPA, and Wage as the domains in the inference dataset. Each training run uses material from three domains and reserves the fourth for evaluation. The authors repeat this arrangement so that each domain serves as the held-out one. In a run holding out Wage, for example, Wage supplies the evaluation examples, with the other named domains supplying the training material. The rotation measures how the adapted encoder treats a domain outside its own LegalLens training set.
The authors use this design to prevent leakage across the domain boundary during training. Their augmentation procedure follows the same division by working on training pairs. This matters because a paraphrase still carries information about the original example. Generating variants from the training portion keeps the comparison focused on whether added ways of expressing the known material help with the held-out domain.
Paraphrasing keeps a pair’s supervision fixed
For inference augmentation, Mixtral 8x7B rewrites the premise and the hypothesis. The appendix describes separate prompts for the legal summary and the social media post. Each prompt has the same broad purpose of changing the expression while preserving the content of the text it receives. The label is carried over from the original pair. The experiments compare Tasksource trained on the original data with Tasksource trained on the enlarged collection.
The label-preservation assumption applies to the relationship between the two texts. For Entailed pairs, the revised premise must preserve the support that made the original hypothesis follow. For Contradict pairs, the paraphrases must preserve the relevant conflict. For Neutral pairs, the revisions must preserve the uncertainty or missing evidence. This explains why a superficially fluent rewrite can still be unsuitable for the training procedure. A change in the strength or scope of a claim can alter which inference the pair licenses.
The main augmentation setup doubles the training data. The added material follows the labels of the original pairs, which preserves the original class distribution under this procedure. That design controls one aspect of the comparison. The enlarged collection offers more expressions of the available training relationships at the same label proportions. The authors also try another set of paraphrases that takes the training collection to triple its original size. This second expansion tests whether continuing the same strategy keeps improving the score at a comparable rate.
The detection and inference prompts thus differ in what is fixed. The detection demonstrations supply a format and examples of how to label spans, leaving the generation step to produce another instance of that format. The inference prompts begin from an existing training item whose label is retained and whose contents are intended to stay stable. The difference helps explain what each experiment tests without implying that the paper verified the quality of every generated item.
Fine-tuning and choosing a test label
The authors use batches of 8, a learning rate of 2e-5, and a sequence length of 256 when training Tasksource for each inference holdout. The first stage runs for a maximum of 7 epochs with a cosine scheduler, which varies the learning rate along a cosine-shaped schedule. As in the detection procedure, the best checkpoint is kept for further training. The inference continuation lowers the learning rate to 2e-6 and runs until convergence.
For the unlabeled shared-task test set, the paper describes a collective prediction rule. Every domain-holdout encoder processes the premise–hypothesis pair. Each supplies a label and a confidence score. The final prediction is the label proposed by the encoder with the highest confidence for that item. Thus the identity of the encoder furnishing the answer can change from pair to pair, depending on the scores it produces.
Confidence here is the system’s own score for its prediction. The selection rule compares scores across separately trained checkpoints, taking the strongest reported score as the basis for the final label. This differs from the held-out development design, in which an encoder is assessed on the domain reserved for its run. The development comparison and the leaderboard result therefore answer questions about related but distinct procedures. The authors report releasing the trained checkpoints and inference scripts in their LegalLens inference repository.
Experiments and results
How to read the scores
The paper uses precision, recall, and F1 to describe recognition. In this context, precision is the share of returned extractions that count as correct. Recall is the share of annotated extractions that the system recovers. F1 combines the two and is pulled down when either is low. Reading all three helps distinguish a system that returns too many incorrect spans from one that is selective and overlooks a substantial part of the annotation.
The final detection table labels its aggregate as micro average. Micro averaging pools the decisions across categories before producing the aggregate, so a category’s influence depends on the decisions and annotations contributing to the pooled counts. The separate category rows support a different reading. They reveal whether a particular kind of answer is being found reliably even when its behavior is obscured by the overall score.
The inference results include a macro F1 column and scores for the individual legal domains in the development table. Macro averaging gives equal weight to the component scores being averaged. The paper reports the aggregate and per-domain entries directly, without spelling out the reduction used to produce every table column. The per-domain entries can therefore be read as the reported performance in each legal setting, and the macro column as the paper’s named aggregate. Keeping those readings distinct avoids attributing a particular computation to the authors beyond what they describe.
Detection development data and checkpoint comparisons
The detection training set has 710 data points and the development set has 617. The inputs come from social media posts and online reviews. The annotations cover LAW, VIOLATED BY, VIOLATED ON, and VIOLATION. The paper reports average span length on the training data so that the extent of each category can be understood independently of its evaluation score.
The mean length is 4.14 words for LAW, 2.19 for VIOLATED BY, and 3.24 for VIOLATED ON. For VIOLATION it is 12.39 words. These averages are properties of the annotated training spans. They show that the conduct category presents a different kind of extraction problem in this collection. An encoder often has to assign the category to a longer span before the output can satisfy the annotation. The development results can then be read against that difference, with the caveat that length and category vary together.
The checkpoint comparison first asks which GLiNER configuration gives the strongest F1 on the recognition development set. The checkpoints offer a practical spread of single-, bi-, and poly-encoder designs at the sizes the authors could train. The chart records the results before the paper adds the final category-wise filtering rule. Its star marks the checkpoint the authors carry forward.
GLiNER checkpoints on LegalLens NER development F1
The base bi-encoder leads the tested checkpoints on F1.
The numbers
| System or setting | F1 % |
|---|---|
| gliner_small-v2.1 | 55.47 |
| gliner_base | 56.67 |
| gliner_small | 56.02 |
| gliner-bi-base-v1.0 (this paper) | 59.53 |
| gliner-bi-small-v1.0 | 58.52 |
| gliner-poly-small-v1.0 | 58.44 |
The checkpoint with the highest F1, gliner-bi-base-v1.0, has precision of 83.30 and recall of 46.31 in that table. The poly-encoder gliner-poly-small-v1.0 reaches the highest recall, 49.64, with precision of 71.04. Its greater coverage comes with enough additional incorrect predictions to leave its F1 below the selected bi-encoder’s. The small bi-encoder has precision of 74.00 and recall of 48.39. The checkpoint choice therefore reflects how the authors balance recovery and correctness using F1.
Across the original single-encoder configurations, the base checkpoint has precision of 71.30 and recall of 47.02. The checkpoint gliner_small reaches precision of 72.32 with recall of 45.71, and gliner_small-v2.1 has precision of 70.26 and recall of 45.83. These results help place the selected checkpoint’s behavior in context. Its clearest advantage in this table is precision. Recall remains a challenge throughout the comparison, and a reader interested primarily in recovering more candidate passages would notice the different behavior of the poly-encoder.
Detection after filtering and on the shared-task test set
After selecting the base bi-encoder, the authors apply their confidence-based filter. The final development result is 60.01% micro F1, with micro precision of 71.93 and micro recall of 51.49 in the entity-level table. Those values describe the final reported configuration. The earlier architecture table describes the checkpoint comparison, and the paper associates the F1 improvement with its final filtering experiment.
The entity-level results clarify what the aggregate represents. VIOLATED BY has the highest category F1, 88.74, with precision of 88.16 and recall of 89.33. LAW reaches F1 of 81.66, with precision of 73.40 and recall of 92.00. VIOLATED ON has F1 of 72.37, precision of 71.43, and recall of 73.33. All of these scores are from the final recognition development table.
VIOLATION is the most difficult category in that table. It has F1 of 49.85, precision of 68.17, and recall of 39.29. The recall shows a substantial difficulty recovering the annotations in this category. The precision gives a separate view of how often a proposed conduct span is accepted. Because the definition of VIOLATION calls for the description of the conduct, recognizing that a complaint contains some relevant conduct is only part of what the benchmark asks the encoder to recover.
On the shared-task test set, Bonafide records 33.00% F1 and ranks sixth for detection. The results discussion says the detection system fell short of the organizer baselines from the earlier LegalLens work. It supplies no numeric detection baseline comparison there. The paper’s broad account of lightweight encoders is best read alongside that task-specific statement. For detection, the evidence is a comparison among the submitted approach’s GLiNER candidates, a modest improvement in the development result after filtering, and the separately reported test outcome.
Case matching across held-out legal domains
The paper describes the inference dataset as containing 312 data points across Consumer Protection, Privacy, TCPA, and Wage. The inputs are legal news summaries paired with synthetic social media posts. The rotating domain holdouts are the basis of the development experiment. In each run, the inference encoder must apply what it learned from other LegalLens domains to the one set aside for evaluation.
The principal comparison keeps Tasksource as the starting encoder and changes the training collection. The original-data condition uses the available training pairs. The augmented condition includes their paraphrases. Those conditions produce the reported development macro F1 values below.
Tasksource training conditions on LegalLens NLI development macro F1
Tasksource trained with paraphrases has the higher development macro F1.
The numbers
| System or setting | Macro F1 |
|---|---|
| Tasksource with original data | 76.31 |
| Tasksource with augmented data (this paper) | 84.73 |
The domain scores show that the aggregate improvement is accompanied by increases throughout the development table. Consumer Protection moves from 85.48 with original training to 88.71 with augmentation. Privacy moves from 76.07 to 85.88. TCPA moves from 62.16 to 79.72. Wage moves from 81.56 to 84.61. Each of these is a comparison between development scores under the two training conditions for the named domain.
The pattern across domains is more informative than the aggregate alone. TCPA starts with the lowest reported domain score and improves substantially in the augmented condition, while still having the lowest reported score of the augmented domains. Consumer Protection starts highest and remains highest. Privacy and Wage also improve, and their order changes between the conditions. The table supports the conclusion that the extra training material helped across the domains evaluated, with the size of the gain depending on the held-out domain.
The paper compares the augmented encoder with Bernsohn and colleagues’ fine-tuned Falcon 7B. It reports F1 of 81.02% for Falcon and 84.73% for Bonafide in that comparison. The latter is also the augmented development aggregate, which makes it important to keep it separate from the leaderboard result. The paper describes the smaller encoder as outperforming Falcon in this comparison. The comparison concerns the systems and training procedures used for this task.
For the unlabeled shared-task test pairs, the authors use maximum-confidence selection across the domain-holdout encoders. The submitted system receives 65.30% F1 and ranks fifth. The test result supplies the leaderboard evidence, while the development comparison supplies the original-versus-augmented result and the reported comparison with Falcon. Neither set of numbers substitutes for the other. Together they record the outcome of the training experiment and the result of the submission under their respective evaluation conditions.
What the ablations show
The best checkpoint depends on the metric
The recognition comparison is an architecture and checkpoint study. It establishes that the tested base bi-encoder offers the best development F1 in the set, and the precision and recall columns show how it gets there. Its particular strength is precision. The tested poly-encoder offers the highest recall, so the result would look different if the selection criterion were recovery of annotated spans alone.
This distinction has concrete implications for interpreting the architecture comparison. A system that returns fewer questionable spans can score well on precision even if it leaves many annotations uncovered. A system that retains more candidates can recover more annotations while also returning more incorrect ones. The results display both kinds of behavior. The one the authors choose is the configuration with the strongest balance under F1 on their development data.
The available checkpoints bundle architecture, size, and checkpoint version. The comparison supports choosing a particular checkpoint under the reported conditions. It leaves open how much of its advantage is attributable to separate encoding of labels and text. An isolation of that architectural decision would require the other checkpoint properties to be held fixed. The small variants provide another practical comparison among the available candidates, but the paper gives no controlled decomposition of all those factors.
The authors separately report changing entity order and randomly dropping entities, with no effect on the metrics in their runs. This tests a different aspect of the input: the arrangement or availability of the category information. The result supports a limited conclusion about the perturbations they tried. The paper gives no separate scores or details that would establish how much reordering or dropping the systems could tolerate across other settings.
Filtering changes the output after training
The paper compares the selected detector’s development F1 before and after a rule that keeps the highest-confidence candidate when spans compete within a type. The earlier score is 59.53%, and the final score is 60.01%. The authors describe the improvement as 0.5%. Because the rule is applied at inference, its intended contribution is to alter which predictions survive. The improvement belongs to output selection in the reported setup.
The filter also illustrates how the assumptions behind post-processing affect its interpretation. If a system assigns the same type to several overlapping or competing spans and only one is correct, ranking them by confidence can remove incorrect alternatives. If a complaint legitimately requires several spans of the same type, the same rule can suppress relevant text. The paper reports the aggregate effect of using the rule on its development data. It gives no breakdown of which of these situations occurred or how much each category contributed to the gain.
The recognition tables also leave a detail unresolved. The architecture table and the entity-level table show different aggregate precision and recall profiles, and the descriptions do not provide a matched breakdown tracing those changes to individual predictions. The F1 endpoints establish the comparison as the authors report it. The component scores describe their respective tables, with insufficient detail to reconstruct the entire transition from one candidate set to the other.
Additional text helps under one augmentation procedure
The recognition system trained with the few-shot synthetic examples shows no reported improvement. The paper gives no separate scores for this run. This makes it possible to say that the trial did not improve the selected recognizer in the reported experiments. It leaves the size and direction of individual metric changes, if any, unspecified. It also leaves open whether some categories benefited while others were harder to extract.
The corresponding inference comparison is stronger because the paper gives results for both training conditions and for each domain. Training on the paraphrase-augmented pairs raises the development aggregate and improves each domain entry. The procedure keeps the original label distribution, so a change in the proportions of Entailed, Contradict, and Neutral is not part of the intended manipulation. The paper’s evidence is consistent with alternate phrasings helping Tasksource transfer the learned relationships to held-out domains.
This still leaves several sources of improvement bundled together. Adding paraphrases changes both the volume of material seen during training and the variety of ways an existing claim can be expressed. The experiment measures the combined result. It gives no equal-sized comparison with repeated original pairs or with a different kind of additional training material. It also varies both sides of the inference input in the main setup. The separate prompts are documented, but the paper gives no premise-only or hypothesis-only result that could identify which type of rewrite contributed more.
When the authors add another round of paraphrases and triple the original training volume, they report that F1 fails to improve in proportion to the expansion. The experiment supports their observation that continued paraphrasing yields diminishing returns under the conditions they tried. The paper gives no exact score for this larger condition. The evidence therefore describes the direction of the authors’ comparison, while leaving the best augmentation volume and its sensitivity to the choice of paraphrases unresolved.
The text describes the augmentation improvement as 7.65%, while the development table gives 76.31 and 84.73 for the two macro F1 entries. The paper also describes the advantage over Falcon as 3.17% in its discussion and gives the two systems’ F1 scores separately. The basis for the quoted percentage changes is unclear from the paper. The named condition scores provide the direct comparisons that can be checked against the corresponding results.
The error analysis distinguishes the direction of a mistake
The inference error analysis compares Bonafide with Falcon 7B by the labels they confuse. The authors say both systems handle direct confusion between Entailed and Contradict. They report an advantage for Bonafide when the error to avoid is assigning Neutral to an item whose actual label is Entailed or Contradict. Falcon has the advantage in the opposite direction, when a genuinely Neutral item risks being assigned one of those more decisive labels.
These directions matter because an aggregate F1 comparison combines errors with different meanings. Calling a supported or contradicted hypothesis Neutral misses evidence that the premise supplies. Calling an unresolved hypothesis Entailed or Contradict makes a stronger judgment than the premise supports. The reported error analysis gives the reader a way to understand how the smaller encoder can lead on overall F1 while Falcon has an advantage on a particular family of decisions.
The authors also include a confusion matrix for Bonafide on the development set and describe the system as capable of handling ambiguities around wage norms. The Wage development results support the more specific observation that the augmented condition scores higher in that domain. Along with the reported error directions, these results describe behavior on the benchmark. Item-level analysis would be needed to identify which kinds of wage statements became easier or to determine which evidence the encoder used for individual decisions.
Limitations
Limits identified by the authors
The paper identifies computing resources as a limit on the recognition study. The experiments ran in Kaggle notebooks with a single NVIDIA P100 GPU. The authors say this kept them from testing medium and large GLiNER variants. Their architecture comparison consequently covers the available smaller checkpoints and the base versions they could train. The effect of trying a larger version under the same procedure remains open.
The authors also point to long and complex entities as a challenge. The conduct spans in the training set are much longer on average than the other categories, and the development results show their low recall. The paper relates this observation to earlier research on recognizing complex mentions. The difficulty is visible in the benchmark results, and the authors treat it as a reason that detecting violations in complaints can be harder than finding shorter legal or party references.
For recognition augmentation, the authors identify alternatives they did not evaluate, including more contextually diverse generation, adversarial data, and domain-specific paraphrasing. They also propose more elaborate post-processing, such as probabilistic methods or combinations of predictors. These suggestions follow from two reported outcomes: the few-shot synthetic examples yielded no improvement, and the confidence rule yielded a small development gain. The paper leaves the proposed alternatives for future evaluation.
The paper explicitly limits its optimism about increasing the amount of synthetic data. The main inference augmentation helps, and the larger paraphrase collection fails to produce a proportionate additional gain. In the authors’ view, this suggests that how much adding data helps depends on what the new examples bring to the task. Their experiments establish this pattern for the particular paraphrasing procedure and comparison they ran. A general threshold or optimal amount of synthetic training data remains undetermined.
Limits of the comparisons
The paper gives two kinds of evidence about transfer. Inference development uses a rotating legal-domain holdout, and the shared task supplies separate test results for both systems. Domain holdout demonstrates performance on the particular domain omitted from a run’s LegalLens training. It provides no direct measurement on legal domains outside the named collection, and the paper offers no evidence about behavior across jurisdictions or different kinds of legal sources. The deployment population motivating the paper is broader than the benchmark population it measures.
The distinction between original and synthetic material also matters. The inference benchmark’s hypotheses are posts generated to mimic possible violations. Training augmentation then generates paraphrases of those posts and of the associated summaries. Improvement on held-out LegalLens pairs measures performance on that form of evaluation. The study leaves open how the encoder would handle naturally occurring posts paired with case summaries under a matching protocol designed for those posts.
Recognition spans and inference labels are benchmark annotations. A correct extraction agrees with the marked passage and its category, and a correct inference decision agrees with the label assigned to the supplied pair. These evaluations leave factual verification and legal adjudication outside their scope. Agreement with an annotation about what a post says cannot establish by itself that the conduct occurred, that a specific law applies, or that an individual is covered by a case.
The two evaluations also leave the proposed connection between tasks unmeasured. The paper motivates inference as a way to link detected violations with resolved cases, yet its inference inputs are supplied premise–hypothesis pairs. It reports no end-to-end score in which predicted spans from GLiNER become inputs to the matcher. The experiments therefore leave open how missed conduct spans, incorrect party roles, or changes in span boundaries would affect a downstream matching decision.
The deployment-time combination of inference checkpoints introduces another open question. Maximum-confidence selection uses scores from separately trained encoders as if they can be compared directly. A high confidence score measures the encoder’s assessment in its own scoring system. The paper gives no calibration analysis showing how those scores correspond to observed correctness across the domain-holdout checkpoints. It also gives no comparison with voting or averaging, leaving the contribution of confidence selection to the leaderboard result unclear.
The explanation about long spans has an analogous limit. The table describes average length by category and gives performance by category. Since description length and category identity vary together, the data do not isolate the effect of length. The wording of allegations, the rules for assigning the VIOLATION label, and the boundaries used in annotation may matter as well. A breakdown within categories by span length could address a different question. The evidence here establishes that the longest category on average is also the hardest to recover in the reported development run.
Finally, the paper’s larger conclusion about small encoders is supported most directly by the inference comparison with Falcon 7B. That comparison concerns a Tasksource checkpoint with task-specific adaptation and synthetic training pairs, evaluated alongside the baseline the authors cite. The study gives no controlled sweep over sizes or common training conditions that would separate the effects of size, earlier training, and augmentation. Recognition also falls short of the organizer baselines according to the paper’s results discussion. The evidence supports a narrowly grounded claim that the lightweight approach was competitive in the shared task and that its inference configuration exceeded the reported Falcon result in the development comparison.
What came after
There are no documented follow-up studies to trace here. Whether subsequent research adopted Bonafide’s detection filter, its label-preserving paraphrases, or its confidence-based selection across domain holdouts remains open.
Cite
Cite as Shikha Bordia. 2024. Bonafide at LegalLens 2024 Shared Task: Using Lightweight DeBERTa Based Encoder For Legal Violation Detection and Resolution. Proceedings of the Natural Legal Language Processing Workshop 2024.
@inproceedings{shikha2024bonafide,
title = {{Bonafide at LegalLens 2024 Shared Task: Using Lightweight DeBERTa Based Encoder For Legal Violation Detection and Resolution}},
author = {Shikha Bordia},
booktitle = {Proceedings of the Natural Legal Language Processing Workshop 2024},
year = {2024},
doi = {10.18653/v1/2024.nllp-1.21},
url = {https://doi.org/10.18653/v1/2024.nllp-1.21}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bordia-2024-bonafide-legallens-2024-shared-task/