Elamur Research

Clause Topic Classification in German and English Standard Form Contracts

Paper · 2022 · Daniel Braun and Florian Matthes

Summary

A shopper who wants to know who pays for a return may have to look through an entire set of terms and conditions. The agreement was written by the shop, and the shopper typically encounters it as a document to accept. Braun and Matthes ask whether software can give readers a faster route to the relevant passages by identifying what each clause is about. They treat this as text classification. Given a clause, the system assigns subjects from a pre-defined list. A clause may discuss several subjects, and a broad label such as delivery can be accompanied by a more specific one such as delivery costs.

The authors worked with consumer protection specialists to build the list of subjects from contract templates, then applied it to actual shop terms and expanded it where they found gaps. The finished taxonomy has 23 topics and 37 subtopics. The study uses 5,020 German clauses and 1,040 English clauses. The English sample comes from shops serving the UK market. The researchers collected clause text and headings where available, obtained independent judgments about the labels, and referred disagreements to experienced lawyers. They evaluated broad topics and narrow subtopics separately.

BERT achieved the highest F1 in both languages at both levels. F1 combines precision, which asks how frequently the assigned labels were right, and recall, which asks how many of the reference labels were recovered. On the held-out German shop data, BERT reached an F1 of 0.91 for topics and 0.86 for subtopics. On the held-out English data, it reached 0.85 and 0.73, respectively. Logistic regression, which used weighted word features from each clause and its titles, was the strongest alternative for topics in both languages and for German subtopics. Its German topic F1 of 0.87 makes computational cost relevant to the choice of classifier. For English subtopics, the multilayer perceptron and the recurrent network both finished ahead of logistic regression.

The authors also tried their German shop classifier on the general business conditions of German banks. The shopping taxonomy covered 71 of the 214 banking clauses, or 33%. The classifier nevertheless recovered labels well for some shared subjects, including applicable law and arbitration. The banking test shows why transfer has to be considered at the level of both the label list and the classifier. Some familiar subjects can be recognized in a different kind of agreement, while much of what matters in that agreement may fall outside the original list.

Deep dive: Clause Topic Classification in German and English Standard Form Contracts

A comparison of ways to identify clause topics in German and English online shop contracts, with a test of how well the labels transfer to banking. · about 33 minutes to read

The problem and its context

Finding a provision in a contract written for many customers

An online shop can use one set of terms for transactions with many customers. The customer has little reason to study every provision before making an ordinary purchase, even though particular provisions can matter a great deal once a problem occurs. Braun and Matthes cite studies in which the reported share of people who regularly read the relevant agreements ranges from 3.5% to 9%. Searching for an answer after a problem emerges raises a more specific challenge. The reader may know what they want to find and still have trouble identifying the passage that addresses it.

A topic label gives the reader a route into the document. Someone checking possible delivery charges might use a label for delivery costs to find relevant clauses. A reader concerned with how to withdraw from an agreement might benefit from labels that distinguish the time allowed for withdrawal, the form used to request it and the costs of sending goods back. These categories summarize the subject of a provision in a way that can be useful even when individual shops organize their terms differently. The person reading the provision can then ask what it means for the transaction at hand.

The authors place the work in legal AI, with a practical role for both consumers and legal professionals. The anticipated benefit to a consumer is quicker access to the relevant language. For a lawyer handling a consumer protection matter, topic navigation could help identify which provisions deserve examination. The experiment measures agreement with human topic assignments. A timed search exercise with consumers, or a study of how lawyers use the resulting labels in practice, would answer a further question about that proposed use.

Why online shop terms lend themselves to a taxonomy

The paper distinguishes standard form agreements, drafted by one party for repeated use, from agreements whose provisions result from negotiation. According to the authors, negotiated contracts can vary more in content, particularly in business-to-business settings. A set of pre-defined categories may become harder to keep useful as the range of provisions expands. In consumer shop terms, the repetition of comparable transactions gives a taxonomy a clearer purpose. Different shops may all need to address payment and delivery, for example, even when their arrangements and wording differ.

Regulation also enters the authors’ reasoning. They study contracts drawn up under European Union jurisdiction and discuss the Unfair Contract Terms Directive, identified in the paper as 93/13/EEC. Their argument is that consumer contract rules constrain what merchants can put into standard terms and that unexpected provisions can have legal significance. A sufficiently extensive list of usual subjects could therefore help draw attention to unusual clauses. The usefulness of such a signal depends on whether the list covers the relevant kind of agreement. An unfamiliar subject could reflect a gap in the taxonomy, which is precisely what the banking experiment later makes visible.

There were practical reasons to use online shops as the source. The terms were publicly accessible in machine-readable form, and the authors could collect them in quantity. These agreements also met the substantive motivation for the study. They govern ordinary transactions and are among the agreements the authors expect consumers to be particularly unlikely to read in full. The domain gave the authors a place to study an economically relevant task with a plausible recurring vocabulary of subjects.

How earlier work approached similar documents

