Semantic role extraction in law texts: a comparative analysis of language models for legal information extraction
Paper · 2025 · Roos M. Bakker, Akke J. Schoevers, Romy A. N. van Drie et al.
Summary
Turning a legal provision into a rule that software can use starts with a deceptively simple question. Who is doing what, what does the action affect, and whom is it directed towards? In a long provision, an answer may be spread across several phrases, and grammatical position can be misleading. A party mentioned first in a passive sentence may be the recipient of the action. The paper treats this part of legal information extraction as a specialized form of semantic role labeling. It asks whether a system can identify the words that fill the Action, Actor, Object and Recipient slots in Flint, a formal language for recording interpretations of norms. Those slots describe the act itself. The wider Flint frame also records conditions for the act and changes that follow from it.
The authors collected 2335 annotations of sentences from EU regulations in English, with some sentences labeled by several people. They used the data to adapt BERT variants through fine-tuning, meaning that the systems learned from sentences with the desired labels already marked. They compared those systems with grammatical rules, a method that translates general semantic roles into Flint roles, and prompts sent to GPT-3.5 Turbo and GPT-4 without updating their parameters. They also tested whether multilingual BERT could learn the task from Dutch annotations and apply it to English legislation.
The systems trained on English Flint annotations led the English evaluation. EURLEX-LEGAL-BERT reached 0.896 token accuracy on the English test split. LEGAL-BERT had the strongest English result when the evaluation required both the right role and exactly the right phrase boundaries, with a strict span F1 of 0.822. Standard BERT reached 0.879 English token accuracy, and multilingual BERT trained on Dutch reached 0.829 on the same English test. The strongest prompted GPT result reached 0.627 token accuracy in English and 0.644 on the separate Dutch test. Both came from GPT-3.5 Turbo given labeled examples and a prescribed answer format.
The comparison shows why the intended use matters. A system can correctly recognize that part of a phrase names a recipient and still deliver an incomplete entry for a Flint frame. Objects and recipients were difficult for the systems and were also the roles on which human annotators agreed less. In this study, training on examples of the exact task gave better results than prompting alone, and legal pretraining gave the strongest results among the fine-tuned variants. The findings concern suggestions for parts of a legal interpretation, with whole-frame construction and legal validation beyond the experiment’s scope.
Deep dive: Semantic role extraction in law texts: a comparative analysis of language models for legal information extraction
A comparison of how rules, fine-tuned BERT and prompted GPT extract actions and participants from legislation for the Flint framework. · about 34 minutes to read
The problem and its context
Making an interpretation explicit
A law, agreement or policy may tell an organization what it can do under certain circumstances. The text may identify the organization in one phrase, describe the action in another, and qualify the permission elsewhere. To turn the provision into something a program can reason over, a person has to decide what those pieces mean in relation to one another and record that decision in a form the program can use. The article studies the labor involved in getting from the words of a provision to some of the entries in that representation.
The paper traces its account of normative relations to Hohfeld’s distinction between pairs of legal positions. In the Power–Liability pair, one party may perform an act that affects the legal position of another. A Duty–Claim pair involves an expectation that one party will act for the benefit of the other. The distinctions give a formalism a way to record relations between parties whose positions would otherwise be described using broad words such as rights and duties. Flint draws on this account to represent an interpretation using frames, which are records with named fields.
The current distinction that matters in the paper is between act frames and fact frames. An act frame organizes information around something a party can do in the normative setting. Action names what happens. Actor names the party that performs it. Object denotes what the action operates on, and Recipient denotes the party toward whom the act is directed. The recipient may benefit from the act or be adversely affected by it. These categories describe relationships to the act. The grammatical subject is a clue about those relationships, and its usefulness depends on how the sentence is written.
A Flint act frame also says what must hold for an act to be valid and what changes as a result. A precondition represents a requirement that must be satisfied. A postcondition records a change in the normative state, either introducing a fact or ending one. In the paper’s simplified example about collecting personal data, the processor is the actor, the personal data are the object, and the data subject is the recipient. The example makes lawful, fair and transparent processing in relation to the data subject a condition on the act. It also describes a resulting requirement for the controller to be able to demonstrate compliance. The collection action and the compliance requirement have distinct places in the same frame.
That distinction sets the scope of the experiment. The authors focus on the slots for the action and its participants because the words needed to fill them can often be found in the same sentence. Conditions may depend on material elsewhere. Even when a condition is present in the same sentence, identifying the action at its center may produce the wrong entry for the main act. The benchmark isolates a part of the work that can be evaluated by marking words in individual sentences.
The practical setting is a collection of tools for preparing and recording normative interpretations. The paper describes a source decomposition tool that converts text into an RDF representation, a Norm Editor for constructing interpretations, and an Automated Assistance module that offers annotation suggestions. The tools can work within a software environment that allows a choice of repository. A role extractor could contribute suggestions inside this process. The distinction between a complete phrase and a partial one becomes concrete in an editor. A suggestion that omits a qualifier can leave a norm modeller with a different description of the object from the one expressed in the provision.
From grammatical patterns to trained extractors
Earlier legal text processing covered tasks with different units of analysis. The SALOMON project worked on making legal texts more accessible by automatically summarizing them. The SALEM system added semantic labels to Italian legal texts at paragraph and sentence level to assist retrieval. Brighi and colleagues dealt with provisions that modify other text, for instance through replacement or deletion. Their system analyzed grammatical structure with a rule-based parser and used hand-written patterns to fill the entries in a frame for the modification. In that approach, the analyst specifies in advance which syntactic constructions count as evidence for a particular slot.
The paper also describes a move toward methods learned from examples. Gao and Singh studied extraction of norms from contracts for multi-agent systems. Shaghaghian and colleagues applied BERT variants to legal document review. Earlier work by Bakker and colleagues applied both grammatical rules and a trained BERT system to Dutch Flint role extraction, and van Drie and colleagues extended the Dutch dataset. Those studies furnished a closely related task, instructions for selecting and annotating material, and Dutch data that the new comparison could reuse. The English dataset creates an opportunity to study legal and span-oriented BERT variants unavailable for the earlier Dutch comparison.
The general technical starting point is the ability to represent a word using its context. The paper describes word embeddings as part of the move towards learned representations and uses the Transformer to explain the later BERT and GPT approaches. A BERT encoder represents each input token using the words around it, including material on both sides. For a role extractor, that matters because later words may disclose who is performing an action or how far a participant phrase extends. In a passive construction, for instance, a phrase following the verb can identify the actor even when the object or recipient comes first.
The authors distinguish ways of specializing such a system before it sees any Flint training examples. It can learn language patterns from legal documents, where vocabulary and constructions may differ from those of general text. It can learn to recover masked stretches of words and thus practice representing phrases as units. Or it can learn from text in many languages and try to reuse supervision from one language in another. The paper cites domain adaptation in fields such as biomedicine to explain the first possibility. Each kind of pretraining supplies a different reason to expect useful transfer to legal role extraction.
The other line of work asks how much a generative system can do with instructions at prediction time. GPT generates a response in sequence. An instruction can describe the task, and worked examples can demonstrate the annotation convention through few-shot learning. An output schema can further specify the shape of the answer. Work cited by the paper explored these possibilities in clinical information extraction, semantic parsing and legal annotation. The legal annotation studies included sentence-level categories such as evidence or legal rule. Assigning a label to a snippet and identifying the full phrase for a role within it require different outputs. A role extractor has to account for the boundaries of what it selects as well as the meaning of the category.
These strands give the investigation its practical question. Grammatical rules require someone to encode recurring constructions. A general semantic role labeler offers an existing analysis that needs translating into the legal categories. Supervised learning requires a collection of Flint annotations. Prompting shifts much of the work into instructions, examples and the representation of the answer. The paper puts those routes into a shared evaluation so that success is measured against the same target wherever the comparison permits it.
The method, step by step
Selecting provisions with a normative act
The authors started with 6664 sentences from EU regulations obtained through EUR-Lex. The material came from the Food Safety Act, the Capital Requirements Act, the General Data Protection Regulation, the Digital Markets Act and the Digital Services Act. The GDPR sentences came through an existing collection with CLAL annotations. That collection served as a source of sentences. The Flint roles were marked for this study.
The authors and a domain expert then selected sentences that describe actions with a normative effect. The selection criterion asks whether an act would shape the conduct of an individual or organization. Merely containing a verb was insufficient for the purpose. The method reports 1575 action sentences after screening. This step is consequential for everything that follows. At test time, the task is to label the parts of an already selected action sentence. A system receives a sentence whose suitability for the experiment has already been decided by people.
From legal provisions to evaluated Flint role predictions
The steps in order.
Turning the annotation instructions into decisions about words
The five annotators worked with instructions that made the meaning of each role concrete. Action denotes what takes place, usually centered on a verb. Actor is the party responsible for doing it. Object is what the act operates on or changes, and Recipient is the party to whom the act is directed. The annotator marks the words that express each role. A sentence can leave a participant implicit. It can also mention several instances of the same role, in which case all qualifying instances are marked.
The instructions tell annotators how much of a phrase to include. An article stays with the noun phrase it introduces. A preposition can be part of a participant span, as when the phrase identifying the recipient begins with a word such as to. A marker introducing a clause stays with the clause if the entire clause serves as a participant. Punctuation inside a role can belong to it, while a comma or period at its edge is left out. These choices define what a later exact-boundary evaluation asks the system to recover. Knowing that a phrase refers to an authority leaves open whether the system will capture every word the annotation scheme assigns to that authority.
Rules for the action span reflect the meaning of a legal act as well as grammatical structure. Auxiliaries and modals can be marked with the main verb. Negation belongs with the action, so a prohibition can retain its negative wording. A particle that completes a phrasal verb also belongs to the action. Ordinary modifying adverbs are left outside it. The instructions allow semantically essential words to be marked even when they are separated from the verb, as in the appendix example involving authorities taking steps. A system therefore has to learn particular decisions about the expression of an act, including cases where the labeled words are separated by material with another status.
A sentence about an authority deciding how to handle a matter shows another distinction. The words expressing permission and decision can belong to Action, while the description of what the authority decides to do can belong to Object. The verb inside the complement does not make the entire string an action span. A clause can supply the content of a decision, and the annotation keeps that content in the relevant participant role. Optional conditions and contextual phrases outside the target act are treated differently. When the opening clause describes the condition that allows a processor to carry out a transfer, the action in that clause is left outside the target role assignments.
Passive voice creates another decision. One example in the paper concerns a supervisory authority receiving assistance from a committee. The phrase naming the authority occupies the grammatical subject position, and the committee does the assisting. The annotation assigns Recipient to the authority and Actor to the committee. A simpler passive example puts the information being made public in the subject position and leaves the acting party unstated. Its subject is the Object. A hand-written correspondence between subject and actor can therefore work for some common constructions while getting the meaning wrong in others.
The result of the linguistic annotation is a sequence in which each input token has one label. Tokens outside the selected roles receive Other, abbreviated O. That label covers punctuation or other words outside a role as well as whole passages that have meaning but fall outside the requested act. A clause expressing a precondition is an example of the latter. The label describes the scope of the extraction task, and a reader should not take it to mean that the words have no legal significance.
Choosing a reference and preparing the language splits
The annotation process yielded 2335 annotations. The authors use that total for the annotation work, including multiple judgments of the same legal sentence. The conclusion describes the collection as 1573 sentences of EU legislation with 2335 annotations in total. The methods count of 1575 is attached to the filtering step. The paper gives both counts, with the exact reason for the difference left unspecified. Its annotations total is best read as a count of labeled versions.
For agreement analysis, the authors used 196 unique sentences that all annotators had labeled. They calculated Fleiss’ kappa on tokens. Kappa, written κ, compares observed agreement with the agreement expected from the overall use of the categories. The authors also computed a specific agreement coefficient for each Flint role, based on Dice’s measure. The aggregate statistic asks how consistently the annotation scheme was applied across the shared material. The specific measure helps identify roles where agreement on marking the same tokens is less dependable.
For training and evaluation, the reference set retained a single annotation per action sentence. When annotators disagreed, the authors selected a version at random while balancing representation across annotators. This preserves a complete judgment made by a person. It also means that a disputed boundary is represented in the reference by the selected annotator’s decision. The others can inform the agreement analysis, and the test score is calculated against the retained version.
The English split for training, validation and testing was 80-10-10%. The same 10% English test split was used across the English comparisons. Training supplies examples from which systems can learn, validation supports choices during development, and test sentences are reserved for the final comparison. The Dutch experiments reused an existing collection of 4463 annotated sentences from Dutch laws. The earlier Dutch system had been fine-tuned on 90% of that collection. A separately set-aside group of 104 manually annotated Dutch sentences provided the Dutch test reference. Dutch data also supplied supervision for multilingual BERT and material for examples in the generative prompts.
The paper points to separate releases for the English data and Transformer variants and for the Dutch data, BERT variants and generative approaches. Those resources correspond to distinct parts of the comparison. The Dutch data support both the within-language comparison and the experiment in transferring training to English, while the new English dataset supports adaptation and evaluation within the target language.
Predicting with grammatical rules and a role inventory
The English rule-based baseline begins with part-of-speech tagging and dependency parsing. Part-of-speech tags describe what sort of item a word is in context. Dependency labels describe relationships among words, such as a noun functioning as a subject or a clause complementing a verb. The authors used spaCy’s en_core_web_sm to supply these tags, grouped tokens into chunks using the part-of-speech information, and applied rules to assign Flint roles to phrases.
In those rules, nsubj and obl:agent provide cues for Actor. The first is a subject relation and the second denotes an agent in an oblique phrase. Direct-object and passive-subject relations, identified by dobj and nsubjpass, are cues for Object. The dative relation is the cue for Recipient. The root and complements marked ccomp or xcomp provide cues for Action. A token left without a role by the rules becomes Other. The design can expand a grammatical cue to a whole phrase, and it also makes the consequences of missing a cue predictable. If the parser or the rule inventory fails to identify a relevant construction, the default can remove an entire role from the output.
The mapping baseline starts with a general semantic analysis. A pretrained system from transformer-srl identifies roles in the PropBank inventory relative to a predicate. A predicate is the expression around which the roles are organized. Its sense identifies the use of that expression that the role definitions apply to. The authors use VerbAtlas to convert the PropBank labels into thematic roles such as Agent and Beneficiary. The VerbAtlas resource they use covers 5306 PropBank predicate senses.
A further conversion turns the thematic roles into Flint roles. Agent maps to Actor. Patient, Theme, Topic and Asset go to Object. Beneficiary and Recipient go to the Flint Recipient category. The mappings permit several thematic categories to supply the same Flint category. Each mapped thematic category supplies a single destination. For sentences whose predicate sense lacks a VerbAtlas mapping, the method returns Other for every token.
The two baselines thus use different evidence even when they give the same answer. The grammatical baseline looks for constructions that the authors have associated with a role. The mapping method relies on a pretrained role analysis and the idea that a general label can be translated to a legally useful one. It can benefit from the general labeler’s learned knowledge of arguments and predicates. Its result still depends on the original role prediction, coverage of the relevant sense, and the fit between the two inventories.
Adapting BERT to the annotation scheme
The fine-tuning route gives a BERT variant the legal sentence and trains it to predict the Flint label of each token. A token is the unit presented to the system for labeling. Decisions about how a system represents a word internally are distinct from evaluation, which needs the predicted labels to line up with the annotated sequence. Fine-tuning lets the examples teach both which words belong to which role and where the annotators draw the boundary. The English examples can show that a clause sometimes belongs to an Object and that a passive subject may have a participant role other than Actor.
Standard BERT supplies the general starting point. LEGAL-BERT has been pretrained on English legal material that spans legal sources including legislation, contracts and court cases. EURLEX-LEGAL-BERT uses EU regulatory text in its pretraining, bringing its preparation closer to the source of the English annotations. SpanBERT has a different specialization. Its pretraining hides stretches of words and trains the system to recover their contents from representations at the boundaries. The paper describes SpanBERT and standard BERT as masking 15% of the tokens in their respective pretraining procedures, with the grouping of the masked tokens making the distinction. The question is whether practice representing spans pays off when the downstream labels frequently cover phrases.
These English variants used the English training and validation material. Multilingual BERT, called M-BERT, was fine-tuned on Dutch annotations and evaluated on English. Its pretraining provided a basis for representing multiple languages. During task adaptation, the Flint examples were Dutch. This setup tests whether the label conventions can be carried across languages without task training on the English examples. BERTje, a Dutch BERT variant fine-tuned in the earlier work, provides a separate reference for the Dutch task.
The authors monitored cross-entropy, a loss that increases when the system gives the annotated class a low probability. The training objective gives more weight to less frequent classes. The paper describes the weight assignment through the following proportional relationship.
w(c) ∝ 1/f(c)
Here c denotes a label class, w(c) is the weight assigned to that class in the loss, and f(c) is its frequency in the training and validation data used to set the weights. The proportionality sign ∝ means that the weights follow the inverse of the frequencies up to a common scale. The slash means division, and 1/f(c) is the reciprocal of the frequency. The relationship describes how the weights are ordered and scaled relative to one another.
The need for weighting comes from the English label distribution. Other accounted for 52% of annotated tokens and Object for 28%. Actor accounted for 9%, Action for 6%, and Recipient for 5%. A learner trained on this distribution receives many more updates involving Other than Recipient. Weighting makes an error on a scarce label matter more to the objective. It does not decide in advance how often a trained system will predict that label, or whether the scarce examples are enough to teach the longer and less regular constructions.
The fine-tuning runs lasted 4 epochs, meaning that training proceeded through the training material repeatedly for the reported number of passes. The authors used a grid search over learning rate and batch size. Learning rate controls the size of parameter updates, and batch size controls how many examples are used together in an update. The search compares configurations of those settings. The central comparison is between systems adapted to the same kind of English role annotations, with the Dutch-to-English transfer run answering a separate question about the language of supervision.
Giving GPT instructions, examples and a response schema
The generative experiments kept GPT-3.5 Turbo and GPT-4 fixed and changed the requests sent to them. The temperature setting was 0, chosen to encourage consistent responses. The basic request described the classes, directed attention toward the main clause, and asked for a label sequence that corresponded to the input tokens. The authors explored alternative wording and input formatting before the main comparison. Their informal trials favored inputs already divided into tokens.
The zero-shot request gives instructions alone. The few-shot request adds labeled examples, presented as user and assistant turns. The authors randomly selected five annotated sentences from training material for the examples. The held-out sentences were separate from these examples. Each worked example demonstrates which input words receive the different labels and what a valid output list looks like. In particular, a demonstration can show how much of a participant phrase is included. Providing examples at this stage changes the information in the request, while leaving the generative system’s parameters as they were.
Function calling supplies an explicit structure for the generated answer. The classification function asks for arrays of words or phrases grouped by role. It uses the zero-shot instructions as a description and assigns a field to each target role. A script then matches the returned material back to the original sentence to build a list of labels. The masking function asks for the sentence with role-bearing words replaced by role markers. That output also goes through post-processing. Keeping the role marker where the word occurred is intended to make repeated words easier to distinguish when only one occurrence belongs to a role.
The combination approach supplies examples and a function schema in the same request. It addresses the two demands the prompted system faces. The examples communicate the task as performed by an annotator, while the function schema makes the answer easier to convert into the representation used for scoring. A valid structured response can still contain the wrong words. Equally, an answer that has identified some relevant material can be hard to score if its output has extra text or no reliable correspondence to the sentence.
Scoring words and complete roles
Accuracy asks how frequently a predicted token label agrees with the reference. That measure enables comparison with the earlier Dutch evaluation. The paper also reports balanced accuracy and precision, recall and F1 for the fine-tuned systems. Precision measures the share of predictions that are correct, and recall measures the share of reference items recovered. F1 combines the two so that a score suffers when either one is low. Macro F1 gives the classes equal influence in the average. Weighted F1 takes their representation in the evaluation data into account. With common and rare labels in the same benchmark, these summaries answer different questions about a system’s behavior.
A further evaluation scores the roles as text spans using a scheme derived from the Message Understanding Conference and used in the SemEval task cited by the paper. The type setting assesses role identity for an identified span without requiring its boundaries to match exactly. The partial setting gives credit for overlapping boundaries, and the exact setting checks boundaries. Strict evaluation requires both exact boundaries and the right Flint role. The differences matter for use in a frame. If an extractor marks a participant with the right role but leaves off a phrase that specifies which participant is meant, the output can earn credit for recognition while still failing strict matching.
Experiments and results
Agreement on the English labels
The 196 English sentences labeled by all annotators produced a token-level Fleiss’ kappa of 0.712. The paper describes this as substantial agreement. The corresponding figure reported for the existing Dutch dataset was 0.75. These are measures of agreement among people applying the annotation scheme to the respective datasets. They are separate from accuracy against the single retained annotation used in system evaluation.
Specific agreement varied across roles in the English shared set. Actor reached 0.946 and Action reached 0.938. Object reached 0.713 and Recipient reached 0.708. The high scores for Actor and Action indicate that annotators generally converged on the tokens that instantiate those roles. The lower agreement for Object and Recipient shows where the task was less settled even with written instructions and examples. A longer participant phrase gives more chances to differ over where it starts or ends, and semantic ambiguities can also affect which role a phrase receives.
The agreement results give a point of reference for reading later error analyses. If a system makes many errors involving a role on which annotators disagree, the error count can reflect several difficulties at once. It can arise from a poor prediction, a genuinely difficult phrase, or a prediction that agrees with a reading other than the one retained for evaluation. The paper does not trace individual test errors to those possibilities. The agreement scores identify where separating them would matter most.
Token accuracy on the English test split
The English grammatical rules reached 0.528 token accuracy, and the method translating general semantic roles reached 0.737. Standard BERT fine-tuned on the English Flint data reached 0.879, while SpanBERT reached 0.880. M-BERT trained on Dutch Flint annotations reached 0.829 on the English test. The strongest English token accuracy, 0.896, came from EURLEX-LEGAL-BERT. Its English weighted F1 was also 0.896. The comparable supervised alternatives are close enough that the choice of metric changes which of the strongest systems leads.
Token accuracy of extraction methods on the English Flint test split
The fine-tuned systems lead the grammar and role-mapping baselines, with EURLEX-LEGAL-BERT highest.
The numbers
| System or setting | accuracy |
|---|---|
| Grammatical rules | 0.528 |
| Semantic role mapping | 0.737 |
| M-BERT trained on Dutch | 0.829 |
| BERT | 0.879 |
| SpanBERT | 0.880 |
| LEGAL-BERT | 0.881 |
| EURLEX-LEGAL-BERT (this paper) | 0.896 |
The chart includes English predictions made by systems with very different training arrangements. The rule-based system relies on the parser and explicit rules. The role-mapping baseline draws on a pretrained role labeler; its output has to pass through two inventories before it can match the Flint reference. M-BERT sees examples of Flint labeling in Dutch. The remaining variants learn directly from English Flint annotations. Since their predictions are evaluated on the same English sentences, the chart compares their usefulness for the task under the paper’s setups.
The earlier Dutch systems provide another comparison. The Dutch rule-based approach had token accuracy of 0.587 and BERTje had 0.842 on Dutch. The English standard BERT score was 0.879. In the paper’s comparison of training amounts for these systems, the English count was 1868 sentences and the Dutch count was 4017 sentences. This is evidence that the smaller reported English training amount was compatible with a higher score in these experiments. The base systems and the texts also differ, and the test results are measured against separate references.
The authors inspect which labels systems confuse using confusion matrices, which count predicted classes for each reference class. The matrices for the grammatical baselines in both languages show frequent assignment to Other. The result fits the design of the rules. Any phrase missed by the rules can be passed through as Other, even when the reference has an Actor or a Recipient. Action and Actor were the stronger role categories for the rules. The tested rules did a poor job of covering recipients. In an English example from the Digital Services Act, they miss the recipient and recover only one word of the annotated object. The fine-tuned BERT system gets the words in that example right.
The top fine-tuned systems handle a wider range of cases, with Object and Recipient remaining the weaker labels. In an example from the Digital Markets Act, LEGAL-BERT and EURLEX-LEGAL-BERT match the reference throughout. Standard BERT makes a boundary error by assigning an article to Object. M-BERT and SpanBERT recover the actor and action in the example and make mistakes on the object and recipient. A token metric counts the affected words. A span evaluation also asks whether the phrase intended for the frame would survive intact.
Complete roles on the English test split
The span evaluation changes the emphasis of the comparison. LEGAL-BERT leads all the span settings in the paper, including type F1 at 0.924 and strict F1 at 0.822. EURLEX-LEGAL-BERT reaches 0.917 for type and 0.815 for strict span F1. SpanBERT has type F1 of 0.910 and strict F1 of 0.798. The corresponding standard BERT scores are 0.906 and 0.790. M-BERT, evaluated in English after Dutch task training, reaches 0.798 for type and 0.614 for strict. These are overall F1 scores on the English test split, calculated under the respective span matching rules.
Strict role-span F1 of fine-tuned BERT variants on the English Flint test split
LEGAL-BERT leads when a prediction needs the complete span and the correct role.
The numbers
| System or setting | F1 |
|---|---|
| M-BERT trained on Dutch | 0.614 |
| BERT | 0.790 |
| SpanBERT | 0.798 |
| EURLEX-LEGAL-BERT | 0.815 |
| LEGAL-BERT (this paper) | 0.822 |
The other span settings indicate how results change when the evaluation emphasizes boundaries with different degrees of tolerance. On English partial span F1, standard BERT obtains 0.866, SpanBERT 0.873 and LEGAL-BERT 0.888. On English exact span F1, their scores are 0.802, 0.812 and 0.833, respectively. M-BERT records 0.732 partial span F1 and 0.629 exact span F1. Across the fine-tuned variants, type is the highest scoring span setting and strict is the lowest. Recognizing a role near the right location is consistently easier than returning its full extent and correct class together.
The span results give the two legal pretraining variants distinct strengths. EURLEX-LEGAL-BERT gets the most token labels right, while LEGAL-BERT produces the strongest complete-role results. A long object illustrates how those outcomes can coexist. A prediction can correctly classify most words in the object and thus contribute positively to token accuracy. If it omits an edge word, the whole object fails the strict check. Errors on words outside predicted roles also affect token accuracy. The span scores put the emphasis directly on the entries the extractor is meant to supply for a frame.
SpanBERT’s comparison with standard BERT is similarly dependent on the evaluation. Standard BERT has slightly higher token precision and F1 in the paper’s comparison of the two, while SpanBERT has slightly higher accuracy and recall. SpanBERT has higher F1 across the span settings. The advantage is modest, and the consistency across span criteria is more informative than a claim about winning every metric. Task-oriented pretraining can show its advantage most clearly when the evaluation unit resembles the structure it was intended to represent.
Prompted extraction in English and Dutch
For both languages, the best generative configuration in token accuracy was GPT-3.5 Turbo with examples and function calling. It reached 0.627 on the English test and 0.644 on the Dutch test. For GPT-4, its best-performing English configuration was also the combination approach, while its strongest Dutch configuration used the masking function. The relative performance of classification and masking depended on the system. The paper describes classification as the stronger of the two function-only requests for GPT-3.5 Turbo and masking as stronger for GPT-4.
With plain prompts, the authors encountered outputs containing extra material or taking forms that were hard to align with the input. A response can sound plausible while failing to supply one label at each position. Examples gave GPT-4 better token accuracy than instructions alone, with different effects across roles. For English, the confusion matrices show the few-shot approach doing better on Actor, Object and Recipient, while the zero-shot version did better on Other. GPT-3.5 Turbo did poorly under plain few-shot prompting in the reported comparison. Examples and output constraints therefore had different effects depending on how they were combined.
The stronger GPT-3.5 Turbo configuration labels Action and Other relatively well in the two languages. Recipient is its weakest role, and both languages exhibit words incorrectly assigned to Other. The GPT-4 combined configuration in English shows a similar pattern. The corresponding Dutch result for that configuration derives much of its accuracy from identifying Other. A single aggregate number can give very different impressions depending on whether it comes from correctly excluding material from the frame or from correctly finding its contents.
For the English GPT outputs, the span evaluation likewise gives the strongest scores under the type criterion and the weakest under strict matching. One of the paper’s Digital Markets Act examples shows what this difference looks like. The GPT-4 combination gets the main actor and action, and also treats words inside a dependent clause as if they belonged to the target act. The GPT-3.5 Turbo combination likewise finds the actor and action, but assigns Object to material annotated as Recipient. The GPT-4 few-shot response recovers parts of some roles without fully recovering any of them in that sentence. The fine-tuned LEGAL-BERT prediction shown for the same example matches the reference. The example illustrates concrete errors behind the aggregate results and gives no estimate of how often each particular mistake arises.
What the ablations show
The paper reports no formal ablation study. Its diagnostic evidence comes from comparisons of pretrained variants, changes to the generative request, stricter scoring criteria, and inspection of role-level errors. These comparisons differ in what they hold fixed. Some vary the information sent to a single generative system, while others compare systems that arrived at the task with different pretraining or different languages of task supervision.
Legal specialization and span specialization
The closest comparison for asking about legal pretraining is between standard BERT and the legal BERT variants adapted using the English annotations. Their predictions are tested against the same English reference, and all have seen examples of the Flint task. The legal variants lead the main token and span results between them. The finding supports the practical choice of starting with legal pretraining for this corpus. Since the variants come with different pretraining corpora, the comparison does not isolate the effect of individual legal terms, constructions or document types.
The contrast between LEGAL-BERT and EURLEX-LEGAL-BERT also qualifies what specialization means. The latter’s EU regulatory pretraining is a closer match to the new English corpus, and its strongest result is token accuracy. LEGAL-BERT uses broader legal material and has the strongest strict span result. The authors suggest that the match between EURLEX-LEGAL-BERT’s pretraining and the benchmark may partly account for its performance. The observed ranking depends on the metric, and the idea that broader pretraining would give LEGAL-BERT a stronger advantage on more varied legal sources remains a hypothesis.
SpanBERT provides a comparison centered on pretraining objective. It has no legal specialization of the kind used by the legal variants, and its pretraining encourages it to represent spans. After adaptation to Flint, its token results are close to standard BERT’s and its span results are consistently higher. The pattern is consistent with an advantage in getting whole phrases right. The paper does not directly trace that improvement to individual span lengths or show which part of the pretraining objective accounts for it.
The M-BERT experiment tests a different resource decision. Under Dutch task supervision, M-BERT transfers enough to English to beat both English baselines. Its span results make the remaining difficulty apparent, especially when the whole phrase and its type must match. The authors suggest that differences between legal language in Dutch and English may matter, along with the complexity of the longer participants. The experiment compares practical transfer with direct English supervision. Architecture, pretraining and language of the task examples all vary across the broader comparison, so it cannot isolate the contribution of any one of them.
Changing instructions and answer formats
The prompt variants show how the way an answer is requested can affect measured extraction. The zero-shot and few-shot list formats ask the system to return labels in order, with a position for each token. The function variants impose a structured response and ask for different intermediate outputs, either phrases grouped under role names or role markers placed into the sentence. The strong combined result uses examples and an output schema together. Its accuracy reflects both identifying material and returning it in a form that survives alignment.
The result of adding examples depends on the existing request. For GPT-4, demonstrations improve the comparison with a plain instruction prompt. For GPT-3.5 Turbo, plain few-shot prompting yields weak token accuracy, while the strongest prompted setting uses examples with function calling. The masking and classification comparison further shows that imposing a schema is only part of the design choice. A system also has to do the particular operation described by the schema, and post-processing has to recover the corresponding positions. The paper’s motivation for masking is that positions can distinguish repeated words, but the results do not separately quantify errors on repeated words.
The format explanation is plausible because the authors observed inconsistent output and extra material in unstructured responses. The experiments give no independent score for how often a system understood the role correctly but failed to express its answer in the required format. Function calling changes the shape of the answer and the extraction operation together. Its higher scores show that the full procedure performs better in the tested configurations. They leave open how much of the improvement comes from the role decision itself.
Where the errors concentrate
Comparing scoring rules is a diagnostic in its own right. With the predictions held fixed, strict matching lowers the scores across the fine-tuned variants. This shows that a portion of what counts as successful type recognition is lost when the full extent of the role is required. It also shows why a reader should pay attention to legal BERT’s span performance even though the highest overall token accuracy belongs to the EU-specialized variant. The tests emphasize different properties of the same predictions.
The confusion matrices and example sentences show where to look within that aggregate pattern. Other absorbs many missed roles from the grammatical system and some missed roles from the generative systems. Objects and recipients remain difficult after fine-tuning, and the agreement analysis finds greater variation on those categories among people. The authors propose that length and complexity make these roles harder. They can cover substantial phrases or dependent clauses, while actors and actions in the selected material are frequently shorter. Their explanation is consistent with the examples, but there is no controlled length comparison or experiment that independently changes label ambiguity.
The strong recognition of Action in the GPT error analysis also has a feature of the benchmark behind it. Every selected sentence contains an action. The system can expect to find one, while every participant slot may be absent. That setup makes the comparison across roles partly a comparison of what the input selection guarantees. It helps explain why the results for finding an action in this task cannot double as results for detecting whether an arbitrary provision contains a normative act.
Limitations
Limits and open questions identified by the authors
The authors emphasize the narrow source of the English material. It consists of EU legislation, which is especially close to EURLEX-LEGAL-BERT’s pretraining. They expect broader sampling to make differences between the two legal variants easier to see. They also point out a related tension for the rule-based approach. Adding rules could recover missed patterns in the current corpus. Very specific rules could become less useful on legal sources with other constructions. The benchmark supports observations about the tested rules on the selected test material.
The authors treat class imbalance as another open question. They use weighted loss for the fine-tuned variants and suggest cross-validation as a way to test how robust results are to the data partition, subject to computational resources. They also note that the examples in the few-shot and combined prompts contain many Other tokens, which may influence generative predictions. The paper reports neither a comparison with unweighted training nor a study that balances the examples in the prompt. The observed performance includes those training and prompting choices.
For the generative experiments, the paper identifies output reliability, example selection and task representation as avenues for further testing. The authors propose checking the results across repeated runs and exploring the number and choice of demonstrations. They also suggest asking for individual roles in separate requests, a change that would simplify each query and increase the amount of computation. An alternative output representation could keep phrases together. These are proposed variations. The reported comparison establishes performance for the requests actually used.
The authors discuss combining Dutch and English training examples for multilingual adaptation. They also discuss using human judgment with extraction to support a process for constructing legal interpretations. The first proposal would address the gap between Dutch-to-English transfer and direct English training. The second would embed proposed roles in a workflow where someone can assess and revise them. The paper measures extraction accuracy and span quality, leaving the effect of either proposal to a separate evaluation.
Limits visible in the experimental design
The benchmark begins after a domain expert and the researchers decide which sentences describe a relevant action. A pipeline working from full statutes would also have to find those sentences and handle context outside them. It might need to resolve which party a reference denotes, attach a condition found elsewhere, or connect the effects of invoking an act to another provision. The reported results apply to the selected sentences and the roles scored within them. They do not establish performance on document selection, cross-sentence linking, preconditions or postconditions.
The benchmark reference represents a specific set of annotation conventions and retains a single annotation for each evaluated sentence. When multiple readings were available, the chosen version supplies the scoring target. This is appropriate for evaluating reproducibility against the reference. It gives no direct credit for an alternate defensible reading unless that reading matches the selected annotation. Given the lower human agreement on recipient and object spans, a strict error can be especially hard to interpret without looking at the sentence and the competing boundary decisions.
The paper uses a held-out English sentence split and a separate Dutch test. A test consisting of an entirely unseen type of legal source would answer a different question about generalization. The results also do not establish how stable the small rankings among the strongest English systems are across repeated training runs or alternative splits. In particular, the score ordering by token accuracy should be read as an ordering on this test under the paper’s setup. The separate span ordering shows that even within that setup a change of evaluation unit can change the leader.
Comparing supervised BERT with prompted GPT answers an applied question about two ways of allocating effort. The fine-tuned systems see many labeled Flint examples while learning the task. The GPT systems are prompted with instructions and, in some settings, a few examples and a schema. Their output must be converted back into the reference form. The study gives evidence that the tested supervised pipeline works better for this task. It leaves architecture, amount of task supervision and answer production intertwined, and it does not test what the generative systems could do under comparable task-specific training.
English and Dutch results likewise come from different legal materials and distinct test references. The paper makes comparisons between them, but a higher token accuracy in one language cannot on its own establish that the language is easier for Flint extraction. Dataset selection, preparation, training and annotation all contribute to the measured outcome. The Dutch-to-English M-BERT test directly addresses a transfer question with those resources, while the broader language comparison describes performance under the available arrangements.
Finally, extraction accuracy is a proxy for how useful the suggestions could be to a norm modeller. The paper does not measure editing time, acceptance of suggestions or correctness of the final legal interpretation. Even a correctly recovered set of role phrases still needs to be connected to conditions and consequences and interpreted within the relevant legal source. The evidence supports an extractor as a way to propose parts of frames. The effect of those proposals on complete interpretations is outside the measured task.
What came after
A later citing work addresses Dutch legal question answering with legal attribution. Its stated task connects answers to legal material. Bakker and colleagues instead begin with a selected legal sentence and recover labeled pieces that can fill an act frame. The relationship between the two studies is the need to preserve a connection between a legal text and what a system returns about it. The units are different. A Flint role is evaluated against a phrase and its boundaries, while the later work’s title identifies attribution as part of producing an answer. The citation establishes a connection to this line of legal language research. It does not establish reuse of Flint roles, the annotation dataset or any of the extraction systems. QuALA-NL: Question & Answer with Legal Attribution in Dutch
Cite
Cite as Roos M. Bakker, Akke J. Schoevers, Romy A. N. van Drie, Marijn P. Schraagen and Maaike H. T. de Boer. 2025. Semantic role extraction in law texts: a comparative analysis of language models for legal information extraction. Artificial Intelligence and Law (Springer).
@article{bakker2025semantic,
title = {{Semantic role extraction in law texts: a comparative analysis of language models for legal information extraction}},
author = {Roos M. Bakker, Akke J. Schoevers, Romy A. N. {van Drie}, Marijn P. Schraagen and Maaike H. T. {de Boer}},
journal = {Artificial Intelligence and Law (Springer)},
year = {2025},
doi = {10.1007/s10506-025-09437-x},
url = {https://doi.org/10.1007/s10506-025-09437-x}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/bakker-2025-semantic-role-extraction-law/