---
title: "A Simple but Effective Context Retrieval for Sequential Sentence"
description: "This paper tests which surrounding sentences help classify rhetorical roles in long legal judgments, comparing nearby context with similarity search."
canonical: "https://research.elamur.ai/free/en/papers/belfathi-2025-simple-but-effective-context-retrieval/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/belfathi-2025-simple-but-effective-context-retrieval/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / A Simple but Effective Context Retrieval for Sequential Sentence Classification in Long Legal Documents

# A Simple but Effective Context Retrieval for Sequential Sentence Classification in Long Legal Documents

Paper · 2025 · Anas Belfathi, Nicolas Hernandez, Laura Monceaux et al.

**Authors:** [Anas Belfathi](https://md.research.elamur.ai/free/en/authors/anas-belfathi/), Nicolas Hernandez, Laura Monceaux and [Richard Dufour](https://md.research.elamur.ai/free/en/authors/richard-dufour/) · **Year:** 2025 · **Venue:** Proceedings of the 12th Argument mining Workshop · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**0** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W4412889336) · [Proceedings of the 12th Argument mining Workshop](https://aclanthology.org/volumes/2025.argmining-1/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2025.argmining-1.15/)
- [PDF](https://aclanthology.org/2025.argmining-1.15.pdf)
- [DOI 10.18653/v1/2025.argmining-1.15](https://doi.org/10.18653/v1/2025.argmining-1.15)
- [OpenAlex](https://openalex.org/W4412889336)

Citations: OpenAlex, 2026-10-14.

## Summary

A sentence in a court judgment can describe an event, raise a question for the court, or help explain the court’s answer. Its role can be difficult to determine from its wording alone. The same reference to an earlier decision might introduce an issue in one passage and support an argument in another. Belfathi and colleagues study how to give a sentence classifier enough of the judgment to make that distinction. Their proposal is to retrieve a small amount of context separately for each sentence, using the rest of the same judgment as the source.

The authors compare two ways to choose that context. The Sequential approach takes sentences immediately before the target, immediately after it, or on both sides. The Selective approach can look anywhere in the judgment. It can draw sentences at random, look for words shared with the target, or use a representation of sentence meaning to find similar passages. The authors also compare ways of ordering the context when the whole document is available. That test helps distinguish the value of seeing more text from the value of seeing it in the order the writer chose.

The experiments use DeepRhole, LegalEval, and SCOTUS, which provide sentence-level rhetorical labels for Indian and U.S. judgments. The paper reports an average improvement of ∼5.5 weighted-F1 points over the baseline in its abstract. Nearby sentences are the more reliable source of improvement in the detailed results. The best direction varies. Earlier sentences are especially helpful in DeepRhole, while the best direction in LegalEval and SCOTUS depends on how the classifier incorporates the context. Similarity-based retrieval sometimes improves on reading the target alone, but its gains tend to be smaller. When the experiments use the full document, the highest scores come from keeping its original order.

In the direct comparisons with a full-document hierarchical system, compact local context gives higher scores on DeepRhole and SCOTUS. The hierarchical system retains a substantial lead on LegalEval. The authors also report lower GPU memory use and faster training and inference for their retrieval-based systems, with the size of those gains depending on the configuration. The study shows that where a sentence sits in a judgment can be more informative about its rhetorical role than which other sentences resemble it. It also shows why the best context policy has to be evaluated together with the system that reads the selected sentences.

## Deep dive: A Simple but Effective Context Retrieval for Sequential Sentence Classification in Long Legal Documents

This paper tests which surrounding sentences help classify rhetorical roles in long legal judgments, comparing nearby context with similarity search. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A sentence has a subject and a job

A judicial opinion is a sequence of sentences, but it is also a sequence of tasks the writer performs. An opening can identify the court and proceedings. A passage can then present a question, recount material relevant to it, or give the court’s reasoning. The paper’s opening illustration shows that distinction with a preamble, an issue, and an analysis passage. Classifying those passages requires identifying what a sentence does in the judgment. Recognizing the subject matter is only part of that work.

Sequential sentence classification is the form of [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) in which each sentence is assigned a label for its role in the larger document. Here the possible labels are rhetorical roles from the relevant dataset. The word *sequential* describes the setting in which the decisions are made. A judgment has an order, and the place of a sentence in that order can help determine its role. The classifier still needs to produce a prediction for each individual sentence.

The difference between a subject and a role matters for building such a classifier. A question about whether a petitioner qualifies for relief can name the same parties, proceedings, and legal requirements as a passage explaining the answer. Those common words make the passages related in topic. The point at which each occurs, and what the surrounding sentences do with it, help distinguish the question from the explanation. Conversely, nearby sentences can use different vocabulary while advancing the same part of the argument. A shift from naming a legal authority to describing a litigant’s situation can be a continuous move within the judgment.

There are also cases in which a helpful neighbor belongs to a different role. An issue statement can lead into the court’s examination of that issue. An opening sentence in the examination might be easier to identify if the classifier sees the question that comes just before it. The relevant clue in that case is the transition. A method that sought context simply by looking for more examples of what the target sentence already says could overlook it.

The authors motivate the task partly through uses of labeled text. A judgment marked by rhetorical function offers another way to find passages for [information retrieval](https://md.research.elamur.ai/free/en/topics/information-retrieval/). The labels can also inform [text summarization](https://md.research.elamur.ai/free/en/concepts/text-summarization/), where the function of a passage can matter to what gets included. These are reasons to study rhetorical classification. The paper evaluates the quality of the sentence labels themselves.

#### Why longer input only addresses part of the problem

A classifier that sees a single sentence has to infer its role from internal clues. Giving it more of the judgment may supply missing evidence, but brings two choices with it. The first is how much text the system can accept. The second is which text it can use well. These choices matter separately. A longer permissible input is valuable when useful evidence lies far away, but the presence of that evidence among many other sentences gives the reader another problem to solve.

The paper discusses this issue for encoder-only systems. An encoder converts text into representations that a classification layer can use to choose a label. In a conventional [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), self-attention lets positions in the input contribute to the representation of other positions. The cost of comparing positions grows quadratically with sequence length in the standard arrangement. This helps explain why the length of a whole judgment presents a problem even if an encoder is a good fit for a classification task.

Earlier work reduces that cost with sparse attention. By restricting which positions directly attend to one another, such systems can expose the encoder to longer inputs. The paper cites several examples, including [Big Bird](https://md.research.elamur.ai/free/en/papers/zaheer-2020-big-bird-transformers-longer-sequences/). It also discusses advances in longer-context encoders, citing [ModernBERT](https://md.research.elamur.ai/free/en/papers/warner-2024-smarter-better-faster-longer-modern/). For the authors, the task still calls for a way to concentrate evidence about individual sentences inside a large input.

A related concern is that additional text can make some decisions harder. A judgment can return to a party, event, question, or legal principle at different stages. The extra mentions may be relevant to the case as a whole while contributing little to the role of the current sentence. The authors connect this concern to earlier research on [distraction from irrelevant context](https://md.research.elamur.ai/free/en/papers/shi-2023-large-language-models-easily-distracted/). In the legal classification experiments, the practical question is which parts of the available text make good evidence for a particular prediction.

#### How earlier sequential classifiers used context

The main alternative in the paper is hierarchical processing. A hierarchical classifier encodes the text in stages. It can first construct a representation for each sentence and then use the sequence of those representations to take the rest of the document into account. In effect, it moves the long-range part of the work away from a single flat input containing every word. The representation used for a sentence can depend on information from the judgment beyond that sentence.

The Hierarchical Sequential Labeling Network, abbreviated HSLN, is the authors’ main example of this design. The paper traces it through prior work on medical abstracts, cross-domain sentence classification, and legal documents. It connects the legal application to the [Corpus for Automatic Structuring of Legal Documents](https://md.research.elamur.ai/free/en/papers/kalamkar-2022-corpus-automatic-structuring-legal-documents/).

The literature also includes ways to improve what a hierarchical system learns. The paper describes earlier work that used contrastive and prototypical learning to make better use of similarities among sentences. It also describes hierarchical curriculum learning, where training progressively addresses rhetorical labels at different levels of detail. In both cases, the changes concern how the classifier learns to distinguish roles. The retrieval paper focuses on what text the classifier gets for each decision.

The authors situate that choice alongside prior studies of context retrieval, including work on local and global evidence for named entity recognition and work on multi-label sequential sentence classification. Their claim of a gap is specific. They identify sentence-level retrieval for improving pretrained encoders on sequential sentence classification as the question they want to isolate. To do this, they test rules that can be described independently of the classifier, such as taking the next sentences or ranking all candidate sentences by their resemblance to the target.

This framing produces a concrete comparison. A full-document system has access to every part of the judgment through its hierarchy. A retrieval-based system makes a judgment about relevance before it encodes the selected text. Nearby context is a bet on the continuity of writing. Similarity search is a bet on the value of related language, wherever it occurs. A comparison between them can reveal what kinds of evidence travel well from one sentence to another in these documents.

### The method, step by step

#### Make the current sentence the focus

The starting point is a document already divided into sentences. The classifier deals with each sentence in turn as the target. For any given decision, a retrieval rule chooses other sentences from the same document. When the next sentence becomes the target, the procedure can choose a different context. A passage that serves as evidence for an earlier decision will therefore also receive its own prediction when it becomes the sentence under examination.

The retrieval step is separate from the label prediction. It determines which pieces of text the classifier can use. The classifier then takes the target and the selected context and estimates the target’s rhetorical role. During training, the label of the target supplies the learning signal for this prediction. The context sentences provide text for that example. When one of them becomes the target of its own example, its label can supply the signal for that separate decision.

The document itself defines the available source. The immediate context comes from the same judgment, and the search-based rules also stay within that judgment. The experiment therefore asks how to choose among evidence that already belongs to the current case. It does not require finding other judgments about the same question or retrieving the full text of a decision cited in the target.

From a legal judgment to sentence labels The steps in order.

#### Choose by position

The Sequential family consists of Before, After, and Surrounding. Before takes the sentences immediately preceding the target. It gives the classifier the lead-up to the sentence, which can include the beginning of a passage or material the target assumes the reader has just seen. After takes the sentences immediately following the target. That can show whether a new statement gets developed, qualified, or used to introduce a later step.

Surrounding allocates its context budget to both directions. The division used for each side is:

```
k / 2
```

Here `k` is the total number of sentences to retrieve as context for the target. The slash indicates division, and `2` is the divisor because the budget is shared equally between the preceding and following sides. The authors use even values of `k` for this comparison so that the allocation on each side is a whole number of sentences.

This matters when comparing the rules. Before can devote the entire budget to what the author has already established. Surrounding spends part of the same budget on what comes next. If Surrounding does better, the additional direction is worth more in that comparison than the extra preceding sentences it displaces. If Before does better, concentrating the available space on the preceding passage is the stronger policy under those conditions.

The paper keeps the original order for sequential input. Earlier sentences still come before later ones, and the retrieved neighbors follow the movement of the original passage. That is a meaningful feature of the method. Two collections can contain relevant information while differing in whether the classifier sees the progression from an issue to its examination. Selecting consecutive sentences and retaining their order gives the reader the kind of short passage a person would encounter when reading the judgment.

#### Choose by resemblance or by chance

The Selective family takes candidates from anywhere within the judgment. Its least informed rule, Random, samples context sentences without ranking them by the target’s words or meaning. It serves as a comparison for the idea that adding more text from the same case might help by itself. Sharing a case gives the sentences a common setting, but gives the rule no reason to prefer those immediately relevant to the current rhetorical move.

BM25 ranks candidate sentences using lexical evidence. It treats the target as the text to match and uses term frequency and inverse document frequency to help score other sentences. The basic intuition is that shared wording can indicate relevance, with informative terms carrying more weight than terms that occur broadly. The related weighting idea is [TF-IDF](https://md.research.elamur.ai/free/en/concepts/tf-idf/).

Sentence-BERT uses a numerical representation of each sentence and selects those whose representations are closest to the target’s. The paper describes the retriever as a siamese BERT system, meaning that the sentences being compared are represented through a shared encoding approach. The intended benefit is that sentences can be close in meaning even when their precise wording differs. The paper bases this retrieval option on [Sentence-BERT](https://md.research.elamur.ai/free/en/papers/reimers-2019-sentence-bert-sentence-embeddings-siamese/).

These policies look for different kinds of evidence. BM25 can favor text that repeats an informative legal term. Sentence-BERT can favor text that discusses a similar situation with different expressions. Random supplies a case-wide sample without seeking either relation. All can return sentences far from the target. This flexibility would matter if a later or earlier discussion were useful and a short window could never reach it. It also permits a retrieved sentence to come from a passage doing quite different work.

The paper illustrates the choices with a SCOTUS sentence that identifies fair presentation as the point at issue. Before retrieves a citation to an earlier decision. After gives procedural background about the respondent’s appeals. Surrounding includes material from each side. The search-based examples bring in passages concerned with matters such as appellate review or whether a petition gave notice of the federal nature of a claim. The illustration shows the sorts of connections the rules make. It does not identify a retrieved sentence whose individual effect on the prediction was measured.

#### Vary the amount and order of context

For the short-context experiments, the authors restrict the number of retrieved sentences because of computational constraints. The upper bound is:

```
k ≤ 6
```

Here `k` is the context budget in sentences. The sign `≤` means that the budget is at most the value on its right, and `6` is the upper bound used in the short-context study. The target is the sentence being classified. The budget describes the additional sentences chosen to help with that decision.

A sentence budget allows the authors to compare rules that choose the same amount of context in sentence terms. It leaves some variability in the actual token input. A long neighboring sentence may contain much more text than a short one, and different rules can choose different mixes. The paper also reports a typical token count for one BERT setting, which addresses the amount of text that the encoder processes from another angle.

In a separate ordering experiment, the authors use the full set of sentences:

```
k = N
```

In this setting `k` is the context setting and `N` denotes the number of sentences in the document. The equals sign indicates the full-document condition. The authors use this notation to mark the experiment in which every sentence remains available while their order can change.

The sequential arrangement keeps the order of the judgment. The selective arrangements use the retrieval policies to produce an order, including relevance rankings where the rule estimates relevance. With the full document present, a score difference cannot be explained by one arrangement having omitted a sentence that another retained. What changes is how the available material is presented. A sentence can move closer to or farther from the target in the supplied sequence, and a pair that formed a continuous passage in the judgment can become separated. Thus the comparison addresses the value of the written order as a whole.

The short-context and full-document conditions answer complementary questions. The short-context study asks what to retain when there is a small budget. The full-document study asks what happens when the text stays available and the way it is sequenced changes. Using both makes it possible to discuss the contribution of proximity without assuming that every score difference comes from the presence or absence of a particular sentence.

#### Study context with a modified hierarchy

The first experimental system starts from HSLN. The authors adapt it so that they can vary the target’s context while still making a prediction for every sentence in the document. The appendix describes the components used to turn the selected text into a decision.

BERT first provides word-level representations for the target and context sentences. A bidirectional long short-term memory network, or Bi-LSTM, then runs over the representations within sentences. Bidirectional processing lets a position incorporate information from both earlier and later positions in the sequence it is reading. Attention-based pooling combines information from those positions into a representation of the sentence. In this stage, pooling gives the next part of the system a sentence-level representation to work with.

The context enrichment layer operates across sentences. It refines their representations using information about their relationships. The final classification layer takes the refined representation of the target and transforms it into scores called logits, with a score associated with each rhetorical label. A softmax converts the scores into a distribution over the labels. The prediction is made from that distribution.

The authors remove the conditional random field, abbreviated CRF, that the original HSLN uses. A CRF for sequence labeling can make the decisions about neighboring labels interdependent. In the adapted system, context has already influenced the target’s representation before the label is chosen. The training objective focuses on the current target sentence. The rationale for dropping the CRF comes from earlier ablations that found the contextual enrichment layer especially important to HSLN’s effectiveness.

This architecture keeps a sentence-level stage and an inter-sentence stage. It lets the authors ask what happens when they change the source or amount of context entering the same general classification procedure. The original BERT-HSLN used as a reference in the later comparison is a different configuration from this adapted system. It processes full documents and retains the original architecture for that benchmark.

#### Put retrieved text directly into an encoder

The second set of experiments asks whether the context rules are useful in a simpler classification setup. The selected sentences are combined with the target in the input to a pretrained encoder. For the Sequential heuristics, the input follows the original order of the judgment. Here the selected text can affect the target’s prediction through the encoder itself. This is the main alternative evaluated against the original BERT-HSLN.

The primary experiments use BERT and Nomic-BERT. The latter is associated with the paper on [Nomic Embed](https://md.research.elamur.ai/free/en/papers/nussbaum-2024-nomic-embed-training-reproducible-long/). The target-only version of each encoder gives a baseline for the same classification task. The appendix repeats the enrichment comparison with Legal-BERT, Longformer, and [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/).

The reported configurations use the best short-context setting observed for each heuristic in the context analysis. This is important for reading the results. The Before row represents Before with its selected configuration. It need not use the same context length as a row for BM25 or as the corresponding row on another dataset. The initial study of context length and the subsequent encoder comparisons therefore address different questions. The initial study tracks what happens across lengths in the adapted hierarchy. The later comparison asks how well selected settings transfer to direct input enrichment.

The authors split the data by document so that sentences from a judgment stay in the same partition. Training uses `80%` of the documents, validation uses `10%`, and testing uses `10%`. The reported results are averaged over three runs. They also release the experimental code under an open-source license through the `AnasBelfathi/ACL-2025` repository.

### Experiments and results

#### Datasets, metric, and baselines

DeepRhole and LegalEval are collections of Indian judgments. SCOTUS is drawn from U.S. judgments. DeepRhole uses `7` rhetorical labels. LegalEval and SCOTUS each use `13`. In each case, the classifier’s job is to assign the dataset’s labels to sentences across complete documents. These counts describe the label inventories. The aggregate scores do not tell a reader which individual distinctions within those inventories are most difficult.

The reported performance measure is weighted F1. For a given role, F1 combines precision and recall. Precision reflects how often sentences assigned that role actually have it. Recall reflects how many sentences annotated with that role the system recovers. Weighted F1 combines the label-wise scores according to how frequently the labels occur in the evaluation data. A common role therefore contributes more to the aggregate than a rare role does. This measure summarizes performance on the distribution of labels in the benchmark, while leaving open how evenly the gains are spread across roles.

There are two important references for the scores. A target-only encoder answers how well a particular system can classify a sentence without supplying any retrieved text. Comparison with that encoder shows whether a context policy helps in the direct enrichment setup. Original BERT-HSLN answers a different question. It is the paper’s full-document reference, with a stage for contextualizing sentences across the judgment. Comparison with it tests whether a compact input can compete with an established approach that has a broader view of the text.

The main and appendix encoder tables mark statistically significant differences relative to the relevant target-only baseline. The symbols `†` and `‡` correspond to `p = 0.05` and `p = 0.01`, respectively. Here `p` denotes the significance level reported for the comparison. A marker on a context row refers to its comparison with the matching baseline. It does not establish a significance result for a comparison against BERT-HSLN or against another context rule.

#### What happens as the context grows

The initial study varies the number of sentences given to the adapted hierarchy. In LegalEval, Surrounding reaches `83.6%` weighted F1 with `k = 6`. In SCOTUS, it reaches `79.2%` weighted F1 at the same context length. These are the strongest sequential results the authors describe for those datasets in that analysis. In DeepRhole, Before is strongest and reaches `58.2%` weighted F1. The paper interprets the contrast as evidence that the useful direction of context can depend on the document collection.

Surrounding’s advantage in the first two cases is consistent with evidence being available before and after the target. For example, preceding sentences can establish the subject of a passage, while later ones can reveal what the writer does with a newly introduced sentence. DeepRhole’s Before result is consistent with a judgment developing a role over consecutive sentences, where the material already read provides a strong guide to the current sentence. These are interpretations of classification results. The study does not trace individual decisions to particular sentences on either side.

Selective retrieval gives smaller gains in the same study. One result the authors single out is BM25 reaching `≈ 74%` weighted F1 on SCOTUS within the short-context range. The limited benefit in general motivates a distinction between finding text about a similar matter and finding text that identifies the function of the target. A lexical match can be strong on the first criterion even when its location or rhetorical role makes it weak evidence on the second.

The weighted F1 results from the adapted hierarchy should be read with that architecture in mind. In the later results, the selected sentences enter the encoder directly. A heuristic can be the best choice in the first study and lose that position in the second. The paper’s direct comparisons show this especially clearly for Surrounding and After.

#### DeepRhole

DeepRhole gives the clearest case for using preceding sentences. BERT scores `52.23` weighted F1 with the target alone and `67.18` with Before. With Nomic-BERT, Before also leads the short-context configurations. Surrounding gives a substantial improvement on the target-only Nomic-BERT result as well. After raises the score, but its gains are more limited than those from assigning the whole budget to preceding text.

Nomic-BERT context choices and BERT-HSLN on DeepRhole, weighted F1 Preceding sentences give Nomic-BERT the highest score and put it ahead of the full-document reference.

**The numbers**

| System or setting | weighted F1 |
| --- | --- |
| Nomic-BERT target only | 50.32 |
| Nomic-BERT with Before (this paper) | 67.89 |
| Nomic-BERT with After | 57.75 |
| Nomic-BERT with Surrounding | 65.51 |
| Nomic-BERT with Random | 51.61 |
| Nomic-BERT with BM25 | 53.90 |
| Nomic-BERT with Sentence-BERT | 54.02 |
| BERT-HSLN | 54.45 |

The selective trials give a more mixed picture. With BERT, BM25 yields `51.59` weighted F1 and Sentence-BERT yields `52.23`, the same score as the target-only encoder for the latter. Random context gives the lowest BERT score on this dataset, `46.86`. The Nomic-BERT rows show that results from selective retrieval depend on the encoder as well as the rule. Its selective rows increase over the target-only result, with the statistical marker on Sentence-BERT. Even its highest selective score falls short of its local results.

This is also a dataset on which the short-context systems exceed the full-document reference. The comparison is instructive because the entire judgment contains the preceding text that Before uses. The original hierarchy still has to integrate it with the other parts of the document. Retrieving the preceding passage makes that material the explicit context for the decision. The score difference establishes the value of the complete short-context setup on this benchmark. It does not by itself identify which operations in the hierarchy are responsible for the difference.

#### LegalEval

On LegalEval, After leads for both main encoders. With BERT, it reaches `79.74` weighted F1, followed by Before at `78.41`. Surrounding gives `77.27`, also above the BERT target-only score. Nomic-BERT shows the same ordering among the local rules. This differs from the adapted hierarchy, where Surrounding led the short-context analysis. The strength of the following passage carries across the direct encoder comparisons, while the preferred allocation of a fixed context budget changes with the architecture.

BERT context choices and BERT-HSLN on LegalEval, weighted F1 Following sentences give the strongest direct BERT result, while BERT-HSLN retains the lead.

**The numbers**

| System or setting | weighted F1 |
| --- | --- |
| BERT target only | 69.74 |
| BERT with Before | 78.41 |
| BERT with After (this paper) | 79.74 |
| BERT with Surrounding | 77.27 |
| BERT with Random | 67.05 |
| BERT with BM25 | 69.43 |
| BERT with Sentence-BERT | 68.98 |
| BERT-HSLN | 93.06 |

With Nomic-BERT, the best local score is `81.11` weighted F1 for After. Before gives `80.54` and Surrounding gives `78.20`. BM25 reaches `70.82`, and Sentence-BERT reaches `70.76`, against `68.90` for the target-only Nomic-BERT. The table marks both similarity-based comparisons as significant at the stricter of its reported significance levels. Their improvement is useful evidence that the relevant retrieval policy can depend on the encoder. It remains smaller than the improvement from nearby sentences in these runs.

LegalEval is the main exception to the comparison with BERT-HSLN. The full-document reference leads by a substantial margin despite the gains within the simpler encoders. This matters because a good result against a target-only system and a good result against a hierarchical system are distinct accomplishments. A reader choosing between ways to add context can find strong evidence for the local policies here. A reader choosing between the full systems has to account for the much stronger hierarchical result.

#### SCOTUS

For SCOTUS, BERT with After gives the highest score among the main direct-enrichment results. Before also improves on the target-only BERT score. Surrounding gives `75.47` weighted F1 against `75.58` for BERT with the target alone. In this comparison, spending part of the budget on each direction is less productive than concentrating the budget on either direction. This differs from the context-length study, where Surrounding was strongest in the adapted hierarchy.

BERT context choices and BERT-HSLN on SCOTUS, weighted F1 Following sentences lead the BERT settings, and preceding sentences also place BERT ahead of the hierarchical reference.

**The numbers**

| System or setting | weighted F1 |
| --- | --- |
| BERT target only | 75.58 |
| BERT with Before | 79.74 |
| BERT with After (this paper) | 81.34 |
| BERT with Surrounding | 75.47 |
| BERT with Random | 74.70 |
| BERT with BM25 | 75.96 |
| BERT with Sentence-BERT | 76.24 |
| BERT-HSLN | 79.66 |

Nomic-BERT’s local results are closer together. After reaches `81.32` weighted F1, Before `81.12`, and Surrounding `80.81`. All improve on its target-only score of `75.50`. Its selective results also increase over that baseline. BM25 gives `77.06` and Sentence-BERT gives `77.17`, with significance markers for both comparisons. This is a case where searching the same document for matching material can help, while the local approaches still produce the stronger scores.

The comparison with BERT-HSLN supports the paper’s claim that a compact context can be competitive with an entire-document hierarchy. It does so on this dataset with both main encoders, and with context from more than one direction. The particular BERT Surrounding score is a reminder that the favorable comparison applies to specific choices of context. Simply giving the encoder a passage with text on both sides does not guarantee an improvement.

#### Additional encoders and computational cost

The appendix tests whether the main pattern recurs with RoBERTa, Legal-BERT, and Longformer. DeepRhole again favors Before for each of these encoders. Legal-BERT with Before reaches `69.10` weighted F1 against `54.06` for its target-only baseline. RoBERTa with Before reaches `68.29` against `52.63` for the baseline. Longformer with Before gives `67.62` against `53.83`. This agreement is especially informative because it appears across several ways of encoding the selected passage.

LegalEval again favors After in the additional experiments. Legal-BERT reaches `80.99` weighted F1 with that policy, RoBERTa reaches `80.12`, and Longformer reaches `80.09`. The strongest selective Longformer result on LegalEval is `77.95` with Sentence-BERT. That score is above Longformer’s target-only result of `72.57` and above its Surrounding result of `73.09`. It provides a useful qualification to the general advantage of local context. Similarity search can beat a particular local rule, even on a benchmark where another local rule leads.

For SCOTUS, the additional encoders disagree about which direction is best. Legal-BERT favors After and obtains `82.81` weighted F1. RoBERTa and Longformer favor Before, at `81.75` and `81.58`, respectively. Each of those results exceeds the paper’s BERT-HSLN reference on SCOTUS. The pattern across encoders gives stronger support for selecting local context than for choosing one direction in advance for this dataset.

The authors also compare the computational demands of the short-context systems and BERT-HSLN. With `k = 6`, the BERT-based retrieval setup typically processes around `500` tokens per example. BERT-HSLN builds sentence representations across a whole document and uses additional components to contextualize them. The paper reports a GPU memory reduction of `∼3× to 5×` and training and inference that are `∼2× to 4×` faster, depending on the batch size and system configuration.

These resource measurements concern the classification setups being compared. The short-context procedure makes a prediction for every sentence, so two target inputs can contain some of the same context. The full-document system organizes its work around the document sequence. The per-example token count helps explain the scale of the compact input, while the reported timing and memory ranges convey the practical comparison for the authors’ configurations.

### What the ablations show

#### How much context to add and which side to use

The paper’s main controlled comparisons change the available context. It also uses earlier findings about HSLN’s components to choose the adapted architecture. The authors’ decision to drop the CRF is based on those earlier ablations. The new experiments center on the text available to the classifier, its amount, and its order.

Varying context length within the adapted hierarchy shows that useful local evidence extends beyond the target sentence. The paper describes a pattern of improving scores as more nearby sentences are included in the tested range. Because the rule can stay fixed while the window grows, the comparison is more informative than a single target-only versus enriched comparison. It indicates that the next additions to the local passage can still contribute information at the lengths examined.

Changing direction tests a different question. Before and After give the classifier equally many additional sentences at a matched budget, but the information is available at different places in the author’s exposition. Before can capture a setup the sentence takes for granted. After can capture the explanation that establishes what the sentence was introducing. Surrounding divides the available space. Its result depends on whether access from both sides compensates for seeing fewer sentences from each individual side.

The adapted hierarchy favors Surrounding in LegalEval and SCOTUS. Yet the direct BERT and Nomic-BERT experiments favor After on those datasets. The comparisons together support a limited account of the importance of nearby text. They show that both the source of the text and the way the classifier receives it matter. They give weaker grounds for a general claim about how much of a context budget should go to either side. In DeepRhole, the recurring success of Before across systems gives the evidence for a directional preference more weight.

#### Why random and similar sentences are informative comparisons

Random selection makes it possible to ask whether supplying text from the same case is enough to account for a gain. A random sample can contain relevant names, events, and legal language. It can also supply material with little connection to the immediate decision. The frequent declines with Random show that extra case text needs some basis for selection if it is to help reliably. The Nomic-BERT results also show that random context can sometimes yield a small increase, which is consistent with chance selection finding useful material in some judgments.

Comparing BM25 with Sentence-BERT probes two definitions of similarity. BM25 emphasizes lexical evidence. Sentence-BERT can connect sentences whose wording differs. Neither policy specifically identifies a transition such as the move from an issue to analysis. Success at finding a related passage therefore cannot be equated with success at finding evidence of the target’s role. The consistent advantage of the strongest local policies suggests that useful rhetorical context often depends on the placement of text within the judgment.

There are two possible reasons for a weak selective result in the authors’ interpretation. A document may lack other sentences that are close to the target in meaning, so taking a fixed number of results can bring in weak matches. Alternatively, a close match in meaning may exist, but it may be doing different work at a different point in the judgment. These explanations imply different problems. The first concerns the quality of what a ranking can retrieve from the available text. The second concerns whether the ranking is aimed at the right kind of relevance for a rhetorical label. The reported scores are compatible with both.

The strongest selective comparisons prevent a blanket conclusion about document-wide search. For Nomic-BERT on SCOTUS, both lexical and semantic selection improve the target-only result and carry significance markers. Selective context also gives significant gains for Nomic-BERT in LegalEval. The evidence supports the view that useful remote material can exist, while proximity supplies a more dependable signal across the tested systems and datasets.

#### What sentence order contributes

The full-document experiment controls the contents of the input while changing their arrangement. In the human-written order, a reader can follow issue statements, background, and reasoning as the writer presents them. Relevance order gathers material according to its relation to the target, which may bring topical matches together while disrupting that flow. Since every sentence remains available in the full-document condition, the comparison tests the consequences of those different arrangements.

The authors report the highest full-document scores when the written order is preserved. This observation supports the importance of sequence structure independently of a short-window policy’s ability to leave irrelevant sentences out. Even when a sentence is present in both versions, its relation to the surrounding sentences changes when the document is rearranged. For a task that assigns roles within discourse, that change can affect the available evidence.

The ordering result also helps explain why stronger retrieval by semantic similarity would not necessarily reproduce the benefits of local context. The advantage of a local passage may lie partly in which sentences it contains and partly in how those sentences form a coherent piece of the judgment. The full-document study shows that an arrangement based on resemblance can lose value even when it retains the contents. It does not tell us how a short passage selected by similarity would perform if its sentences were restored to document order under every configuration.

#### What the consecutive labels help explain

The authors look at the persistence of roles in DeepRhole. They report that a rhetorical label lasts approximately `8.56` consecutive sentences on average before a switch. They define these runs using consecutive sentences annotated with the same label. The result gives a concrete reason why nearby text can be informative. A target occurring within such a passage will frequently be near other sentences serving the same function.

This corpus analysis is especially consistent with the performance of Before. If a run is already underway, the preceding text gives the classifier a sample of how the document has been developing that role. It also suggests why a full-document hierarchy might gain little from material elsewhere in the same judgment when the immediate passage is already strongly informative. The authors propose that content from other parts can dilute the signal of the relevant neighborhood.

The run statistic alone does not explain every feature of the result. A long run creates opportunities to find shared rhetorical context on either side. It does not independently show why preceding sentences are more informative than following ones. The directional comparison supplies that empirical evidence in DeepRhole. The further suggestion that the judgments develop their arguments progressively is an interpretation of the pattern. Confirming it would require evidence about where in a passage the gains occur and which errors are reduced.

### Limitations

#### Limits the authors identify

The authors describe their retrieval policies as deliberately simple. The study was designed to investigate context with straightforward rules, leaving open what a more elaborate policy could achieve. The results consequently compare concrete forms of proximity, lexical matching, and sentence similarity. They establish how those forms behave in the experiments, while the question of the best possible retrieval approach remains open.

The search space is also deliberately limited to one judgment. A document may contain little material similar to a target sentence, even if useful material exists elsewhere in a collection. The authors propose expanding retrieval to multiple documents and improving the quality of the selective results. Their stated interest is in whether richer evidence could be retrieved while controlling the introduction of irrelevant sentences.

The authors also limit the scope of generalization. They work with English-language legal documents that have labels at the sentence level. The findings may depend on the way legal judgments develop an argument, present facts, or mark a decision. The paper leaves open whether the same gains would occur in other domains or on tasks where a sentence’s role has a different relation to document order.

#### Limits of the context comparisons

The short-window experiments explore only the range the authors could evaluate within their computational constraints. The full-document condition addresses ordering and represents a much different use of context. The results do not trace what happens through all intermediate lengths. A rule that continues to benefit from more local text over the tested range may eventually reach passages with different roles. Conversely, a useful remote cue could lie outside the tested window yet be too weak to appear near the top of a similarity ranking.

The unit of the context budget also matters. Equal numbers of sentences can yield different token counts and different amounts of information. A short citation, a lengthy account of facts, and an issue statement all count as sentences for selection. This means the comparisons control how many annotation units a rule draws on at a matched budget. They do not guarantee equal text length or equal work for the encoder.

Proximity and preservation of the written order also work together in the Sequential family. The full-document ordering comparison shows that arrangement can matter when all sentences are included. It does not break down the short-context advantage into a contribution from selecting nearby sentences and a separate contribution from presenting those sentences in order. Nor does the paper establish whether a short context could benefit from combining a local passage with an especially useful distant match. The tested policies give comparisons among specific ways to form context.

The strongest evidence for relevance is downstream performance. The paper illustrates what each retrieval rule can return, but does not report human judgments of the usefulness of those individual results. A classifier might benefit from wording patterns, transitions, the persistence of a role, or other cues shared by nearby sentences. Aggregate gains do not specify which cue was decisive in a particular prediction. The study shows that the passage can improve the decision without tracing every improvement to an explanation at the sentence level.

#### Limits of the system comparisons

The direct encoders with retrieval differ from the original BERT-HSLN in how they represent context, what they process for each prediction, and how they make label decisions. Their comparison answers which complete setup performs better on each benchmark. It cannot isolate the impact of replacing a full document with a short passage while holding every other architectural choice fixed. The adapted hierarchy gives more direct comparisons among context settings for a shared architecture, but serves a different experimental purpose from the original reference.

The statistical markers in the encoder tables have a similarly specific interpretation. They support comparisons with the relevant target-only baselines. A high score with a marker can demonstrate improvement from enrichment in that encoder. The marker does not quantify the statistical evidence for a difference between Before and After or between a retrieval-based system and the hierarchy. The paper does report results averaged over three runs, which avoids relying on a single run for the reported aggregate.

LegalEval deserves particular attention when interpreting the system comparison. The authors suggest that more complex label distinctions may help explain why the compact systems fall short. The scores themselves do not establish that cause. SCOTUS also has `13` labels and permits a different outcome against the hierarchical reference. The number of labels alone gives no measure of how difficult the distinctions are or which ones benefit from a larger context.

The performance tables also summarize results with weighted F1. Improvements on frequent roles can make substantial contributions to that score. In the absence of a per-role breakdown of those gains, a reader cannot infer that rare roles or sentence-level transitions improved by the same amount as the aggregate. The DeepRhole run analysis gives some information about how labels are arranged, but does not establish where within those runs the classifier made fewer mistakes.

The reported efficiency gains depend on batch size and configuration, as the authors make explicit. The compact input and the full-document hierarchy divide the work differently. The results therefore establish that the retrieval-based setups used in the paper can require fewer resources and run faster under the reported conditions. They leave room for a different balance with other hardware, implementation choices, or document length distributions.

#### Which evidence is available at prediction time

After and Surrounding use future sentences in the judgment. That is appropriate for the study’s task, which labels complete documents. If a system had to label text while it was still being written or received, those policies would need to wait for later text. Before uses evidence already available at the point of the target. Document-wide selective retrieval, in contrast, assumes access to the judgment being searched. The paper does not compare these policies under a requirement to predict before the full judgment is available.

The experiments establish gains in rhetorical role classification. They do not evaluate whether substituting those labels into a larger system improves its search results or summaries. Those applications motivate the work, and the label improvements are pertinent to them. The effect on an application would also depend on which roles it needs, how it uses the labels, and what errors its users encounter.

### What came after

There are no later works to discuss here. The paper itself identifies two directions for follow-up. The first is to look beyond the current judgment for useful context. The second is to improve selective retrieval so that the sentences it finds contribute evidence about the target’s rhetorical role without adding distracting material. Those questions remain open in the paper. Its experiments establish the strength of nearby, coherently ordered context on the legal benchmarks it studies.

## Cite

Cite as Anas Belfathi, Nicolas Hernandez, Laura Monceaux and Richard Dufour. 2025. A Simple but Effective Context Retrieval for Sequential Sentence Classification in Long Legal Documents. Proceedings of the 12th Argument mining Workshop.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2025.argmining-1.15](https://doi.org/10.18653/v1/2025.argmining-1.15)

```bibtex
@inproceedings{belfathi2025simple,
  title = {{A Simple but Effective Context Retrieval for Sequential Sentence Classification in Long Legal Documents}},
  author = {Anas Belfathi, Nicolas Hernandez, Laura Monceaux and Richard Dufour},
  booktitle = {Proceedings of the 12th Argument mining Workshop},
  year = {2025},
  doi = {10.18653/v1/2025.argmining-1.15},
  url = {https://doi.org/10.18653/v1/2025.argmining-1.15}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