The paper describes contract review as an important commercial application of natural language processing. For research, public availability has guided attention towards online shop terms, platform service agreements and privacy policies. The authors note that the legal status of privacy policies as contracts is unsettled. The documents can still present comparable processing problems, since a system may need to find and interpret particular statements within a long, publicly available text.

Much of the earlier research on standard forms described in the paper asks whether a provision may be legally defective. CLAUDETTE investigated potentially unfair terms in the service agreements of large online platforms. The paper also describes a later application of that line of work to privacy policies. Braun and Matthes had previously studied automated detection of void provisions in shop terms using BERT. In separate earlier work, they used abstractive text summarization to express selected aspects of shop terms in shorter form.

The paper also describes question answering about privacy policies, where a user can inquire about a particular practice. The authors observe that a practice can be legally allowed and still matter to someone deciding whether to use a service. An answer about the practice provides information that a simple legal verdict would leave out. That is one motivation for the earlier study Question Answering for Privacy Policies.

Topic classification has a different output from each of these approaches. A label for liability identifies the subject a reader will encounter. It leaves the reader to examine the scope of the liability language and assess its significance. A summary can express the substance of a provision, while a question answering system can respond to a particular information need. The classifier in this paper gives each clause a place in a common subject index that can be used across documents.

The task is supervised. The categories have meanings agreed on before classifier training, and the human-assigned categories supply the target answers. In unsupervised topic modeling, a procedure would try to discover recurring groupings in the text. Here, the availability of legally intelligible names is part of the design. If separate provisions are indexed under withdrawal shipping costs, that category has the meaning given to it in the taxonomy. The authors needed to establish that meaning and decide what examples belonged there before measuring whether any automated approach could recognize it.

The method, step by step

Build the subject list from templates and real clauses

The authors began with templates for online shop agreements. They drew them from legal publications, trade or industry sources and a commercial generator. Templates offer a starting point because merchants can adopt their wording and their organization. A heading in a template can also suggest the level at which a useful distinction belongs. Delivery is a broad concern that can organize a section, while delivery timing and delivery charges are narrower aspects that can organize provisions within it.

Consumer protection experts assigned subjects to the clauses in the templates. For each source, two experts considered which broad topics applied and whether the language supported any narrower distinctions. The researchers then reconciled the names the experts had used across sources. That step made the labels reusable. A distinction suggested by one template could become part of the common scheme, even when another template organized the same material under a different heading.

The initial list contained 22 topics and 36 subtopics. When the authors used it to annotate real shop terms, they reported coverage of 90.08%. The clauses they describe as falling outside the initial list raised subjects involving vouchers and gift cards or codes of conduct. In the final scheme, vouchers appear under payment, while code of conduct is a broad topic. The finished taxonomy contains 23 topics and 37 subtopics. The coverage exercise was therefore part of developing the taxonomy, as well as a way to learn where a scheme based on templates had missed material in actual contracts.

The levels express a relationship between broad and narrow descriptions. Consider a provision that invokes the statutory warranty rules in general terms. The authors’ example supports the broad warranty label. A clause specifying how long that warranty lasts could also support a subtopic for the warranty period. The annotation convention permits a broad label by itself and requires a corresponding broad topic when a narrower label applies. A clause may also touch several subjects. If it addresses a delivery method and a related payment provision, the task can represent each subject without forcing the reader into a single category.

From shop terms to evaluated clause labels

The steps in order.

From shop terms to evaluated clause labelsStep 1: Derive topics and subtopics from contract templates1. Derive topics and subtopics from contract templatesStep 2: Collect German and English shop agreements2. Collect German and English shop agreementsStep 3: Record clauses with their available headings3. Record clauses with their available headingsStep 4: Annotate both levels and resolve disagreements4. Annotate both levels and resolve disagreementsStep 5: Add categories for uncovered shop provisions5. Add categories for uncovered shop provisionsStep 6: Split the corpora while balancing label representation6. Split the corpora while balancing label representationStep 7: Fit separate topic and subtopic classifiers7. Fit separate topic and subtopic classifiersStep 8: Evaluate predictions on held-out clauses8. Evaluate predictions on held-out clauses

Turn shop documents into annotated examples

The authors found merchants through the price comparison sites Idealo and Geizhals. Both offered English-language services directed at the British market as well as their German sites. Merchants supplied links to their terms, and the researchers used a crawler to collect those addresses. They randomly selected 142 German agreements and 30 English agreements from the terms available through this route. The two corpora are collections by language and market share no requirement that a German document be paired with an English version of itself.

The unit of work was a clause as entered in the corpus. The researchers copied each clause to a separate spreadsheet row, recorded an identifier for it and another for its agreement, and retained headings when the document supplied them. The headings could come from the clause itself or the section containing it. Keeping these fields separate preserved two kinds of evidence. Clause text states the provision, while a heading can supply the subject under which the shop put it. The heading is document text available to a classifier in the appropriate setup. The reference label is a separate judgment supplied during linguistic annotation.

