---
title: "ClauseRec — paper by Aggarwal et al. (2021)"
description: "ClauseRec recommends missing contract clauses by predicting relevant clause types, then generating wording from the surrounding agreement."
canonical: "https://research.elamur.ai/free/en/papers/aggarwal-2021-clauserec-clause-recommendation-framework-ai/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/aggarwal-2021-clauserec-clause-recommendation-framework-ai/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / ClauseRec: A Clause Recommendation Framework for AI-aided Contract Authoring

# ClauseRec: A Clause Recommendation Framework for AI-aided Contract Authoring

Paper · 2021 · Vinay Aggarwal, Aparna Garimella, Balaji Vasan Srinivasan et al.

**Authors:** [Vinay Aggarwal](https://md.research.elamur.ai/free/en/authors/vinay-aggarwal/), [Aparna Garimella](https://md.research.elamur.ai/free/en/authors/aparna-garimella/), [Balaji Vasan Srinivasan](https://md.research.elamur.ai/free/en/authors/balaji-vasan-srinivasan/), [Anandhavelu N](https://md.research.elamur.ai/free/en/authors/anandhavelu-n/) and [Rajiv Jain](https://md.research.elamur.ai/free/en/authors/rajiv-jain/) · **Year:** 2021 · **Venue:** Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.emnlp-main.691/)
- [PDF](https://aclanthology.org/2021.emnlp-main.691.pdf)
- [DOI 10.18653/v1/2021.emnlp-main.691](https://doi.org/10.18653/v1/2021.emnlp-main.691)

## What it is about

ClauseRec recommends missing contract clauses by predicting relevant clause types, then generating wording from the surrounding agreement. · about 33 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Drafting a contract involves deciding which provisions belong in it and choosing wording that fits the particular agreement. A clause that looks appropriate in isolation may be unnecessary, inconsistent with the surrounding document, or unsuitable for the parties involved. ClauseRec studies assistance with this process through [legal AI](https://md.research.elamur.ai/free/en/topics/legal-ai/). Its central proposal is to separate the decision about what kind of provision is missing from the decision about what that provision should say. The system first assesses whether an absent clause type would be relevant to a contract. If it predicts relevance, it then recommends clause content conditioned on the contract and the requested type.

The authors develop ContractBERT by continuing the training of [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) on contract language. Alongside BERT’s existing training tasks, they add exercises concerning the relationship between clause labels and clause text, and whether sentences originate in the same clause. The resulting representations support both stages of ClauseRec. A separate binary classifier handles relevance for each target clause type. A transformer decoder produces the proposed wording, using a representation that combines the surrounding contract with information about the target type. The paper compares this approach with collaborative filtering over clause-type occurrences and with methods that retrieve material from similar contracts or clauses.

The experiments use [LEDGAR](https://md.research.elamur.ai/free/en/papers/tuggener-2020-ledgar-large-scale-multi-label/), a collection of contractual provisions derived from filings with the U.S. Securities and Exchange Commission. Because the collection does not directly supply examples of drafting decisions, the authors construct substitute tasks. They remove an existing clause and ask the system to recognize its type as relevant and reconstruct its content. For relevance classification, they also sample contracts that lack the target type and treat those as negative examples. The reported comparisons cover Governing Laws, Severability, Notices, Counterparts, and Entire Agreements. Binary classification achieves the strongest F1 result on most of these types, although document similarity performs better on Notices. Collaborative filtering consistently achieves the highest recall, accompanied by weaker precision.

For clause content, generation obtains higher reported ROUGE scores than either retrieval setting across the evaluated types. On Governing Laws, for example, ROUGE-L is 0.327 for retrieval based on the contract representation, 0.399 when retrieval also uses the target-type representation, and 0.506 for generation. These results support the usefulness of training specifically to recover a removed provision. They do not establish that generated language is legally correct or ready for inclusion in an agreement. The authors explicitly distinguish relevance from factuality, observe that generated clauses can be repetitive, and acknowledge that retrieval may seem safer because it preserves existing wording. Their qualitative examples also show why textual similarity and practical drafting quality require separate scrutiny: a generated clause can resemble the reference while containing omissions, altered details, or visibly damaged language.

### Ideas worth borrowing

Separate deciding from composing. ClauseRec treats the need for a provision and the wording of that provision as different problems. This makes an otherwise open-ended writing task more manageable: the system can assess whether a category belongs before producing its content. The same separation can help with document completion, report assembly, and structured assistance, where producing plausible text is easier than establishing that the text is needed.

Adapt representations to meaningful document units. The additional ContractBERT tasks concern clauses and their labels, rather than only generic sentence relationships. This makes the training signal reflect distinctions that matter to the downstream application. Elsewhere, the relevant unit might be an experimental procedure, a software requirement, or an entry in a technical reference. The reusable idea is to make adaptation sensitive to the document’s own organization.

Build a supervised task by removing a known component. Existing contracts provide examples of clauses that actually occurred together. Removing a clause produces an input with an identifiable reconstruction target, avoiding the need to collect every training example from a live drafting session. This strategy applies to other structured documents, provided its limits remain explicit: recovering an original component is evidence about reconstruction, not automatic evidence about what every future document ought to contain.

Use category information when selecting an instance. Retrieval improves when its query represents both the surrounding agreement and the target clause type. The broader lesson is that context and requested function contribute different information. A search system may understand the subject of a document while still needing an explicit indication of whether the user wants a definition, exception, obligation, or example.

Compare structural evidence with textual evidence. The collaborative-filtering baseline considers which clause types occur together, while the other approaches use clause content. Their contrasting precision and recall show that these evidence sources behave differently. Similar comparisons can reveal whether a recommendation system mainly follows common document patterns or responds to the particular language of the current case.

Evaluate usefulness separately from fidelity. Higher ROUGE scores favor ClauseRec’s generator, but the paper does not treat that result as a complete account of drafting quality. Retrieval preserves existing language yet can choose the wrong provision; generation can fit the reference more closely while introducing problematic wording. Keeping these questions separate is useful whenever an assistant recommends consequential text rather than merely predicting a label.

### How Mova uses it

Mova is a small, transparent language system implemented in Rust. Its relevant existing mechanisms include explicit language analysis, configured task execution, source-bound retrieval, reviewed teaching proposals, and separate admission and assessment paths. The connections below are proposals grounded in those mechanisms. The status marks describe correspondence with the documented implementation; they do not claim that ClauseRec has already been applied or that any proposed transfer has produced a measured improvement.

Idea: Separate deciding from composing. Where: Methodology, sections 2.1 and 2.2, and Figure 1. Area: task planning. Mova: частково є (configured capability resolution in `tools/octopus`, described in `docs/hybrid-system.md`). Mova already distinguishes understanding an admitted operation from executing its handler. ClauseRec suggests an additional explicit decision about whether proposed content is needed before preparing that content. A rule-based relevance check could precede a dictionary supplement or lesson proposal. Why Mova: this could prevent a fluent or well-formed proposal from being mistaken for evidence that an addition is necessary.

Idea: Adapt analysis to meaningful document units. Where: Methodology and the ContractBERT training description. Area: document representation. Mova: частково є (frames and text worlds in `prag` and `world`; shared document graphs in `world/src/knowledge/retention/mice.rs`). Mova could represent the functional unit of a source document explicitly, connecting its label, constituent sentences, and role in the whole. This need not reproduce neural pretraining. It could use typed graph links and deterministic checks. Why Mova: unit boundaries may help the logical module distinguish a definition from an example or a qualification.

Idea: Construct reconstruction tasks by removing a known component. Where: Experiments and Evaluation, Data. Area: evaluation design. Mova: нове. A proposed benchmark could hide a known fact, explanatory step, or document component and ask Mova to identify the missing role before recovering its content from permitted evidence. Assessment material would remain outside training. The proposal concerns a specific evaluation protocol; its novelty is provisional because the digest is incomplete. Why Mova: it could expose whether Mova understands how a component contributes to a larger structure.

Idea: Combine surrounding context with the requested category. Where: Clause Content Recommendation and the similarity-based retrieval description. Area: information retrieval. Mova: частково є (`tools/dictindex` filters by language, lemma, observed UPOS, frame, and reviewed selector). Mova could compare retrieval based on contextual evidence alone with retrieval additionally constrained by the requested information type. For a dictionary worker, that type might distinguish an observed construction from a proposed sense description. Why Mova: the comparison could show whether explicit intent improves evidence selection beyond lexical and contextual matching.

Idea: Compare structural evidence with textual evidence. Where: Experiments and Evaluation, collaborative filtering and document-similarity baselines. Area: statistical analysis. Mova: частково є (`tools/dictindex` records frames, collocates, source domains, and explained statistical selectors). A proposed experiment could contrast document-component co-occurrence with native frame-based evidence for the same recommendation task. Each would retain its own reasons instead of being merged without inspection. Why Mova: differing error patterns could reveal when familiar document structure substitutes for actual interpretation.

Idea: Evaluate usefulness separately from fidelity. Where: Results and Discussion, the comparison of retrieval and generation. Area: evaluation. Mova: вже є (source checks and staging boundaries in `tools/enrich`; reviewed admission and exact corpus-witness gates in `tools/nautilus` as described by `tools/dictindex`). Mova already distinguishes a plausible draft from admitted knowledge. ClauseRec provides a concrete reason to preserve that boundary: matching an expected answer does not establish that every detail is supported. A Mova evaluation could report retrieval relevance and source support as separate outcomes.

Idea: Keep the target’s absence explicit. Where: Clause Type Relevance Prediction and the recommendation baselines. Area: task preconditions. Mova: частково є (existing dictionary preservation and closed/admitted exclusions in the Nautilus handoff). ClauseRec recommends a type only when it is absent from the current contract. Mova could make the equivalent precondition visible in other completion tasks, checking for an existing definition, lesson component, or supported operation before suggesting an addition. Why Mova: this could reduce duplicate work while making the reason for abstention reviewable.

Idea: Treat missing observations cautiously. Where: Experiments and Evaluation, negative-example construction. Area: data semantics. Mova: вже є (explicit gaps in `docs/architecture.md`, missing-context failures in `docs/hybrid-system.md`, and coverage reporting in `tools/dictindex`). ClauseRec’s negative examples come from contracts where a type was not observed; that is a proxy for irrelevance. Mova should preserve the analogous distinction between unavailable evidence and a negative conclusion. Existing gap reporting provides a suitable mechanism, and the paper supplies a useful case for testing that distinction.

Idea: Preserve component identity when summarizing a document. Where: Clause Type Relevance Prediction, averaging clause representations. Area: knowledge representation. Mova: частково є (entity and event state in `world`, and shared retained graphs in the mice reading path). ClauseRec compresses many clauses into an average representation. A logical counterpart could summarize a document while retaining links to the original components and their roles. Why Mova: a compact overview would remain inspectable when a rare exception or a particular participant determines the answer.

Idea: Test whether shared context actually changes a recommendation. Where: Clause Content Recommendation and Results and Discussion. Area: controlled evaluation. Mova: частково є (course controls in `docs/architecture.md` and fresh-versus-prepared-graph reading in `world/src/knowledge/retention/fastread.rs`). A proposed test could hold the requested component type constant while changing relevant context, then inspect whether Mova changes its answer appropriately. This would go beyond demonstrating that the requested category was recognized. Why Mova: it could reveal generic answers that look suitable but ignore the document’s particular state.

Idea: Separate a candidate collection from the selected answer. Where: Clause Content Recommendation and the explanation of retrieval evaluation. Area: recommendation interfaces. Mova: частково є (dictionary proposals and reviewed selectors in `tools/dictindex`). ClauseRec’s retrieval can offer several candidates, while its generator produces a single clause and the reported retrieval metric evaluates the most similar candidate. Mova could retain candidate provenance and selection reasons separately from the final proposal. Why Mova: this could make a selection failure distinguishable from a failure to retrieve useful evidence at all.

Idea: Measure category-level tradeoffs. Where: Table 1 and Results and Discussion. Area: statistics and evaluation. Mova: вже є (per-field reliability reporting in `prag/src/eval.rs` and relation-specific agreement analysis in `peta/tools/treeagree/src/kappa.rs`). ClauseRec’s relevance methods do not have the same ranking for every clause type. Mova’s existing detailed reporting is therefore preferable to a single overall success claim. The transferable practice is to inspect whether an apparent general improvement conceals a category where another method remains stronger.

Idea: Keep thresholds attached to their validation purpose. Where: Clause Type Relevance Prediction and Appendix B.1. Area: calibration. Mova: частково є (logged routing thresholds in `layers`, described in `docs/architecture.md`; confidence analysis in `prag/src/eval.rs`). ClauseRec uses a classifier threshold and tunes separate collaborative-filtering thresholds. Mova could record which decision objective justified each threshold, together with held-out behavior and failures. Why Mova: this could make a relevance threshold understandable as a measured operating choice rather than a universal boundary between knowledge and ignorance.

Idea: Distinguish category coverage from extensibility. Where: Results and Discussion, comparison of document similarity and binary classification. Area: system design. Mova: частково є (configured handlers in `tools/octopus` and domain routing in `layers`). A classifier for each clause type trades explicit specialization for additional training work when categories expand. Mova could compare specialized rules with a shared retrieval path as its dictionary or supported task vocabulary grows. Why Mova: the comparison could identify where a transparent general mechanism suffices and where a category needs dedicated treatment.

Idea: Account for the storage requirements of retrieval. Where: Results and Discussion, document-similarity costs. Area: data systems. Mova: вже є (`pack` storage and the compressed occurrence index in `tools/dictindex`). ClauseRec notes that retaining a large contract collection can constrain document-similarity methods. Mova already treats storage layout and record access as implementation concerns. The useful transfer is to assess a recommendation method together with the evidence it requires retaining, rather than treating retrieval quality as independent of operational cost.

Idea: Audit preprocessing against the task’s meaning. Where: Appendix B.2, decoder preprocessing. Area: data processing. Mova: частково є (language-specific tokenization in `en/src/tok.rs` and original sentence evidence in `tools/dictindex`). ClauseRec removes punctuation and single-letter words before generation. For Mova, a proposed audit could compare the information needed for native interpretation with what each normalization step discards. Why Mova: preserving source evidence would allow a worker to distinguish harmless formatting changes from transformations that erase a meaningful distinction.

Idea: Report the population excluded by length limits. Where: Appendix B.2, clause-length filtering. Area: evaluation coverage. Mova: вже є (bounded coverage and absent-coverage reporting in `tools/dictindex`; bounded packet preparation in `tools/enrich`). ClauseRec discards clauses beyond its stated generation limit. Mova’s corresponding practice should continue to identify which sources or components were actually processed. A bounded success rate should remain attached to that population, especially when longer or structurally richer documents may behave differently.

Idea: Inspect malformed output alongside aggregate scores. Where: Appendix C and Table 4. Area: error analysis. Mova: частково є (traceable decisions in `world`, validation gates in `tools/enrich`, and retained worker outcomes in the hybrid-system description). ClauseRec’s examples expose damaged generated wording in spite of favorable overlap scores. Mova could keep structured error categories for malformed proposals, unsupported entities, omissions, and changes in logical force. Why Mova: this could prevent an improving numerical score from concealing a practical failure visible in an individual result.

Idea: Separate local completion from global consistency. Where: Clause Content Recommendation and the governing-law qualitative example. Area: reasoning. Mova: частково є (world-state predicates and explicit justification in `docs/architecture.md`). A proposed document assistant could check a suggested component against entities, states, and commitments already represented in the document. ClauseRec does not establish such a consistency checker, so this is a Mova hypothesis inspired by its task. Why Mova: explicit logical checks could complement similarity when the right category still permits incompatible content.

Idea: Treat repeated wording as both a resource and a diagnostic risk. Where: Introduction and Results and Discussion. Area: corpus analysis. Mova: частково є (occurrence-level evidence and source strata in `tools/dictindex`). Repeated constructions can provide economical dictionary evidence, but they can also make an evaluation look easier than unfamiliar usage would be. Mova could inspect repeated source patterns separately from broader coverage. Why Mova: this could help distinguish strong support for a common formula from demonstrated understanding across different contexts.

Idea: Keep visualization claims narrower than task evidence. Where: Figures 2 and 3. Area: interpretation of representations. Mova: частково є (explained statistical proposals in `tools/dictindex`, explicitly awaiting review). ClauseRec illustrates clause-type clustering after adaptation, but the figures do not isolate the contribution of each added training task. Mova could apply the same caution to clusters of word occurrences: a visible grouping is a candidate observation, not an admitted sense boundary. Why Mova: this preserves the distinction between suggestive structure and a tested linguistic claim.

### The problem and its context

A contract is organized around provisions that establish parts of an agreement between parties. Authoring therefore requires more than writing grammatically acceptable sentences. A drafter must choose the kinds of provisions the agreement needs and adapt their content to the current transaction. The paper describes a workflow that frequently begins with a template containing a basic collection of clauses. The drafter then changes that collection by inserting, deleting, or revising provisions. This requires both manual effort and knowledge of the domain.

ClauseRec focuses on assistance during that customization process. Its input is an existing contract instead of an empty document. The proposed output is content that could be added to it. This makes the surrounding agreement central to the task: the system is not merely asked for a generic example of a governing-law clause, but for a relevant recommendation given what is already present.

The distinction between a clause’s type and its content organizes the whole approach. A type describes the function or category of the provision. Its content supplies the actual contractual language. Many different clauses can share a type while differing in details. Recognizing that a contract may need a Notices provision does not determine the delivery methods, addresses, or recipients that its wording should specify. Conversely, finding a fluent Notices clause does not establish that this agreement needs another one.

This is why the paper frames recommendation as a staged task. The relevance stage asks whether an absent category should be considered. The content stage asks which wording could fill that role. The separation also creates distinct evaluation questions. A system can identify the right type but recommend unsuitable text. It can also produce plausible text for a type that should never have been proposed.

The authors place the work within [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/), while emphasizing characteristics of contracts that complicate transfer from general text. They describe contractual language as highly repetitive, drawing on earlier work by Simonson and colleagues. Clauses can share substantial wording across documents. This repetition offers material for learning recurring patterns, but it also means that generic textual resemblance may fail to capture the details that distinguish one provision from another.

The paper’s account of earlier recommendation research includes approaches that use item relationships and approaches that use textual descriptions. Wang and Fu adapted BERT’s sentence-pair training idea to purchase prediction for recommendations in e-commerce. Malkiel and colleagues developed RecoBERT around item descriptions for wine and fashion recommendations. These examples show that text representations can support recommendation, but the authors do not assume that the same task formulation transfers directly to contractual provisions.

Another cited line of work concerns citation suggestions for academic drafts. Bhagavatula and colleagues recommended citations using textual content without relying on metadata. This is a closer analogy in the sense that the user is composing a document and the system recommends something to add. Yet a contract clause is itself consequential text that must fit the agreement. Its suitability depends on domain-specific language, not just on whether it concerns a related topic.

The authors accordingly present their contribution as an initial effort towards assisted contract authoring. Their ambition is broader than the immediate experiments, but the implemented task is deliberately narrower than producing an entire agreement. ClauseRec recommends provisions within an existing document. It does not demonstrate a complete drafting workflow, negotiation between parties, or a mechanism for verifying the resulting agreement.

An important contextual choice is the use of existing contracts as evidence of what belongs together. The dataset supplies completed documents and their clauses, rather than a history of editorial decisions. The authors therefore learn from observed composition: if a clause occurred in a contract, removing it creates a recoverable gap. This is a practical way to formulate a supervised problem, but it also defines the meaning of success. The system learns to reconstruct observed contractual content, which is only a proxy for deciding what an unfinished agreement ought to contain.

The paper’s contribution is consequently both a recommendation architecture and a task construction. It asks how to derive useful drafting assistance from collections that were not originally assembled as records of authoring behavior. Understanding that construction is essential to interpreting the results: the experimental relevance labels come from occurrence and removal, while the practical notion of relevance concerns a drafter’s needs.

### The method, step by step

#### Representing a contract as a collection of clauses

ClauseRec begins with a document divided into clauses. Each clause has a label describing its type and text carrying its content. These units allow the system to distinguish document structure from the wording inside each part.

The contract can be much longer than the encoder’s ordinary input capacity. The authors note that contract token counts commonly exceed 512. Instead of encoding the entire agreement as a single sequence, they encode its clauses separately and combine the resulting representations. This choice makes the clause boundary an operational part of the architecture, not merely a label used during evaluation.

The overall process is:

ClauseRec from an unfinished contract to suggested content The steps in order.

The diagram describes the proposed classification-and-generation route. The paper also evaluates alternatives in which co-occurring types determine relevance or similarity retrieves existing clause text.

#### Adapting the encoder to contracts

The starting encoder is BERT. ClauseRec retains BERT’s masked-word prediction and sentence-pair training tasks, then adds supervision related to contractual structure. The appendix states that the authors collect 250k contracts for this continued training and run it until the losses converge.

The added tasks ask whether words from a clause label belong with a particular clause and whether sentences come from the same clause. The former connects categorical names with textual content. The latter encourages sensitivity to the boundaries of a provision. Together, they aim to make the encoder’s representations more appropriate for comparing clauses.

These exercises differ from directly teaching the later relevance decision. A clause-label relationship helps represent what a provision is about. It does not by itself determine whether that provision is required in a particular agreement. Likewise, recognizing sentences from the same clause is a representation-learning task, not a legal consistency test.

The paper illustrates the intended effect through clause-embedding visualizations. Figures 2 and 3 compare representations produced by the starting encoder and ContractBERT. The authors interpret the adapted representations as grouping clauses of the same type more successfully while separating different types. These figures motivate the adaptation, although they do not provide a numerical breakdown of how much each training task contributes to downstream results.

#### Producing a contract representation

For each existing clause, ContractBERT supplies the embedding associated with the special `[CLS]` token. In this architecture, that embedding acts as a summary representation of the clause. The authors average those summaries to obtain `ct_rep`, the contract representation.

Averaging gives the relevance classifier a fixed-size input even when documents contain different amounts of text. It also allows the system to reuse the same clause encoder throughout the pipeline. The appendix describes the resulting contract vector as 768 dimensional.

This representation is compact, but its meaning needs to be understood precisely. The classifier receives an aggregate of clause-level summaries. The paper does not describe an explicit representation of clause order, a symbolic inventory of contractual commitments, or dedicated links between exceptions and the provisions they qualify. Any information about those relationships must survive the clause encodings and their averaging.

#### Predicting whether a type is relevant

For each target clause type, the authors train a binary classifier. Its input is `ct_rep`; its output is a probability-like score indicating whether the type should be recommended. The main method uses a score above 0.5 as a positive relevance decision.

Training examples are constructed around the target type. Positive examples are contracts that originally contain it, with the corresponding clause removed. Negative examples are sampled from contracts that do not contain it. The sampling produces equal numbers of examples in the relevant and not-relevant classes.

The classifier therefore learns from a particular contrast: documents with an observed provision hidden from view versus documents where that provision was not observed. This gives a clear supervised objective. It also means that the negative label is derived from absence, rather than from an independent expert decision that the type would be inappropriate.

The classification network is described as having 7 fully connected layers, with ReLU activations and dropout of 0.3. It uses binary cross-entropy loss and the Adam optimizer. Training uses batches of 64 for 5000 epochs. The authors try learning rates of 1e − 5, 5e − 6, 1e − 6, and 5e − 7, retain the checkpoint with the highest validation accuracy, and report performance on held-out test data. The appendix gives roughly 150 minutes of training for each clause type.

Training a separate classifier makes specialization explicit. It also creates an extension cost: a newly supported clause category requires another classifier. The authors later contrast this with similarity-based relevance prediction, which can operate over an expanded collection without the same per-category training procedure.

#### Representing the requested type

After a type is judged relevant, the content stage needs a representation of what the system is supposed to produce. The authors encode clauses belonging to the target type and average their `[CLS]` embeddings. They call this result `trgt_cls_rep`.

This type representation is different from the contract representation. The contract vector summarizes the surrounding document. The target vector summarizes the kind of provision being requested. Averaging them creates the input representation for clause generation.

The distinction is useful because a broad contract summary may not strongly express the details associated with the missing category. The target representation supplies that category information directly. However, it is still an aggregate over examples of the type, not a set of explicit requirements for the new clause.

The description refers to clauses of the target type in the dataset when constructing this representation. It does not clearly delimit that statement to the training partition. That leaves an evaluation detail unresolved: the construction and scope of the type-level pool are important for understanding how strictly all representation-building steps respect the held-out split.

#### Generating clause content

The generator uses an encoder–decoder [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), following the architecture introduced in [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/) and an approach to using pretrained encoders associated with Liu and Lapata. ContractBERT initializes the encoder, while the decoder is trained to produce the removed clause.

The encoder is not trained again for this generation task. The authors rely on its previous adaptation to contracts and train the decoder using the combined contract-and-type representation. This separates representation learning from learning how to express the target content.

The decoder has 3 layers and a hidden dimension of 768. Its dropout is 0.1. The authors train it with a constant learning rate of 1e − 05, batches of 16, and 300 epochs. The appendix specifies a validation split of 0.2 and a held-out test evaluation.

Before generation training, the clause text is normalized by removing punctuation, single-letter words, and repeated spaces. The authors then use NLTK’s word tokenizer. The output vocabulary contains 7185 tokens. Generation has a maximum length of 400 when the start and end markers are included, and clauses longer than 398 tokens are discarded.

These settings define the actual output problem. The decoder is not evaluated on unrestricted original contract text. It generates within a fixed vocabulary and length bound after normalization. This matters when interpreting the qualitative examples and when considering how such output might be used in an authoring interface.

The generation route produces a single recommended clause. Retrieval, by contrast, can return several alternatives. That difference affects how users could inspect recommendations, although the paper’s quantitative retrieval evaluation considers the highest-scoring retrieved clause.

#### Collaborative filtering as a relevance baseline

The collaborative-filtering baseline treats contracts as the entities receiving recommendations and clause types as the recommended items. It constructs a matrix with an entry of 1 when a contract contains a type and 0 otherwise. Recommendations then follow patterns of co-occurrence.

The paper gives an adjusted-cosine similarity calculation. Reading the displayed terms literally, its structure is:

```
sim(i, j) = Σᵤ∈U [(r(u,i) − r̄ᵤ)(r(u,j) − r̄ⱼ)] / [√Σᵤ∈U r(u,i)² · √Σᵤ∈U r(u,j)²]
```

Here `sim(i, j)` measures similarity between clause types `i` and `j`. `U` is the contract collection, and `u` identifies a contract. `r(u,i)` and `r(u,j)` are entries in the contract–type matrix. The overbarred quantities are mean terms used in centering.

The displayed notation is not fully consistent: it uses different mean subscripts in the numerator and leaves the squared denominator terms uncentered. The prose identifies the intended procedure as adjusted cosine similarity, but does not explain these differences. The conceptual role is clear—estimate which types tend to occur together—but the equation should not be silently replaced by a more familiar variant.

The next equation uses those similarities to score a target type:

```
score(u, t) = [Σⱼ∈I sim(t, j)(r(u,j) − r̄ⱼ) + r̄ₜ] / [Σⱼ∈I sim(t, j)]
```

Here `score(u, t)` is the recommendation score for target type `t` in contract `u`. `I` denotes the clause types being considered, `j` indexes another type, and `sim(t, j)` supplies its similarity weight. `r̄ⱼ` and `r̄ₜ` are the mean terms for the corresponding types. This rendering follows the displayed arrangement of the equation; the paper gives no further derivation resolving its notation.

A sufficiently high score leads to a recommendation only if the target type is currently absent. The threshold is selected experimentally. This baseline uses occurrence structure instead of the actual wording of the surrounding contract.

#### Document similarity and clause retrieval

The document-similarity baseline starts from a different hypothesis: contracts that resemble one another may contain similar sets of clause types. It compares the input contract representation with representations of training contracts and examines the closest documents. If a target type occurs among those neighbors but is absent from the input, the method recommends it.

For content retrieval, the system restricts candidates to clauses of the target type. It then ranks them by cosine similarity. One setting uses only `ct_rep` as the query representation. The other uses the average of `ct_rep` and `trgt_cls_rep`.

This comparison isolates a practical design choice: whether the retrieval query should express only the surrounding agreement or should also include a representation of the desired category. Both settings preserve existing clause text. Their main uncertainty is selection—whether the retrieved provision fits this particular agreement.

### Experiments and results

#### Data and task construction

LEDGAR contains 12,608 clause types and 846,274 clauses drawn from around 60,000 contracts. The source documents are material contracts from the SEC filings website, including shareholder and employment agreements. These figures describe the broader collection, not the size of each constructed relevance or generation dataset.

The authors create a separate proxy relevance task for a target type. Contracts containing that type contribute positive examples after its clause is removed. An equal number of contracts without the type contribute negative examples. Generation uses the positive subset: the remaining contract and target type form the input, and the removed clause is the reference output.

The proxy datasets are partitioned into training, validation, and test portions of 60%, 20%, and 20%. The paper does not report the resulting example counts for each evaluated clause type. That omission limits how precisely a reader can assess the amount of supervision behind an individual result.

For relevance prediction, the metrics are precision, recall, accuracy, and F1. Precision concerns the reliability of positive recommendations; recall concerns recovery of the positive examples. Accuracy includes both positive and negative decisions. F1 combines precision and recall into a single measure, making it useful for observing how the methods balance their different tendencies.

Content recommendation is evaluated with [ROUGE](https://md.research.elamur.ai/free/en/papers/lin-2004-rouge-package-automatic-evaluation-summaries/). The reported variants are ROUGE-1, ROUGE-2, and ROUGE-L, abbreviated R-1, R-2, and R-L. These measure forms of textual overlap with the removed clause. The qualitative appendix identifies its individual example scores as ROUGE-1 F-scores.

#### Relevance prediction has no universal winner

The classification approach performs strongly, but the detailed results matter. For Governing Laws, its precision is 0.6898, recall is 0.7535, accuracy is 0.7082, and F1 is 0.7203. Document similarity has higher precision and accuracy on that type, while collaborative filtering has higher recall.

Governing Laws relevance prediction, held-out test F1 Binary classification achieves the strongest balance of precision and recall among these methods.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Collaborative filtering | 0.6843 |
| Document similarity | 0.6957 |
| Binary classification (this paper) | 0.7203 |

Severability provides a clearer result for classification across most reported metrics. Its precision is 0.7654, accuracy is 0.7790, and F1 is 0.7843. Collaborative filtering nonetheless retains the highest recall, at 0.9091. This illustrates why a method can recover many relevant cases without being the strongest overall recommender.

Notices is the important counterexample to a simple claim that classification always wins. Document similarity records precision of 0.7825, accuracy of 0.7640, and F1 of 0.7530. The classifier’s corresponding results are 0.6850, 0.7079, and 0.7208. Collaborative filtering again has the highest recall, at 0.8810.

For Counterparts, classification records precision of 0.7784, recall of 0.8259, accuracy of 0.7961, and F1 of 0.8014. Collaborative filtering reaches recall of 0.8899 but has weaker precision and F1. On Entire Agreements, classification obtains F1 of 0.7804, while document similarity has the strongest precision, 0.9006, and accuracy, 0.7953.

Across the reported types, the authors characterize classification as strongest on average in F1. They also emphasize that document similarity is competitive and simpler to extend. The results therefore describe a tradeoff between predictive behavior and deployment requirements, instead of showing that every other relevance method is uniformly inferior.

Collaborative filtering’s recurring pattern is high recall with lower precision. The authors connect this to its reliance on whether clause types occur together. It can recognize a common structural association without reading the current contract’s content. That makes it a useful baseline for distinguishing frequent composition patterns from context-sensitive recommendations.

#### Generation leads the reported content comparisons

For every evaluated clause type, retrieval improves when its query includes the target-type representation. Generation then achieves the highest reported result on each of the content metrics. The ordering is consistent across the evaluated categories, even though their absolute scores differ.

Governing Laws content recommendation, held-out test ROUGE-L Adding target-type information improves retrieval, while generation obtains the strongest reported overlap.

**The numbers**

| System or setting | ROUGE-L |
| --- | --- |
| Retrieval with contract context | 0.327 |
| Retrieval with context and type | 0.399 |
| ClauseRec generation (this paper) | 0.506 |

Severability has ROUGE-1 of 0.419 for context-only retrieval, 0.444 for retrieval with type information, and 0.521 for generation. Its ROUGE-2 values follow the same ordering: 0.142, 0.155, and 0.264. These comparisons support the value of representing the requested category and then training directly against the missing-clause objective.

For Notices, ROUGE-1 is 0.341 with context-only retrieval, 0.430 with type-aware retrieval, and 0.514 with generation. ROUGE-L is 0.207, 0.309, and 0.422 respectively. This is distinct from the relevance result for Notices, where document similarity has the strongest F1. The stages therefore favor different methods under their respective metrics.

Counterparts produces particularly strong generation scores in the reported table: ROUGE-1 is 0.666, ROUGE-2 is 0.495, and ROUGE-L is 0.667. Those figures concern reconstruction of the held-out clause text, not a separate assessment of whether the generated provision is legally acceptable.

Counterparts content recommendation, held-out test ROUGE-2 Generation recovers more reference wording than either retrieval setting under the reported metric.

**The numbers**

| System or setting | ROUGE-2 |
| --- | --- |
| Retrieval with contract context | 0.214 |
| Retrieval with context and type | 0.279 |
| ClauseRec generation (this paper) | 0.495 |

Entire Agreements follows the same content-recommendation ordering. Its ROUGE-L is 0.306 for context-only retrieval, 0.331 for type-aware retrieval, and 0.485 for generation. The corresponding ROUGE-1 scores are 0.433, 0.474, and 0.535.

The authors interpret the generation results as evidence that learning the missing-clause task is useful. Retrieval depends on similarity heuristics, whereas generation is trained against the particular provision removed from each contract. That is a plausible account of the observed ranking, but the comparison does not establish that generation is superior on every criterion relevant to drafting.

#### What the qualitative examples add

The Governing Laws example makes contextual specificity concrete. The reference concerns Delaware law. The retrieved clause instead concerns Illinois and also adds jurisdiction-related language. The generated clause uses Delaware and more closely resembles the reference’s central content. Its ROUGE-1 is 0.718, compared with 0.456 for the retrieved example.

The Notices comparison shows a subtler issue. Both recommendations concern written notice, but they differ in delivery methods and how recipients are described. Generation obtains ROUGE-1 of 0.640, while retrieval obtains 0.588. The better score supports greater overlap with the reference, but it does not verify that every notification route and recipient specification has been preserved.

The Severability example is especially revealing because the generated text contains repeated material and visibly malformed words. Its ROUGE-1 is nevertheless 0.504, compared with 0.396 for retrieval. A reader can therefore see a limitation of overlap-based evaluation directly in the paper’s own examples: recovering many reference-like phrases can coexist with output that plainly needs correction.

The Entire Agreements example raises a related content question. The generated provision includes other transaction documents, while the reference contains a more particular statement involving obligations toward third parties. Generation scores 0.626 and retrieval 0.435 on ROUGE-1. The numerical advantage does not establish that these provisions have equivalent contractual effect.

### What the ablations show

The paper offers useful controlled comparisons, but it does not present a complete component-by-component ablation of ClauseRec. Its strongest direct comparison within a method concerns the information used for retrieval. Other analyses compare whole approaches or illustrate representation behavior.

Adding the target-type representation improves retrieval across the evaluated categories and metrics. This supports a narrow conclusion: an averaged representation of the requested clause category provides useful information beyond the surrounding contract vector in this experimental setup. It does not show that averaging is the best way to combine those signals, because alternative combination mechanisms are not compared.

The relevance baselines test different sources of evidence. Collaborative filtering uses clause-type occurrence patterns. Document similarity uses representations of neighboring contracts. Binary classification learns a type-specific boundary from contract representations. Their results show that structural co-occurrence can recover many positives while producing more false recommendations, whereas textual approaches often provide a stronger balance.

This is informative, but it is not a tightly controlled substitution of a single architectural component. The approaches differ in training, retained data, decision rules, and how they use context. As a consequence, their performance differences cannot all be assigned to one representational choice.

The ContractBERT visualizations provide another form of analysis. The authors use the clause clusters to argue that contract-specific adaptation improves separation between types. However, they do not report downstream comparisons that independently remove the label-related task or the same-clause task. The figures therefore support the intended behavior qualitatively without identifying the contribution of each added objective.

Hyper-parameter selection is described in the appendix. The authors try different learning rates for classification and different thresholds for collaborative filtering. They retain settings using validation results. The final implementation table gives type-specific thresholds of 0.27 for Governing Law, 0.18 for Counterparts, 0.15 for Notices, 0.20 for Entire Agreements, and 0.13 for Severability.

There is an unresolved reporting inconsistency around document neighbors. The main discussion and appendix say that document similarity was tested with neighbor counts of 1 and 5. The implementation table nonetheless includes 2 and 3 among the selected values. Without an additional explanation, the exact search procedure behind those entries cannot be reconstructed confidently.

The qualitative appendix is best understood as error analysis instead of an ablation. It illustrates where retrieval picks content of the correct broad category but with inappropriate details, and where generation fits the reference more closely while producing problematic language. These examples strengthen the interpretation of the metrics by showing what the numerical comparisons can overlook.

Several potentially informative controls are absent from the reported results. There is no comparison against a type-only generator, no test with shuffled contract context, and no separate measurement of how much contract averaging contributes relative to other summaries. Such controls would help distinguish contextual reconstruction from production of a familiar clause template. Their absence does not invalidate the reported ranking, but it narrows the explanation of why the generator succeeds.

### Limitations

#### Limits the authors identify

The authors explicitly state that their content evaluation concentrates on relevance as measured through ROUGE. They do not present this as a complete solution to factuality. Their future-work discussion calls for balancing contextual suitability with the faithfulness of recommended clauses.

They also recognize a practical attraction of retrieval. Because retrieval returns existing wording, it may appear safer than generation, which can alter vocabulary or introduce noise. Yet they caution that retrieval can still select a clause poorly matched to the current agreement. The distinction is important: preserving a source provision and choosing the right source provision are separate requirements.

Generated clauses exhibit limited linguistic variation. The authors relate this to the repetitive nature of contractual language and regard that repetition as an opportunity for further work. The observation is not presented as evidence that all generated clauses are interchangeable or that variation is unnecessary. It describes a tendency of the outputs in their study.

The relevance methods also have acknowledged operational limits. Classification needs a new trained classifier for each additional clause type. Document similarity is easier to extend but depends on having enough suitable comparison contracts. Retaining that collection creates storage costs, and the neighbor-count setting affects performance.

The authors further note that document similarity lacks a satisfactory mechanism for ranking the types suggested through neighboring contracts. A classifier supplies scores that can order types, whereas the baseline’s occurrence-based recommendation rule does not provide the same direct ranking behavior. This matters when an assistant needs to prioritize a limited set of suggestions.

#### Limits implied by the task construction

A clause’s occurrence in an existing contract is evidence about that document, not an independent judgment that the clause was necessary. Conversely, a type’s absence does not establish irrelevance. The proxy labels are useful for supervised learning, but they simplify the drafting decision the authors ultimately want to assist.

A contract classified as negative might omit a useful provision. A positive example might contain wording that a different drafter would revise or remove. The paper does not collect expert relevance judgments that resolve these cases. Its conclusions should therefore remain attached to the reconstruction task instead of being interpreted as a direct measurement of legal need.

The negative examples are balanced against the positives by construction. That provides a clear experimental comparison, but the paper does not establish the prevalence of genuinely useful missing-clause suggestions during ordinary authoring. The relationship between reported precision and the burden of reviewing suggestions in practice remains unknown.

The evaluations also concern separate stages. The generation dataset is built from contracts known to contain the removed target clause. The paper does not report a single end-to-end outcome that combines incorrect relevance decisions, missed relevant types, and the quality of all resulting content. Strong generation scores therefore do not on their own determine the usefulness of the complete pipeline.

#### Limits of the reported evaluation

ROUGE rewards overlap with a particular reference. In this task, the reference is the clause removed from the source contract. The metric does not directly evaluate whether a recommendation preserves obligations, exceptions, scope, or relationships between provisions.

The paper’s qualitative examples make this limitation tangible. A generated clause can receive a better score while containing corrupted wording. A retrieved clause can be grammatically intact yet specify the wrong jurisdiction. Neither behavior is adequately summarized by saying that a recommendation is simply good or bad according to one overlap value.

The use of a single removed provision as the reference also leaves alternatives underexplored. Another clause might be acceptable for the drafting purpose while sharing less wording with the original. Conversely, a highly similar clause might change a decisive detail. The paper does not include expert judgments to determine how often either situation occurs.

No uncertainty intervals or significance tests accompany the main results. Some rankings are consistent across types, especially for content generation, but the tables do not quantify sampling uncertainty. The absence of per-type example counts further limits interpretation of the stability of individual comparisons.

The broader collection is highly repetitive, as the authors emphasize. The paper does not report an evaluation designed to separate familiar contractual wording from substantially different formulations. It also does not describe a split that explicitly controls for similarity between related documents. A careful reader therefore cannot infer performance on unfamiliar drafting patterns from the reported scores alone.

The study does not report a user evaluation of assisted authoring. There is no measured reduction in drafting time, no assessment of the effort required to repair suggestions, and no observed rate of professional acceptance. Those would address practical questions beyond the reconstruction experiments.

#### Limits of representation and reproducibility

Averaging clause embeddings is a compact way to represent long agreements, but it gives no explicit prominence to a decisive exception or unusual provision. The paper does not investigate whether information from less common clauses is diluted by the aggregate. Nor does it test document-order representations or dedicated cross-clause consistency mechanisms.

The target-type vector similarly averages examples belonging to a category. This can represent common characteristics, but the reported setup does not establish how well it preserves uncommon variants within that category. Low output variation may be consistent with reliance on frequent patterns, although the paper does not isolate that mechanism experimentally.

Preprocessing removes punctuation and single-letter words. The study does not measure the semantic consequences of those transformations. Its generation results therefore apply to the normalized task as implemented, while the suitability of those transformations for complete drafting remains unverified.

Length and vocabulary restrictions further constrain coverage. Clauses exceeding 398 tokens are excluded, and the decoder uses the stated fixed vocabulary. The paper does not report how the excluded material differs from the retained examples or how often an unrestricted authoring task would need content outside those bounds.

Several implementation details remain insufficiently specified for a fully unambiguous reconstruction. The mathematical notation for collaborative filtering is inconsistent, the neighbor-count descriptions conflict with the implementation table, and the scope of the target-type representation pool is not clearly restricted. The continued pretraining collection is described by size, but its overlap with evaluation material is not established.

These are limits on what the results demonstrate, rather than reasons to dismiss the central contribution. The paper defines a concrete recommendation task, supplies comparative evidence, and exposes a meaningful distinction between recovering a plausible missing provision and establishing that its wording is trustworthy.

### What came after

The paper closes with a research direction rather than evidence of a completed successor system. The authors want future clause recommenders to account for factuality as well as relevance. Their discussion also points toward representations that capture more of the substance of contractual language while making use of its repeated patterns.

No later citing work is available in the record accompanying this account, so there is no supported basis for attributing subsequent methods, results, or adoption to ClauseRec. Its demonstrated contribution remains the staged relevance-and-content formulation and the experiments reported for that formulation.

The unresolved question it leaves is clear. A drafting assistant must do more than recover wording that resembles a hidden reference. It must connect the requested provision to the particular agreement and preserve the details that make the recommendation suitable. ClauseRec provides an initial experimental framework for studying that problem, while its own results show why relevance, textual overlap, and trustworthy drafting require distinct forms of evidence.

## Cite

Cite as Vinay Aggarwal, Aparna Garimella, Balaji Vasan Srinivasan, Anandhavelu N and Rajiv Jain. 2021. ClauseRec: A Clause Recommendation Framework for AI-aided Contract Authoring. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.

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

```bibtex
@inproceedings{aggarwal2021clauserec,
  title = {{ClauseRec: A Clause Recommendation Framework for AI-aided Contract Authoring}},
  author = {Vinay Aggarwal, Aparna Garimella, Balaji Vasan Srinivasan, Anandhavelu N and Rajiv Jain},
  booktitle = {Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.691},
  url = {https://doi.org/10.18653/v1/2021.emnlp-main.691}
}
```

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