The corpus labeling started with a student who assigned broad topics and then added subtopics where the clause warranted them. The authors describe a second pass in which they assigned labels in the same order. Disagreements went to experienced consumer protection lawyers, who made the final decisions in those cases. The reference annotations thus embody both the taxonomy and decisions about how to apply it to particular passages. Evaluation asks how closely a classifier can reproduce those decisions on held-out examples.

The procedure reported 87% agreement between annotators. The paper gives 13% as the share of clauses that needed a decision from the lawyers. It describes more than 100 hours of combined annotation effort, with more than 24,000 labels generated before consolidation and 11,777 labels in the finished corpora. The provisional assignments and the consolidated assignments describe different stages of the work. The classifier is evaluated against the resolved labels.

Keep the language, label level and test split straight

The authors split each language corpus into a training portion of 80% and a test portion of 20%. They used scikit-multilearn to preserve the distribution of labels as well as possible across those portions. That matters for an example that carries several labels. Keeping one common category well represented can still leave a rarer category poorly distributed, especially if the categories occur together in some clauses and separately in others.

The study creates separate classification tasks for topics and subtopics. The topical classifier sees the broad subject assignments as its targets. The subtopic classifier uses the narrower assignments. Each task can return several labels for a clause, so this is multilabel classification at either level. A joint experiment instead tried to return the labels at both levels together, but the authors report that the separate setup gave better results. The label hierarchy still guides human annotation. The paper evaluates each level as its own prediction problem.

For the approaches with trainable parameters, settings were chosen on training data. Cross-validation takes turns using different parts of that data for checking a candidate setting, with the remaining parts used for fitting it. A grid search repeats the process for the settings under consideration. The held-out test data serve a later purpose. They provide examples on which to report the chosen approach’s performance. The authors used different sizes of cross-validation runs for different classifiers and a separate internal validation portion for BERT.

The simplest approach asks the consumer protection lawyers for terms that signal each topic or subtopic. Its rules can treat keywords as alternatives, require words to appear together, or exclude particular words or combinations. The alternatives can capture different ways of naming the same subject. Requiring words together helps when either word alone would point to too many topics. An exclusion handles a combination that could otherwise trigger a misleading match.

Before applying the rules, the authors used SoMaJo for tokenization, dividing the clauses into sentences and then into tokens. They used lemmatization to map inflected words to base forms, so that the rules could work across grammatical variants. The German pipeline used the Mate tools lemmatizer. For English, they used the Stanford lemmatizer described in Stanford CoreNLP.

German compounds make the matching problem concrete. A single written word can contain elements that would be separate words in another phrasing, and a lemmatizer can preserve the compound as a unit. The paper discusses the uncertainty in deciding which boundary to choose when a written form admits several divisions. This implementation left compound decomposition out. The authors cite prior work on how to tackle such ambiguities, including Empirical Methods for Compound Splitting.

Keeping compounds whole also preserves highly distinctive terms. The authors return to this point when they discuss the German results. A technical expression for the right of withdrawal can provide a direct hint about a clause’s subject. A system whose rules expect that expression may match it as a whole. Recognizing that exact compound and generalizing from its constituent words are different capabilities, and the baseline chiefly relies on the former when the rule names the compound.

Learn from weighted word features

Logistic regression replaces the experts’ keyword conditions with weights learned from labeled examples. For this approach, the authors combined the text of the clause and its available titles, removed stopwords with Stopwords ISO, and represented the result with TF-IDF. Stopwords are common words selected for removal before computing the features. TF-IDF gives a way to give greater prominence to a term that helps distinguish a passage from other passages in the collection. The representation turns a clause into word features that a classifier can weight. A title containing a term such as warranty can contribute evidence alongside the words in the clause itself.

The authors used the Scikit-learn implementation and adopted a one-versus-rest arrangement. Each label gets a binary decision of its own. For a label such as delivery costs, clauses carrying that label are positive examples for that decision, and the other clauses supply negative examples. A positive example may also be positive for another decision if it carries another topic. Applying the separate decisions to the same clause yields its set of assigned labels. A useful consequence is that each label can have a distinct pattern of word weights.

Regularization controls how strongly the fitting process restrains its coefficients. The paper describes the setting it tuned through this reciprocal relationship.

C = 1/λ

Here C is the inverse regularization setting searched by the authors, λ is the regularization strength, and 1 is the numerator of the reciprocal. A larger C means a smaller λ and weaker regularization. The authors emphasize the resulting risk of overfitting, in which the fitted weights follow peculiarities of the training examples that may fail to carry over to other clauses.

After narrowing the candidate range through repeated searches, the authors report that 10-fold cross-validation selected C = 1, 000 for German topics and C = 45, 000 for English topics. They call attention to the particularly high English topic setting in view of that corpus’s smaller size. For subtopics, the same procedure selected C = 100 in each language. These are settings selected within the training procedure. Their values help specify how the reported classifier was fitted, while its performance is assessed with the test scores.

The random forest also used TF-IDF features. A decision tree learns splits on features and uses the path taken by an example to reach a prediction. The attraction for the authors was that a tree can handle multiple labels and that an individual path can be inspected. A forest trains many randomized trees and combines their classifications by voting. It offers a way to bring the decisions of several trees together when an individual tree might fit the training examples too closely.

To run the forest search, they used stratified 10-fold cross-validation on the training data. It varied the number of trees, the limit on tree depth, the minimum number of samples required to split an internal node and the minimum number required in a leaf. The selected German setup used 2,000 trees and no finite depth limit. The English setup used 1,000 trees and a maximum depth of 100. In each language the selected minimum was 2 samples to split an internal node and 1 sample in a leaf. These settings describe the reported forests and the ranges of branching behavior the search allowed.

Give the neural networks different word representations

The multilayer perceptron and the long short-term memory network were both tried with different word embeddings. An embedding is a vector of learned values for a word. It supplies a representation in which relationships picked up during training can be reflected in the vectors. In this study, the embeddings all had 300 dimensions. Holding that size constant still left a question about training material. Representations learned from shop agreements might capture uses of words particular to that setting, while ones learned from broad text collections might capture a wider range of vocabulary.

The authors built a separate, unannotated collection to train their own Word2Vec embeddings. They gathered it through the price comparison sites using the same general collection route as for the labeled contracts. It contained 5,412 agreements, of which 4,869 were German and 543 were English. Learning word vectors from those texts required no topic assignments. The labeled corpora then supplied the examples for training the neural classifiers with those representations.

German Wikipedia supplied the material for the pre-existing German Word2Vec and GloVe alternatives. For English, the Word2Vec alternative came from Google News, while the GloVe vectors used Wikipedia and Gigawords 5. The study could therefore compare a representation learned from shop agreements with readily available representations from other sources. The earlier work named for the two representation methods is Word2Vec and GloVe: Global Vectors for Word Representation.

A multilayer perceptron passes an input through successive layers of learned transformations. The authors varied the number of layers, the number of units in each layer and dropout, which withholds some activations during training. They also varied batch size, the number of examples used together for a training update, and epochs, the number of passes through the training data. The appendix records settings by language, label level and input representation. For example, the selected German MLP topic setup with vectors learned from the shop terms used 2 layers with 200 units in each, a dropout of 0.4, a batch size of 100 and 500 epochs.

The long short-term memory network, or LSTM, processes an ordered sequence and carries forward information from earlier positions as it reads later ones. Its search included the input sequence length and the number and width of the recurrent layers. It also included the layers following the recurrent part, plus dropout, batch size and epochs. The appendix lists the settings for the combinations tried and identifies tanh as the activation and Adam as the optimization procedure. The activation transforms the value calculated by a unit, and the optimizer determines how the trainable parameters are updated.

The authors used 5-fold cross-validation for these neural network searches to manage the cost of fitting many candidate settings. They also fixed choices early when those choices did consistently well across the settings considered, leaving fewer possibilities for the rest of the search. That procedure matters when interpreting the comparison of representations. The reported setups reflect tuning within the architectures and representations the authors tested, subject to a search designed to be practical.

Fine-tune BERT separately for German and English

BERT uses a transformer and attention architecture. Attention gives the encoder a way to use relationships between positions in the text when building its representation. For clause classification, what a word contributes can therefore depend on the surrounding words. The authors started with pretrained BERT encoders and used the labeled clauses for fine-tuning, adapting the pretrained parameters to the topic or subtopic assignment task. They implemented this with the Transformers library.

The starting point for English was bert-base-uncased, pretrained on lower-cased English text from Wikipedia and the book collection described in Aligning Books and Movies. German used bert-base-german-cased, which preserves case and comes from German’s Next Language Model. Each has 110 million parameters, with 12 hidden layers that are 768 units wide and 12 heads in every attention layer. Attention heads give the encoder several sets of attention calculations within a layer.

The German encoder’s pretraining sources included German Wikipedia and a web corpus, which the paper says accounted for more than 90% of its pretraining data. It had also encountered the Open Legal Data collection of more than 100,000 German court decisions. That history is relevant when comparing the results across languages. The encoders have the same reported size and architectural dimensions, while their language, case handling and pretraining material differ. The experiment uses each available encoder as a whole.

For tuning, the authors set aside 20% of the training data as a validation set. That portion came from the training split, separate from the 20% test portion of the original language corpus. They began with the candidate batch sizes, learning rates and epoch counts suggested in the original BERT study. The learning rate controls the scale of an update to the parameters. Their search pointed toward smaller batches, so they settled on eight examples per batch and a learning rate of 5e-5 for each language at each of the two label levels.

The selected number of passes was eight epochs for German topics and six for German subtopics. For English, the choices were six epochs for topics and 21 epochs for subtopics. The authors retained the other settings of the starting encoders. They also briefly tested the Multilingual Universal Sentence Encoder, a tool they had used before to detect shop terms. Those early trials were unpromising and did not become a full comparison with the separate German and English BERT classifiers.

Experiments and results

What was sampled and scored

The German sample comprised 142 shop contracts and 5,020 clauses. The English sample comprised 30 contracts and 1,040 clauses. The study gives average contract lengths of 2,478 words for German and 1,846 for English. In both languages, an average agreement contained roughly 35 clauses. The German agreements had more words per contract and, as the authors note, longer clauses on average. These corpora differ in how much labeled evidence is available and in the form that evidence takes.

Titles were common in each corpus. In German, 5,013 clauses, or 99.9%, carried a clause title, a title for the containing paragraph, or both. The comparable English count was 989 clauses, or 95.1%. These figures concern the availability of headings throughout each language corpus. They matter directly for the logistic regression setup because its input includes titles, but they do not measure how much of the classifier’s performance the titles explain.

The labels also had an uneven distribution. The corpus includes 839 German assignments of the delivery topic and 164 English assignments of that topic. Payment appears 898 times in German and 112 times in English. Counts for a narrow label can be much smaller. The distribution table lists 7 German instances of the payment loyalty subtopic and 22 English instances. The authors also observed that a standard withdrawal form was common in the German material. They found such a form in only two English agreements, both supplied by companies based in Germany. The count of agreements with a form and the count of clauses labeled for a subtopic answer different questions about its prevalence.

The paper reports accuracy, precision, recall and F1 on the shop test splits. Precision asks what share of predicted assignments match the reference. Recall asks what share of reference assignments the classifier retrieves. F1 balances those quantities, so a classifier needs both reasonably reliable assignments and reasonably complete retrieval to rank well on it. Accuracy is reported alongside them. Because clauses can have several labels, interpretation of the exact aggregation matters. The reported results do not specify enough about averaging or about the accuracy calculation to treat it as a documented percentage of clauses with perfectly matched label sets.

The main score tables contain rule-based matching, logistic regression, random forest, the multilayer perceptron, the LSTM and BERT. The paper describes the study more broadly as a comparison of seven approaches and separately describes preliminary multilingual trials. The numerical rankings discussed here follow the named rows in its main tables. For the embedding-based networks, those rows report the best results obtained with the inputs tried.

Broad topics in German

German topic classification produced the strongest F1 in the study. BERT reached 0.91 on the German shop test data. Logistic regression followed with 0.87, and random forest reached 0.83. The multilayer perceptron recorded 0.81. The LSTM reached 0.80, while the expert keyword rules reached 0.78.

Topic classification on the German online shop test set by F1

BERT leads the comparison, with logistic regression the closest alternative.

Topic classification on the German online shop test set by F1Rule-based keyword matching: 0.78Rule-based keyword matching0.78LSTM: 0.80LSTM0.80Multilayer perceptron: 0.81Multilayer perceptron0.81Random forest: 0.83Random forest0.83Logistic regression: 0.87Logistic regression0.87BERT (this paper): 0.91BERT (this paper)0.91
The numbers
System or settingF1
Rule-based keyword matching0.78
LSTM0.80
Multilayer perceptron0.81
Random forest0.83
Logistic regression0.87
BERT (this paper)0.91

The companion metrics explain why the ordering depends on F1. Random forest recorded precision of 0.97 on German topics and recall of 0.72. Logistic regression recorded precision of 0.95 and recall of 0.80. BERT’s precision was 0.93 and its recall was 0.89. The forest placed more reliably when it predicted a label, while BERT recovered more of the annotations and achieved the highest F1. BERT also led the German topic accuracy column at 0.84, with logistic regression at 0.77.

The keyword rules achieved recall of 0.80 and precision of 0.77 in this setting. They could recognize a substantial share of the broad assignments, with more incorrect assignments among their predictions than the learned approaches with higher precision. The authors point to distinctive German contract terms as one plausible reason a lexical baseline could do this well. Rules written by lawyers have access to names that directly signal familiar legal subjects. Logistic regression has a way to assign weight to recurring terms without requiring each cue to be specified in advance.

Broad topics in English

For English topics, BERT again led the held-out comparison, at an F1 of 0.85. Logistic regression achieved 0.80. This time the LSTM, at 0.77, and the multilayer perceptron, at 0.76, both ranked ahead of the random forest, at 0.70. The keyword baseline scored 0.72. Thus the middle of the ranking shifted between the languages even though BERT and logistic regression again occupied the highest F1 positions.

BERT’s English topic precision was 0.89 and its recall 0.82. Logistic regression was close in precision at 0.88 and obtained recall of 0.73. The LSTM’s recall of 0.74 was higher than that of logistic regression for these data, while its precision of 0.80 brought its F1 below logistic regression’s. The English topic accuracy values show another change in order. Both neural networks with embeddings achieved 0.72, logistic regression achieved 0.71, and BERT achieved 0.79. Specifying the metric is important when describing which approach performed better.

Narrow labels in the shop corpora

German subtopic F1 was highest for BERT at 0.86, followed by logistic regression at 0.84. Random forest scored 0.77, the multilayer perceptron 0.75 and the LSTM 0.72. The keyword rules scored 0.64. Logistic regression and random forest each achieved precision of 0.91. Their recalls were 0.78 and 0.67, respectively. BERT again had the best recall, at 0.83, with precision of 0.89 and accuracy of 0.79. Logistic regression’s accuracy was 0.75.

English subtopic prediction gives a different picture of the alternatives. BERT had the highest F1 at 0.73. The multilayer perceptron scored 0.71 and the LSTM 0.70. Logistic regression, which placed immediately behind BERT for broad English topics, reached 0.68 for English subtopics. Random forest reached 0.57 in the results table.

Subtopic classification on the English online shop test set by F1

BERT leads, and both embedding-based neural networks finish ahead of logistic regression.

Subtopic classification on the English online shop test set by F1Rule-based keyword matching: 0.43Rule-based keyword matching0.43Random forest: 0.57Random forest0.57Logistic regression: 0.68Logistic regression0.68LSTM: 0.70LSTM0.70Multilayer perceptron: 0.71Multilayer perceptron0.71BERT (this paper): 0.73BERT (this paper)0.73
The numbers
System or settingF1
Rule-based keyword matching0.43
Random forest0.57
Logistic regression0.68
LSTM0.70
Multilayer perceptron0.71
BERT (this paper)0.73

The chart follows the English subtopic results table, which gives the rule-based baseline an F1 of 0.43. The evaluation prose gives 0.46 for the same language, level and metric, and the paper gives no separate setting that would reconcile them. The ordering shown in the table places the rules below the other approaches.

As in the topic comparison, precision alone would give a different order. On English subtopics, the forest delivered precision of 0.85 and recall of 0.43. BERT had precision of 0.79 and recall of 0.68. The multilayer perceptron had precision of 0.76 and recall of 0.66. Its reported accuracy of 0.67 was the same as the LSTM’s and close to BERT’s 0.68. The forest’s relatively high precision came with much more limited coverage of the reference assignments.

Every approach has a lower reported F1 for subtopics than for topics in each language. A broad class can collect more examples about a subject, while the narrower task asks which particular aspect is present. The observed pattern is consistent with the extra specificity of the task and the sparsity of some subtopics. The comparison on its own does not establish which of those properties accounts for the scores.

Transfer from German shops to German banks

The authors took the German BERT topic classifier that performed best on the shop data and applied it to the general business conditions of Commerzbank, Deutsche Bank and Sparkassen. They annotated the bank clauses with the shop taxonomy, using independent passes and expert resolution of disagreements as before. They also added an annotation category for clauses whose subjects lay outside the taxonomy. This made it possible to distinguish failure of the category list to cover a provision from failure to recognize a category the list already included.

The bank sample contains 214 clauses and 13,681 words. The authors report that 71 clauses, or 33%, concerned a topic in the shop taxonomy. Another 143 clauses were recorded in the outside-taxonomy category. Deposit protection funds and banking confidentiality are examples of the missing subjects. Broad labels that did apply included withdrawal, liability and payment, along with topics about how the agreement operates, such as applicability and applicable law.

For some shared subjects the reported results were strong. F1 was 1.00 for applicable law and 1.00 for arbitration. Changes achieved 0.91 and applicability 0.75. Other shared labels traveled less well. The bank table gives F1 values of 0.58 for liability, 0.28 for payment and 0.70 for withdrawal. Place of jurisdiction and prices each scored 0.00. The highest scores have limited support in this sample. The topic count table lists 3 banking clauses about applicable law and 2 about arbitration. These results are examples of successful transfer on the observed clauses, with too few examples for a broad estimate of reliability.

The bank table also reports a total F1 of 0.43 for its listed topics. The paper separately gives 0.33 as the ceiling on recall if success means retrieving the subject of every banking clause with the existing taxonomy. That ceiling reflects coverage, while the classifier table presents results for labels the classifier had been trained to predict. In particular, the total recall printed in the classifier table is 0.97, and its aggregation is not explained in enough detail to reconcile it directly with the all-clause coverage statement. The topic-specific values and human coverage count offer clearer evidence about what transferred.

What the ablations show

Predicting the levels together

The most direct comparison of task design asked whether one classifier should predict topics and subtopics jointly. The hierarchy gives this idea an apparent advantage. A broad topic can constrain the subtopics that are plausible, and a distinctive subtopic can be evidence for the broad label. The authors report that the joint setup reduced classification quality at both levels. They proceeded with separate classifiers for their main comparison.

The paper gives the direction of the result without joint-classifier scores or enough implementation detail to identify the reason for the decline. Several properties change when the levels are fitted together. Frequent broad labels and sparse subtopics have different distributions and may put different demands on training. The setup also has to represent cases where a topic is present without a subtopic. The result supports the authors’ design choice for these experiments. How a joint classifier that explicitly enforces the taxonomy might perform remains open.

An important distinction follows. The finding concerns prediction quality under the joint setup they tried. The hierarchy still does work in the annotation scheme because it establishes what a narrow label means. A reader comparing the independent scores should keep in mind that the paper assesses each level by itself. It does not measure how often a broad prediction and a narrow prediction, used together on the same clause, agree with the required parent relationship.

Comparing embeddings within the neural approaches

The experiments with embeddings ask whether the source of a word representation makes a consistent difference. The contract-trained vectors had seen the kind of document being classified. The alternatives had been learned from more general collections. Using these input alternatives for both the multilayer perceptron and the LSTM gave the authors a way to look for a representation that worked across architectures, languages and label levels.

The authors report comparable performance across the embeddings, with no consistent winner or loser. The main score tables give the best results for the two neural approaches, and the appendix documents the training settings used for the different inputs. Together, these establish that more than one source of word vectors was viable. The main tables do not provide a full grid of scores showing how much a particular classifier changed when given a different embedding.

The comparisons also involve tuning other settings for particular inputs. For instance, the chosen multilayer perceptron can have different numbers of layers or units when it receives vectors from shop terms and when it receives a general-purpose alternative. Some alternatives differ in both their training text and how the vectors were learned. The study consequently evaluates practical combinations of inputs and classifier settings. A narrower experiment holding the representation method and classifier settings fixed would be needed to isolate an effect of training the vectors on contracts specifically.

Reading the ranking alongside the authors’ hypothesis

The authors expected classification to improve as they moved from conventional statistical methods through neural networks to BERT. The pattern at the top fits that expectation. BERT leads all the main F1 comparisons. The ordering underneath it defeats a simple complexity rule. Logistic regression was stronger than the two embedding-based neural networks at both levels in German and for English topics. For English subtopics, the neural networks overtook it.

The German vocabulary gives the authors a plausible explanation for the strong keyword and logistic regression results. Expressions for the right of withdrawal or the transfer of risk can name recurring concepts quite directly. If a term often accompanies the same human label, a keyword condition can detect it and a weighted feature can learn its association with the label. Headings provide another plausible source of explicit cues in the logistic regression setup. The paper does not report a run with those terms or titles removed, so the size of either contribution remains unmeasured.

BERT’s precision and recall provide further evidence about the kind of improvement seen in the main tables. Several systems can give precise labels on examples for which they find enough evidence. BERT usually adds recall while retaining high precision. That pattern is visible in the German topic comparison with random forest and again in the English subtopic comparison. The results do not isolate whether the improvement comes from contextual representation, the material used in pretraining or another property of the fitted system. They describe the behavior of the complete classifiers.

Changing the language or the contract domain

The early multilingual trials tested a separate possibility. Pooling languages might help if subject categories recur across the two corpora and the shared representation makes evidence from either language available to the classifier. The paper reports that the early results gave little reason to pursue that setup. It provides neither comparable multilingual scores nor a broadly tuned comparison of language-sharing methods. The trial is evidence about the approach explored, and the authors explicitly call for more investigation.

The authors point to previous results elsewhere in the legal domain to explain their interest in language sharing. Those examples include their earlier detection of online shop terms and Swiss-Judgment-Prediction. Identifying a type of document, predicting a judgment and labeling the subjects inside a consumer contract are different tasks. The preliminary result leaves open which properties of this task or its data made the multilingual approach unpromising.

The banking test changes the domain while holding the language and fitted German shop classifier fixed. Its first comparison is between clauses that fit the shop taxonomy and those whose subjects lie outside it. The second comparison is among the familiar categories, some of which transferred far better than others. Keeping these questions distinct explains how the same test can show high scores for applicable law or arbitration and limited usefulness for indexing an entire banking agreement. A system can generalize a known subject and still lack the categories for most other passages in the document.

Limitations

Limits the authors identify

The paper ties its evidence to online shop terms collected through particular price comparison services. It emphasizes that the English corpus reflects the UK market. The participating shops were based there or directed their business at it. The authors expect English terms from other markets, including the United States and Australia, to differ. A common language gives a classifier familiar words, while contract practice and the kinds of provisions found in a corpus can still vary with the market. The sample supports a comparison between the actual German and UK-facing English terms collected for the study.

The text the researchers annotated was protected by copyright, and the authors say they could not release the corpus. The described procedure gives a future study a way to collect and annotate similar material. Direct reproduction of the original document sample, its clause boundaries, its final assignments and its test predictions would require the underlying data. The unavailability of the corpus also limits detailed inspection of errors, because a reader cannot check the disagreement cases against their full clauses.

The taxonomy was designed for shopping. The paper explicitly identifies domain-specific subjects and uses the bank agreements to show the resulting coverage issue. A shopping subtopic such as broken packaging has a natural place in the original scheme, while banking confidentiality has no corresponding category there. The authors suggest that the general workflow could be adapted for other regulated consumer agreements, including insurance, housing and employment. They present these as directions for investigation. Their transfer evidence consists of the banking test, where some contract-related categories carried over.

The authors point to computational cost at both training and prediction time when weighing BERT against logistic regression. Their practical judgment is that the simpler classifier may be preferable in some applications given its scores. The paper does not supply runtime, resource usage or cost measurements that would identify which application conditions favor either approach. Its evidence for the tradeoff comes from the reported predictive performance and the differences between the approaches and training procedures.

They also identify risks and unresolved questions within particular approaches. Compound splitting was outside the keyword implementation. The large selected value of C for English topic logistic regression led them to raise the possibility of overfitting. And the initial multilingual result warranted further study. Each is specific to what the authors built and tested, so each leaves room for a different implementation or training design to behave differently.

What the evaluation leaves open

The paper describes balancing label representation across training and test data and preserves a contract identifier in the corpus. It does not say whether all clauses from an individual contract were kept in the same portion, or whether related agreements using similar templates were grouped together. This distinction matters because the evaluation unit is a clause and several clauses originate in each agreement. A held-out clause test and an evaluation on entirely unseen agreements answer different questions. When titles, drafting patterns or common template wording recur, the contract-level split procedure affects how confidently the scores can be read as evidence about new merchants or templates.

The reported agreement figure describes the annotation process overall. It does not identify the categories annotators found most difficult or show how agreement changed between broad and narrow labels. The figures for the label distribution show that some categories have many more examples than others. The aggregate classifier scores cannot tell a reader how reliably the system handles each rare category in the shopping taxonomy. A high overall score can coexist with uncertain performance on precisely the clauses a particular user needs to find.

Cross-language comparisons combine several differences. The English training corpus is smaller, the clauses are generally shorter, the markets supply different mixtures of subjects, and headings are less widespread in the English material. The BERT encoders begin with different pretraining sources and case handling. Those conditions help explain why the authors describe the two settings separately. The measured scores do not isolate a single cause for the differences between German and English results.

The study’s comparisons also have limits of resolution. The paper supplies best scores for the embedding-based networks and describes the direction of the joint-label result. It does not quantify uncertainty around the rankings by reporting confidence intervals or variation over repeated test splits. Close values can therefore be read as descriptive results on the specified evaluation. Establishing how stable their order would be under different samples or repetitions would require additional measurements. The selected setting found by a grid search likewise reflects the range and procedure used by the authors.

Taxonomy coverage is conditional on the development process. The authors reviewed real clauses against the initial scheme and used gaps in that material to revise it. Doing so makes the finished labels more relevant to the shop data. It leaves open how frequently a fresh collection would introduce further subjects. The bank test illustrates this dependence especially well. Low coverage can arise because the list was built for a different domain, even when the clauses outside it have ordinary and important functions in the new domain. An outside-taxonomy label therefore requires interpretation before it can be used to flag a legally unexpected term.

Finally, even a correctly assigned topic provides one kind of assistance. A withdrawal label can help a reader locate the merchant’s withdrawal language. Whether the wording is enforceable, whether the merchant has included all necessary information, and whether the clause answers the reader’s own question call for other judgments. The paper’s experiments measure reproduction of topic labels and a limited form of transfer. The proposed effect on consumers’ decisions and lawyers’ review work remains to be measured directly.

What came after

AGB-DE is a 2024 citing work that presents a corpus for automated legal assessment of clauses in German consumer contracts. It shares the earlier study’s focus on individual provisions in consumer agreements. Its stated purpose shifts from organizing clauses by subject to supplying material for their legal assessment. A clause about withdrawal can be identified as such before anyone asks whether the language governing withdrawal is legally acceptable. The two tasks make different demands on the judgments recorded in a corpus.

The citation establishes a connection between those projects at the level of clause-oriented work on consumer contracts. The later work’s title establishes its corpus focus and intended assessment task. The extent to which it reused the shopping taxonomy, the agreements or the earlier classification methods remains unspecified. The contribution of Braun and Matthes’s study to this line of research is the evidence it supplies for the subject-identification problem, including where recognition succeeds and where a domain change leaves the original categories unable to describe the clauses.

Cite

Cite as Daniel Braun and Florian Matthes. 2022. Clause Topic Classification in German and English Standard Form Contracts. Proceedings of the Fifth Workshop on e-Commerce and NLP (ECNLP 5).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2022.ecnlp-1.23

@inproceedings{braun2022clause,
  title = {{Clause Topic Classification in German and English Standard Form Contracts}},
  author = {Daniel Braun and Florian Matthes},
  booktitle = {Proceedings of the Fifth Workshop on e-Commerce and NLP (ECNLP 5)},
  year = {2022},
  doi = {10.18653/v1/2022.ecnlp-1.23},
  url = {https://doi.org/10.18653/v1/2022.ecnlp-1.23}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/braun-2022-clause-topic-classification-german-english/