Elamur Research

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

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

Summary

A contract-writing assistant faces a selection problem before it faces a writing problem. It must decide whether an agreement could benefit from a particular provision, then suggest language suited to that agreement. ClauseRec investigates this distinction within legal AI. Instead of attempting to write a complete contract, the authors work with an existing document and consider a clause category that is not currently represented. Their proposed pipeline first estimates whether that category belongs in the document. A positive decision activates a second stage that recommends its content.

The architecture builds on BERT, adapted through additional training on contracts. The resulting encoder, ContractBERT, learns from ordinary BERT objectives and from exercises involving clause labels and clause membership. Because agreements exceed the length that can conveniently be encoded together, the system processes individual provisions and averages their representations. A category-specific classifier uses this document representation to predict relevance. For content production, a decoder receives information summarizing both the agreement and the requested clause category. The alternatives include recommendations based on category co-occurrence, recommendations based on neighboring contracts, and retrieval of existing provisions.

The experiments turn completed agreements into artificial drafting situations. Using LEDGAR, the authors hide an existing provision and test whether its category can be recognized as relevant and its wording recovered. Contracts without that category supply negative examples for relevance prediction. The categories reported include Entire Agreements, Counterparts, Notices, Severability, and Governing Laws. Classification obtains the leading F1 score for most categories, while document similarity leads on Notices. Collaborative filtering finds the largest proportion of positive cases throughout, but its suggestions are less precise.

Generation has the highest reported ROUGE results across the evaluated clause categories. For Governing Laws, ROUGE-L is 0.327 when retrieval uses document context, 0.399 when retrieval also incorporates category information, and 0.506 for generation. These comparisons favor learning to reconstruct the hidden provision over selecting an existing clause through the tested similarity rules. They also show that representing the requested category helps retrieval. The evidence concerns similarity to the removed text, however, rather than professional acceptance or legal correctness.

That distinction is central to interpreting ClauseRec. The authors acknowledge that a retrieved provision preserves established wording but can belong to the wrong contractual situation. A generated provision can better match the reference yet introduce damaged language, repetition, or different details. Their examples display both kinds of failure. ClauseRec therefore contributes a concrete formulation and an experimental starting point for assisted authoring, while leaving factual fidelity, contractual consistency, and practical drafting value substantially unresolved.

Interesting ideas

Make the admission decision explicit. An assistant should establish why a proposed addition belongs before spending effort expressing it. ClauseRec exposes this decision as a separate prediction instead of treating every request as permission to produce content. The pattern extends to document completion, maintenance suggestions, and knowledge-base enrichment, where a plausible addition may still be redundant or inappropriate.

Teach representations about functional boundaries. The additional training exercises connect clause text with its category and distinguish sentences sharing a provision. They exploit the document’s organization rather than relying completely on generic language training. Other applications can ask equivalent questions about procedures, definitions, requirements, or evidence passages, making representation learning reflect the units the application actually manipulates.

Create supervision through controlled removal. A completed document contains components that can be hidden to produce reconstruction examples. This makes existing collections useful without requiring records of every editing decision. The approach is attractive for structured writing and information completion, provided the evaluation remains explicit about its target: recovering an observed component does not establish that the component was necessary.

Express both context and requested function. A document summary identifies the surrounding situation, while a category representation identifies the kind of material sought. ClauseRec’s retrieval comparison shows why these signals should be tested together. The same distinction matters when searching for an exception rather than a definition, an example instead of a rule, or a method rather than a result.

Contrast structural regularities with content-sensitive evidence. Category co-occurrence, document neighborhoods, and learned classification offer different explanations for a recommendation. Comparing them reveals whether success comes from familiar document patterns or sensitivity to the present text. This is useful wherever repeated structure can provide a strong shortcut, including technical documentation and organized reference collections.

Keep textual resemblance separate from trustworthiness. The reported generation advantage is an advantage under reference-overlap measures. It does not settle whether a proposed provision preserves every important detail. Systems that recommend consequential text benefit from separate checks for relevance, source support, well-formedness, and consistency, even when one aggregate metric improves.

Treat operational costs as part of method selection. A specialized classifier, a searchable document collection, and a generator require different resources and extension procedures. The paper’s discussion makes these tradeoffs visible alongside predictive results. A reusable evaluation should ask what must be trained, stored, and maintained when the supported categories expand.

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

ClauseRec explores contract drafting through missing-clause prediction, contract-specific representations, retrieval, and generation. · about 35 minutes to read

How Mova uses it

Mova is a transparent language system written in Rust, with native parsing, explicit rules, statistical components, document worlds, and bounded worker operations. The correspondences below concern possible transfers from ClauseRec’s design and evaluation. They do not establish a ClauseRec implementation within Mova. Status marks indicate how closely a proposal matches documented mechanisms; they are provisional, and any new benefit remains unmeasured.

Idea: Require a reason to add content. Where: Section 2.1 and Figure 1. Area: task admission. Mova: частково є (tools/octopus capability resolution and the operational contract in docs/hybrid-system.md). Mova already resolves supported requests before running configured handlers. A further predicate could establish whether a proposed lesson element, dictionary addition, or explanation is needed. Why Mova: this would make necessity inspectable before a worker prepares an addition.

Idea: Represent functional document units. Where: Methodology, the additional ContractBERT objectives. Area: document structure. Mova: частково є (prag frames, world state, and the shared graph in world/src/knowledge/retention/mice.rs). A logical transfer could attach typed roles and sentence membership to document components rather than reproduce the neural training procedure. Why Mova: distinguishing a definition, condition, example, and exception could improve how evidence is reused.

Idea: Evaluate completion by hiding a component. Where: Section 3, Data. Area: evaluation design. Mova: нове. A candidate assessment could remove an explanatory link or document component, then ask Mova to identify its function and reconstruct it from allowed evidence. This specific protocol is not established by the digest; novelty remains provisional. Why Mova: it could test structural understanding separately from answering questions whose supporting content remains visible.

Idea: Include the requested role in retrieval. Where: Section 2.2 and the retrieval description in Section 3. Area: evidence retrieval. Mova: частково є (tools/dictindex queries using observed tags, frames, and reviewed selectors). A comparison could hold the source collection constant while adding an explicit requested role to the query. Why Mova: the experiment could reveal whether a worker retrieves the right kind of evidence rather than merely related vocabulary.

Idea: Compare co-occurrence against interpreted content. Where: Section 3, collaborative filtering and document similarity. Area: statistical baselines. Mova: частково є (tools/dictindex occurrence counts, contextual features, and source strata). Mova could compare component co-occurrence with frame-based reasoning on identical recommendation items. Why Mova: a structural baseline would show how much apparent understanding follows common document patterns.

Idea: Give overlap and support separate outcomes. Where: Section 4, discussion of relevance and factuality. Area: evaluation semantics. Mova: вже є (tools/enrich source checks and staging; reviewed admission boundaries described in tools/dictindex). Mova distinguishes a prepared draft from admitted knowledge. ClauseRec supplies a useful test case for that distinction: an answer can resemble an expected answer while containing unsupported details. Why Mova: independent outcomes preserve evidence quality when a resemblance score rises.

Idea: Compare methods together with maintenance costs. Where: Section 4, classification versus document similarity. Area: operational evaluation. Mova: частково є (pack, tools/dictindex, configured handlers, and layers routing). A benchmark could report retained evidence, category-specific maintenance, and decision quality together. Why Mova: the preferred mechanism may change as dictionaries, domains, and supported operations grow.

Idea: State absence as a precondition. Where: Section 2.1 and the relevance baselines in Section 3. Area: duplication control. Mova: вже є (closed/admitted exclusions and dictionary-preservation rules in the Nautilus handoff described by tools/dictindex). ClauseRec considers categories not already present. Mova can retain the corresponding distinction between proposing missing material and revising existing material. Why Mova: an explicit precondition makes duplicate suppression understandable.

Idea: Preserve the difference between absence and rejection. Where: Section 3, negative-example sampling. Area: data semantics. Mova: вже є (gap reporting in docs/architecture.md, missing-context outcomes in docs/hybrid-system.md, and missing-coverage reporting in tools/dictindex). ClauseRec’s negatives illustrate how an unobserved component can be treated as unwanted. Why Mova: retaining separate states prevents missing evidence from becoming an unjustified negative conclusion.

Idea: Keep source components behind a compact summary. Where: Section 2.1, clause-vector averaging. Area: knowledge representation. Mova: частково є (world entities and events; retained document graphs in world/src/knowledge/retention/mice.rs). Mova could maintain a cheap document overview whose entries retain links to individual observations. Why Mova: a decisive exception would remain recoverable when an aggregate description obscures it.

Idea: Separate generic category knowledge from current context. Where: Section 2.2, the contract and target-type representations. Area: contextual reasoning. Mova: вже є (global, domain, and context distinctions in docs/architecture.md). ClauseRec combines information about the requested category with the current agreement. Mova’s logical counterpart should retain the provenance of each contribution. Why Mova: category knowledge should guide interpretation without silently replacing document-specific evidence.

Idea: Test sensitivity to meaningful context changes. Where: Section 2.2 and the qualitative comparisons in Appendix C. Area: controlled evaluation. Mova: частково є (school controls and the fresh-text versus prepared-graph comparison in world/src/knowledge/retention/fastread.rs). A proposed control would preserve the requested role while changing a relevant participant, condition, or state. Why Mova: an unchanged answer could expose reliance on a generic pattern.

Idea: Separate candidate availability from selection quality. Where: Section 2.2 and Section 4’s highest-similarity retrieval evaluation. Area: retrieval analysis. Mova: частково є (tools/dictindex proposals, examples, and reviewed selectors). Mova could retain the candidate set, the chosen evidence, and the selection reason as distinct records. Why Mova: this distinguishes failure to find usable evidence from failure to select it.

Idea: Inspect each category before claiming general improvement. Where: Tables 1 and 2. Area: statistical reporting. Mova: вже є (field-specific reliability in prag/src/eval.rs and relation-level analysis in peta/tools/treeagree/src/kappa.rs). ClauseRec’s category rankings vary for relevance prediction. Why Mova: detailed reporting can reveal a local regression hidden by a favorable overall result.

Idea: Record the objective behind every threshold. Where: Section 2.1, Section 3, and Appendix B.1. Area: calibration. Mova: частково є (layers threshold logs and confidence analysis in prag/src/eval.rs). A threshold record could identify the validation criterion and the errors accepted at that operating point. Why Mova: a numerical cutoff would carry an explanation rather than appear to define certainty.

Idea: Separate specialization from extension capacity. Where: Section 4’s comparison of relevance methods. Area: architecture. Mova: частково є (configured capabilities in tools/octopus and domain registration in layers). Dedicated rules and shared retrieval could be compared as the supported vocabulary expands. Why Mova: this would identify categories that need special treatment without assuming every category requires a new mechanism.

Idea: Audit normalization for semantic loss. Where: Appendix B.2. Area: text processing. Mova: частково є (en/src/tok.rs and original-sentence preservation in tools/dictindex). ClauseRec removes punctuation and single-letter words before generation. Mova could evaluate each normalization against distinctions needed by its parser and rules. Why Mova: source-preserving processing makes harmful information loss diagnosable.

Idea: Attach results to the processed population. Where: Appendix B.2, length filtering. Area: coverage accounting. Mova: вже є (bounded import and coverage reports in tools/dictindex; packet bounds in tools/enrich). ClauseRec excludes long clauses, so its results concern the retained material. Why Mova: explicit coverage prevents success on a manageable subset from implying universal handling.

Idea: Make malformed output an independent failure category. Where: Appendix C, especially the Severability comparison. Area: error analysis. Mova: частково є (tools/enrich validation and retained worker outcomes in docs/hybrid-system.md). A proposal could separately record broken syntax, damaged tokens, unsupported entities, and omitted conditions. Why Mova: numerical improvement should not hide an unusable individual result.

Idea: Check local recommendations against document commitments. Where: Section 2.2 and Appendix C’s Governing Laws example. Area: logical consistency. Mova: частково є (world predicates and justification mechanisms in docs/architecture.md). A proposed check could compare a recommendation’s entities and conditions against the existing document world. ClauseRec does not implement this logical checker. Why Mova: correct category selection alone cannot rule out incompatible content.

Idea: Measure repetition as evidence and as a shortcut. Where: Introduction and Section 4. Area: corpus analysis. Mova: частково є (occurrence-level records and source-domain features in tools/dictindex). Mova could distinguish support from repeated formulas from support spanning genuinely different contexts. Why Mova: abundant copies of a common construction should not imply broad comprehension.

Idea: Keep a visible cluster provisional. Where: Figures 2 and 3. Area: interpretation of statistical structure. Mova: вже є (tools/dictindex statistical selectors requiring reviewed labels). ClauseRec’s plots suggest improved category grouping without isolating every cause. Why Mova: the same restraint prevents an attractive grouping of word occurrences from becoming an admitted sense without review.

Idea: Evaluate stages jointly as well as separately. Where: Figure 1 and Section 3’s separate proxy tasks. Area: pipeline evaluation. Mova: частково є (explicit transitions and bounded nested outcomes in docs/hybrid-system.md). A proposed report could follow a request from admission through evidence selection and final acceptance. Why Mova: successful downstream behavior on ideal inputs does not reveal losses introduced upstream.

Idea: Distinguish ordering signals from calibrated probabilities. Where: Section 4, ranking clause types using classifier scores. Area: decision interpretation. Mova: частково є (prag/src/eval.rs confidence-versus-correctness analysis). A score may help prioritize work without supporting an absolute probability claim. Why Mova: this distinction allows useful ranking while preserving honest uncertainty.

Idea: Track every representation’s construction pool. Where: Section 2.2, averaging examples of the target category. Area: provenance and evaluation isolation. Mova: вже є (source/version constraints in tools/dictindex and fingerprint checks in tools/enrich). Any aggregate used during evaluation should identify the material from which it was prepared. Why Mova: a derived summary can cross an assessment boundary even when raw labels are not directly read.

Idea: Test a familiar template against contextual completion. Where: Section 4’s low-variation observation and Appendix C. Area: negative controls. Mova: частково є (assessment controls and deterministic comparison practices in docs/architecture.md). A proposed category-only baseline could reveal how much performance is available without reading the current document. Why Mova: a logical reader should demonstrate when context changes its conclusion.

Idea: Keep output proposals distinct from learned knowledge. Where: Section 4’s unresolved factuality discussion. Area: learning admission. Mova: вже є (tools/enrich draft staging, reviewed dictionary admission, and evidential handling in prag/src/frames.rs). ClauseRec demonstrates why produced content needs a separate trust decision. Why Mova: a worker’s successful completion must not automatically promote its words into native knowledge.

The problem and its context

Contract writing as document-level choice

The paper approaches contracts as organized collections of provisions, each serving part of an agreement between parties. Authoring such a document involves more than selecting fluent sentences. The writer must choose which functions the document needs, find suitable language for those functions, and adjust that language to the circumstances.

The authors describe a process beginning with a template. That template supplies a skeletal arrangement of provisions, which the drafter customizes through additions, deletions, and revisions. Domain knowledge matters throughout: a common provision can be irrelevant in one document, while an agreement assembled from a familiar template may still omit something useful.

Clause recommendation targets the addition part of this process. The system receives an agreement already containing material and considers what else might fit. This differs from finding a generic sample clause by name. The surrounding document should affect the answer, because clauses sharing a category can express different details.

The category–content distinction is therefore functional. A label indicates what kind of provision is under consideration. The associated text determines what the provision actually says. The label Governing Laws does not uniquely identify a jurisdiction. Notices does not fix the permitted delivery methods. Entire Agreements does not specify which related documents should be included in the agreement’s scope.

An effective assistant must handle both levels. Recommending a useful category with inappropriate content is a failure. Producing a reasonable clause for a category the agreement does not need is another failure. ClauseRec makes those possibilities visible through its staged formulation.

Why general recommendation is insufficient

The authors place their contribution within natural language processing, but argue that contracts have properties requiring particular attention. Their introduction emphasizes repeated wording and extensive resemblance between sentences, drawing on Simonson and colleagues’ study of repetition.

Repetition offers a substantial resource. Many provisions follow recognizable patterns, so a collection of existing agreements can provide repeated examples of a contractual function. Yet the same property complicates evaluation: passages may share much of their language while disagreeing on the detail that matters.

The paper discusses recommendation research outside legal writing. Wang and Fu reformulate a BERT sentence-pair objective around purchase prediction for e-commerce. Malkiel and colleagues use textual item descriptions in RecoBERT for wine and fashion recommendations. These studies motivate using text-sensitive representations in recommendation systems.

The authors also cite Bhagavatula and colleagues’ content-based citation recommendations for academic drafts. That setting resembles ClauseRec in its connection to a document under composition. A system examines existing text and suggests something to add without depending on metadata.

Nonetheless, recommending a contract provision requires a particular relationship between candidate text and document context. An item description can help establish similarity between products. A clause recommendation must also fit the language and content of an agreement. The paper argues that straightforward transfer from these other recommendation settings is insufficient.

These earlier works establish the background as the authors present it. They do not constitute evidence that a particular legal authoring workflow has already been solved. ClauseRec’s contribution is to formulate and investigate a contract-specific version of recommendation.

The role of the existing document

The document supplies both evidence and constraints. It indicates the kind of agreement being assembled and contains provisions whose meanings may matter to any addition. ClauseRec summarizes that information through learned representations rather than explicit contractual rules.

This choice makes context available in a computationally manageable form. It does not give the system a symbolic account of every obligation or exception. The relevance predictor and generator must use whatever distinctions survive the representation procedure.

The practical ambition is assistance, while the experimental formulation is reconstruction. The authors do not have a dataset recording unfinished drafts, expert decisions about missing provisions, and subsequently approved edits. Instead, they begin from agreements that already exist.

Their solution is to hide a component and treat it as a target. This provides a reproducible task with observable answers. It also changes the interpretation of relevance: the experimental positive means that the hidden category occurred in the source document, instead of that an independent reviewer determined it was legally necessary.

That is a reasonable research approximation when labeled authoring decisions are unavailable. Its value depends on keeping the approximation visible. ClauseRec can show that systems recover observed structure and wording; additional evidence would be needed to establish that the same decisions improve live drafting.

The method, step by step

Organize the input around provisions

The basic input unit is a clause with an associated category label. A contract contains several such units. ClauseRec uses this organization throughout representation learning, relevance prediction, and content recommendation.

Contracts commonly exceed 512 tokens, according to the paper. The architecture therefore avoids passing an entire agreement through BERT as one sequence. It obtains a contextual representation for each constituent clause, then combines the clause summaries.

The central generation route follows this sequence:

ClauseRec’s relevance-and-generation route

The steps in order.

ClauseRec’s relevance-and-generation routeStep 1: Divide the agreement into labeled provisions1. Divide the agreement into labeled provisionsStep 2: Encode each provision with ContractBERT2. Encode each provision with ContractBERTStep 3: Pool provision summaries into document context3. Pool provision summaries into document contextStep 4: Assess an absent category’s relevance4. Assess an absent category’s relevanceStep 5: Add information representing the requested category5. Add information representing the requested categoryStep 6: Decode a candidate provision6. Decode a candidate provision

The alternatives retain the same broad task boundaries but change the evidence used for relevance or replace generation with retrieval.

Learn contract-sensitive representations

ContractBERT begins with BERT and continues training on contractual material. Appendix B reports a crawled collection containing 250k contracts. The authors continue optimization until the training losses converge.

The adaptation retains masked-language training and next-sentence prediction. Masked-language training asks the encoder to infer hidden words from their surroundings. The additional objectives supply information more directly related to contractual organization.

One added exercise connects the words in a category label with a clause. Its purpose is to associate category information with the content expressing that category. The other asks whether sentences belong within a common provision. Its purpose is to reinforce clause-level coherence.

These tasks supply different kinds of supervision. Label-related training encourages distinctions between contractual functions. Membership-related training encourages recognition of which sentences form a unit. Neither directly asks whether a particular provision should be added to a particular agreement.

That separation matters. ContractBERT is the representation component; the later classifier learns the relevance decision. The architecture does not claim that recognizing a clause category is itself sufficient to determine drafting need.

Figures 2 and 3 visualize clause representations before and after adaptation. The authors interpret them as showing clearer category grouping with ContractBERT. These plots communicate the intended representational effect, but they are not a quantified isolation of the added objectives.

Pool clauses into a document representation

For each clause, the system extracts the vector associated with BERT’s special [CLS] position. That vector acts as the clause summary. An arithmetic average over the summaries becomes ct_rep, the document representation.

This pooling allows documents with differing clause counts to produce inputs of a common size. The classifier receives a 768 dimensional representation, as specified in the implementation details.

Pooling also limits what is represented explicitly. The architecture does not describe a separate encoding of clause order. It does not store named logical connections between a provision and an exception elsewhere. Such information may influence the individual vectors, but it is not maintained as an inspectable relation.

The choice is economical and straightforward. It allows the same encoder to serve documents of different lengths without introducing a full-document architecture. Whether that economy loses decisive information is an empirical question the paper does not separately investigate.

Construct relevance examples

Relevance prediction is learned separately for each target category. To create a positive example, the authors select a contract containing the target category and remove its corresponding clause. The remaining agreement is presented as a document for which that category is relevant.

Negative examples come from contracts lacking the category. The authors randomly select an equal number of these documents, producing balanced relevant and not-relevant classes.

This procedure creates supervised examples without requiring a lawyer to label every omission. It also embeds an assumption: observed inclusion supplies a positive target, while observed absence supplies a negative target.

The assumption should not be confused with an independent legal judgment. A document may omit something useful, and a provision already present may be unnecessary. Those possibilities do not prevent the proxy task from being useful, but they determine what its labels establish.

Train a category-specific relevance classifier

The classifier consumes ct_rep and returns a score between [0, 1]. A score above 0.5 counts as a positive decision in the main description.

Appendix B.1 specifies a network containing 7 fully connected layers, using ReLU activations and dropout of 0.3. Training uses binary cross-entropy, which penalizes confident predictions inconsistent with the binary training label. Adam is the optimizer.

Batches contain 64 examples, and training runs for 5000 epochs. The tested learning-rate list is [1e − 5, 5e − 6, 1e − 6, 5e − 7]. The retained checkpoint is the one with the highest validation accuracy. The reported test results come from held-out material rather than the validation set used for that choice.

The authors report roughly 150 minutes of training per category. This highlights an architectural tradeoff: each category receives a dedicated decision function, but adding categories requires more training.

The selected learning rates vary by target in Table 3. The table associates Governing Law with 5e − 07, Counterparts with 1e − 06, Notices with 5e − 06, Entire Agreements with 1e − 05, and Severability with 1e − 06. These are tuning settings, not comparisons demonstrating that one rate is generally preferable.

Build the requested-category representation

Content production requires the system to know which function it should express. ClauseRec obtains this signal from examples belonging to the requested category.

The authors encode those clauses with ContractBERT and average their [CLS] vectors. They name the resulting category summary trgt_cls_rep. Averaging that vector with ct_rep produces the representation supplied to the decoder.

The document summary and category summary have complementary roles. The former describes the agreement around the gap. The latter describes the broad kind of provision expected to occupy it.

This is a coarse conditioning mechanism. It supplies an aggregate category signal rather than a detailed list of obligations or required fields. It also does not explicitly identify which source example contributes a particular detail to the generated text.

The paper refers to the category’s clauses in the dataset when describing this pool. It does not clearly state in that passage whether every construction step is restricted to training material. A precise account of the pool’s provenance would be important for replication and evaluation isolation.

Decode the missing text

Clause generation follows an encoder–decoder design associated with Attention Is All You Need. The paper also follows Liu and Lapata’s use of pretrained encoders. ContractBERT supplies the encoder component, while training teaches the decoder to produce the hidden provision.

The encoder is not retrained for this stage. The authors rely on its existing contract adaptation and train the decoder using the combined input representation.

The transformer decoder has 3 layers. Its hidden dimension is 768, matching the input representation, and dropout is 0.1. Training uses batches of 16 for 300 epochs with a fixed learning rate of 1e − 05. Appendix B.2 states a validation split of 0.2 and reports evaluation on held-out test material.

Before tokenization, preprocessing removes punctuation, single-letter words, and redundant spaces. The authors then apply NLTK’s word tokenizer. The output vocabulary contains 7185 tokens.

The generation limit is 400 tokens including <SOS> and <EOS>, the markers for sequence beginning and ending. Clauses containing more than 398 tokens are excluded. These restrictions determine the population and output form addressed by the generation experiments.

The decoder recommends a single clause. This differs from retrieval, which can expose several existing alternatives. The paper’s metric comparison evaluates the highest-similarity retrieval result, so it does not fully evaluate the possible value of browsing a candidate set.

Use category co-occurrence as an alternative

The collaborative-filtering baseline ignores clause wording when predicting relevance. It treats contracts as the recipients of recommendations and clause categories as items.

Its matrix has an entry of 1 when a contract includes a category and 0 otherwise. Similarity between category columns estimates which categories tend to occur together.

The paper displays the following adjusted-cosine expression:

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

Here i and j identify clause categories, while u identifies a contract in collection U. The matrix entry r(u,i) records whether contract u contains category i; r(u,j) has the corresponding meaning for j. The barred terms indicate means. sim(i, j) is the resulting similarity.

The notation deserves caution. The numerator uses mean terms with different subscripts, while the denominator contains uncentered squared entries. The prose does not explain these choices fully. The expression should therefore be understood as the paper’s displayed specification, with a notation ambiguity, rather than silently replaced with another adjusted-cosine definition.

The target-category score is displayed as:

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

In this expression, t is the category being considered for contract u. I denotes the category collection, j indexes its members, and sim(t, j) weights evidence from category j. The entry r(u,j) records its occurrence. The quantities r̄ⱼ and r̄ₜ are the corresponding mean terms. score(u, t) is compared with a threshold.

The displayed equation’s mean placement is not further derived in the prose. That limits certainty about the intended implementation. The operational idea is nevertheless clear: evidence from related categories produces a target score, and a sufficiently high score recommends an absent category.

Find neighboring agreements

Document similarity offers a content-sensitive relevance baseline without a dedicated classifier. It compares ct_rep with representations of training contracts using cosine similarity.

The method examines the nearest contracts. If any selected neighbor contains the target category and the input does not, it recommends that category.

This rule expresses a simple hypothesis: similar agreements frequently have similar component inventories. Its behavior depends on the available comparison collection and the number of neighbors examined.

The prose describes experiments using neighbor counts of 1 and 5. Table 3 includes selected counts of 2 and 3 as well. That inconsistency prevents an entirely unambiguous reconstruction of the search settings from the descriptions alone.

Retrieve content instead of generating it

The content-retrieval alternatives search within the requested category. They compare each candidate clause vector with a query vector and select by cosine similarity.

The basic setting uses the document representation alone. The enhanced setting averages document and category representations before performing the comparison.

Restricting the candidate pool establishes the category. Adding the category vector can still help because it changes the query’s position relative to individual candidates. The experiment asks whether that additional signal selects wording closer to the removed provision.

Retrieval preserves the selected source text. It does not guarantee that the text belongs in the current agreement. The main source of error shifts from inventing wording to choosing the wrong existing wording.

Experiments and results

What the collection contains

LEDGAR supplies the contractual material used to construct the downstream tasks. The paper reports 12,608 categories and 846,274 clauses associated with around 60,000 contracts.

The agreements come from SEC filings and include material contracts identified as Exhibit-10. The examples of document kinds include employment and shareholder agreements. These collection-wide figures should not be read as the number of examples used for every reported category.

The downstream evaluation focuses on selected clause categories rather than reporting performance over the complete category inventory. For each target, the authors construct a relevance dataset and a reconstruction dataset.

The relevance dataset includes hidden-clause positives and equally numerous absence-based negatives. The reconstruction dataset uses contracts from which a target clause was removed. Its reference answer is the removed text.

The partition proportions are 60% for training, 20% for validation, and 20% for testing. Per-category example counts are not supplied in the main experimental account. Accordingly, the tables establish comparative results without showing the precise support size behind every row.

What the metrics mean

Relevance prediction is assessed through precision, recall, accuracy, and F1. Precision concerns how often a positive recommendation corresponds to a positive proxy label. Recall concerns how much of the positive proxy set the method recovers.

Accuracy considers both relevant and not-relevant labels. F1 summarizes the balance between precision and recall. These measures answer related but different questions, making it possible for a method to lead on recall while trailing on recommendation precision.

Content quality is measured using ROUGE. ROUGE-1 concerns individual-word overlap, ROUGE-2 concerns adjacent-word overlap, and ROUGE-L uses subsequence-based resemblance. Table 2 abbreviates them as R-1, R-2, and R-L.

The reference is the original hidden provision. A favorable score means that the recommendation resembles that reference under the selected measure. It is not an expert judgment about enforceability, completeness, or suitability.

The appendix’s qualitative scores are explicitly identified as ROUGE-1 F-scores. Those examples help connect the aggregate measures to actual differences in recommended content.

Relevance results by category

For Governing Laws, collaborative filtering has precision of 0.5889, recall of 0.8166, and accuracy of 0.6243. The binary classifier records precision of 0.6898, recall of 0.7535, and accuracy of 0.7082. Document similarity is more precise, at 0.7882, but has recall of 0.6225.

Governing Laws, proxy relevance test F1

The classifier gives the strongest reported precision–recall balance for this category.

Governing Laws, proxy relevance test F1Category collaborative filtering: 0.6843Category collaborative filtering0.6843Similar-contract relevance: 0.6957Similar-contract relevance0.6957ClauseRec classifier (this paper): 0.7203ClauseRec classifier (this paper)0.7203
The numbers
System or settingF1
Category collaborative filtering0.6843
Similar-contract relevance0.6957
ClauseRec classifier (this paper)0.7203

The category illustrates why precision and recall must remain visible. Document similarity has accuracy of 0.7276, exceeding the classifier’s accuracy, even though its F1 is lower. Different application priorities could therefore favor different operating behaviors.

Severability favors classification more broadly. The classifier’s precision is 0.7654, recall is 0.8042, accuracy is 0.7790, and F1 is 0.7843. The document-similarity baseline records F1 of 0.7635. Collaborative filtering records F1 of 0.7509 and recall of 0.9091.

Notices reverses the main F1 ranking. Document similarity reaches precision of 0.7825, recall of 0.7257, accuracy of 0.7640, and F1 of 0.7530. Classification records precision of 0.6850, recall of 0.7605, accuracy of 0.7079, and F1 of 0.7208.

Collaborative filtering again has the highest Notices recall, 0.8810, but precision is 0.5533. Its F1 is 0.6797. This is a useful reminder that recovering many hidden clauses is compatible with making many additional positive recommendations.

Counterparts gives the classifier precision of 0.7784, recall of 0.8259, accuracy of 0.7961, and F1 of 0.8014. Document similarity records F1 of 0.7635, while collaborative filtering records 0.7262. The latter retains the recall lead at 0.8899.

For Entire Agreements, classification achieves precision of 0.7480, recall of 0.8158, accuracy of 0.7713, and F1 of 0.7804. Document similarity is especially precise, at 0.9006, and its accuracy is 0.7953. Its recall is 0.6623 and F1 is 0.7633.

Across these results, the authors characterize binary classification as strongest on average in F1. They do not claim that it wins every category or metric. Notices favors document similarity on F1, and the similarity approach leads some precision and accuracy comparisons elsewhere.

Collaborative filtering’s consistent recall advantage accompanies weaker precision. The authors associate this with its lack of textual context. It recognizes categories that commonly accompany the observed category inventory, but cannot inspect the wording that might make such a suggestion inappropriate.

Content results and the role of category information

The content comparisons have a consistent ordering. Retrieval using both document and category information improves on retrieval using document information alone. Generation then produces the highest values under the reported ROUGE measures.

Governing Laws, reconstructed-clause test ROUGE-L

Category-aware retrieval improves the match, and generation leads the reported comparison.

Governing Laws, reconstructed-clause test ROUGE-LRetrieval from document representation: 0.327Retrieval from document representation0.327Retrieval from document and category: 0.399Retrieval from document and category0.399ClauseRec generation (this paper): 0.506ClauseRec generation (this paper)0.506
The numbers
System or settingROUGE-L
Retrieval from document representation0.327
Retrieval from document and category0.399
ClauseRec generation (this paper)0.506

For Governing Laws, the ROUGE-1 values are 0.441 for document-only retrieval, 0.499 for category-aware retrieval, and 0.567 for generation. ROUGE-2 follows the same ordering with 0.213, 0.280, and 0.395.

Severability records ROUGE-L of 0.269, 0.288, and 0.432 across those settings. Its ROUGE-1 values are 0.419, 0.444, and 0.521; its ROUGE-2 values are 0.142, 0.155, and 0.264.

Notices also benefits from the category signal. Document-only retrieval has ROUGE-L of 0.207, category-aware retrieval has 0.309, and generation has 0.422. The ROUGE-1 results are 0.341, 0.430, and 0.514, respectively.

These Notices results should be kept separate from the relevance ranking. A method that identifies whether the category belongs need not be the method that reconstructs its wording most successfully. The paper evaluates different decisions at these stages.

Counterparts, reconstructed-clause test ROUGE-2

The trained generator has the strongest adjacent-word overlap with the hidden provision.

Counterparts, reconstructed-clause test ROUGE-2Retrieval from document representation: 0.214Retrieval from document representation0.214Retrieval from document and category: 0.279Retrieval from document and category0.279ClauseRec generation (this paper): 0.495ClauseRec generation (this paper)0.495
The numbers
System or settingROUGE-2
Retrieval from document representation0.214
Retrieval from document and category0.279
ClauseRec generation (this paper)0.495

Counterparts generation also achieves ROUGE-1 of 0.666 and ROUGE-L of 0.667. Category-aware retrieval has ROUGE-1 of 0.530 and ROUGE-L of 0.474. The document-only setting has 0.466 and 0.406 for those measures.

Entire Agreements continues the ordering. Its ROUGE-1 results are 0.433, 0.474, and 0.535. ROUGE-2 is 0.183, 0.201, and 0.312. ROUGE-L is 0.306, 0.331, and 0.485.

The authors explain the generation advantage in part through alignment with the training task. The decoder is optimized to recover the specific provision removed from a contract. Retrieval instead uses a similarity rule to choose among existing alternatives.

That explanation is plausible within the experiment, but the methods differ in more than their output mechanism. The comparison does not isolate a universal benefit of generating language. It establishes an advantage for this trained generator against these retrieval configurations under reference-overlap evaluation.

The examples reveal different failure mechanisms

The Governing Laws comparison provides a clear contextual contrast. The reference uses Delaware, while the retrieved provision uses Illinois and includes additional court-jurisdiction material. The generated recommendation names Delaware and is closer to the reference’s main formulation.

The example’s ROUGE-1 values are 0.456 for retrieval and 0.718 for generation. This supports the narrower observation that the generated text better matches the hidden provision in this case. It does not validate every possible legal consequence of either clause.

The Notices example involves methods of delivery and descriptions of recipients. Retrieval introduces options such as courier and facsimile communication. Generation is closer in several phrases but still changes details about where notice goes and how the executive’s address is identified.

Its scores are 0.588 for retrieval and 0.640 for generation. The comparison shows why a recommendation can improve in overlap while leaving practical questions about omitted or changed instructions.

The Severability example is more visibly problematic. The generated clause repeats wording and contains damaged word forms. It nevertheless receives ROUGE-1 of 0.504, while the retrieved provision receives 0.396.

The point is not that ROUGE fails to detect every issue it was designed to measure. It measures textual resemblance. The example demonstrates that resemblance and usable drafting language are different outcomes.

The Counterparts outputs mostly share the broad function of allowing separately executed copies to form an agreement. They differ in supporting wording about signatures and electronic transmission. Generation receives 0.603 compared with retrieval’s 0.427 on the example’s ROUGE-1 measure.

For Entire Agreements, the generated text refers to transaction documents beyond the agreement. The reference includes a particular statement about obligations involving third parties. The scores are 0.626 for generation and 0.435 for retrieval.

Taken together, these examples make the aggregate results more interpretable. Retrieval can select polished material whose details belong elsewhere. Generation can recover common reference language while omitting, altering, or damaging content. Neither mechanism’s main risk is captured fully by whether its category is correct.

What the ablations show

The clearest within-method comparison

The paper’s most direct controlled content comparison changes the retrieval query. The candidate category and general selection procedure remain, while the query either uses document context alone or combines it with category information.

The category-aware variant improves every reported content comparison. This supports the usefulness of an explicit category signal within the tested representation scheme.

It does not establish that arithmetic averaging is optimal. The authors do not compare alternative weighting, concatenation, or learned combination strategies. The evidence favors including the signal, while leaving its best integration unresolved.

The comparison is also narrower than proving deep contextual understanding. A category summary can steer the query towards standard category language. Further controls would be needed to determine how much of the improvement depends on particulars of the agreement.

Comparing sources of relevance evidence

The relevance experiments contrast occurrence structure, similarity neighborhoods, and supervised decision boundaries. These comparisons show how different evidence sources affect precision and recall.

Collaborative filtering’s recall lead indicates that category associations recover many positives under the constructed task. Its lower precision suggests that associations alone are too broad for selective recommendation.

Document similarity makes the language representation relevant without learning a separate classifier for each category. Its competitive results show that a neighborhood rule can be a serious alternative, especially where extension simplicity matters.

Classification generally improves the precision–recall balance, but this result should not be assigned entirely to contract-specific representations. The approaches differ in their decision procedures, supervision, and dependence on the retained collection.

These are comparisons of complete methods, not a pure substitution experiment holding every other component fixed. They explain operational tendencies more securely than they identify a single causal ingredient.

What representation plots establish

The ContractBERT figures suggest that continued contract training produces embeddings more aligned with category distinctions. The authors use them to motivate the adaptation.

The paper does not report a downstream ablation removing the label-related objective while retaining the other additions. Nor does it separately remove the clause-membership objective.

As a result, the figures cannot determine which added task contributes most to relevance or generation results. They also cannot establish that visually separated categories yield reliable recommendations in every contractual context.

A careful interpretation is that the representation analysis is supportive and qualitative. The downstream tables evaluate the full adapted approach, while the contribution of each training ingredient remains unresolved.

Tuning evidence and reporting gaps

Appendix B.1 describes learning-rate selection for the classifiers and threshold selection for collaborative filtering. The reported settings are chosen using validation behavior, which separates tuning from the final held-out comparison.

Table 3 lists category-specific collaborative-filtering thresholds. These are 0.27 for Governing Law, 0.18 for Counterparts, 0.15 for Notices, 0.20 for Entire Agreements, and 0.13 for Severability.

The table establishes the chosen operating settings, but it does not provide a complete performance curve across thresholds. Readers therefore cannot inspect the full precision–recall tradeoff or identify how stable the selected point is.

The neighbor-count inconsistency also remains. The written search description mentions 1 and 5, whereas the selected-setting table contains additional values. This is a reproducibility issue rather than evidence favoring any particular neighbor count.

Controls that would answer remaining questions

The reported experiments do not include a generator conditioned only on the target category. Such a comparison would help establish how much reconstruction quality requires document context rather than familiar category wording.

There is no reported context-shuffling control. Replacing the surrounding agreement while preserving the target category would test whether the generator responds to the correct document.

The authors also do not compare alternative document pooling procedures. Averaging may be sufficient for common patterns, but its effect on rare or decisive clauses is not measured separately.

These missing controls do not erase the reported improvements. They limit the explanation that can be attached to them. The paper demonstrates successful reconstruction relative to its baselines, while leaving the relative roles of template familiarity, category conditioning, and particular document information incompletely separated.

Limitations

What the authors explicitly acknowledge

The authors distinguish relevance from factuality. Their main content evaluation uses ROUGE, and their future-work discussion calls for better handling of both concerns.

They recognize why retrieval may be regarded as safer. It preserves an existing provision rather than constructing new wording. This can avoid some noise and vocabulary changes introduced by generation.

They also explain why retrieval is insufficient. Similarity can select language that belongs to the requested category but is inappropriate for the present agreement. Preserved wording is not automatically contextually suitable wording.

Generation exhibits limited variation within categories. The authors relate this to the repeated character of contract language. They see repetition as an opportunity, while acknowledging the need to capture the details that remain important within repeated patterns.

The relevance alternatives have practical costs. A category-specific classifier requires additional training when coverage expands. Document similarity needs a sufficiently useful collection of comparison contracts and can incur substantial storage requirements.

The authors also note that the document-similarity rule does not provide the same direct relevance ranking as classifier scores. This affects how suggestions can be prioritized rather than simply declared present or absent.

The proxy labels narrow the claim

A careful reader should distinguish historical occurrence from drafting necessity. A provision found in an agreement gives an observable reconstruction target, but does not prove that the provision was indispensable.

Similarly, absence does not prove that a category would be inappropriate. The negative class is constructed from documents where the category was not observed, not from expert judgments rejecting it.

This distinction is particularly important for an authoring assistant. The practical purpose is to identify useful omissions, including omissions that an existing document may already contain. An evaluation that treats all observed absences as negative cannot directly validate that broader capability.

Balanced sampling creates another boundary. The experimental class distribution is designed for comparison. The paper does not measure how often useful missing-category suggestions arise during ordinary drafting.

Accordingly, the reported precision cannot on its own establish the number of suggestions a professional would need to inspect before finding one worth using. That practical review burden is outside the reported study.

Component results are not an end-to-end user outcome

The content task starts from examples where the removed category is known. It does not include every consequence of the relevance stage.

A real pipeline can miss a useful category, activate generation for an unsuitable category, or correctly identify a category but produce poor content. The separate results do not combine these possibilities into a single authoring outcome.

The paper does not report a professional user study. It measures neither time saved nor editing effort after a suggestion. Acceptance rates, correction costs, and effects on completed agreements remain unknown.

The results therefore support the feasibility of the research formulation, rather than a demonstrated improvement in contractual work.

Overlap does not verify contractual meaning

ROUGE compares a candidate with a reference through textual relationships. It does not directly check whether a changed party, jurisdiction, condition, or exception preserves the intended agreement.

The paper’s examples reveal this gap without requiring an external hypothetical. The retrieved governing-law provision changes jurisdiction. The generated Severability provision contains damaged language. Both failures involve properties outside a simple category decision.

A reference-based metric also has difficulty representing legitimate alternatives. A different clause could meet a drafting need without closely matching the original. Conversely, familiar language can surround a consequential alteration.

The study does not supply expert judgments to determine the frequency of those cases. It therefore cannot translate its overlap advantage into a quantified legal-quality advantage.

The authors’ use of relevance for the content task should be read in this experimental sense. It means better correspondence with the hidden provision under the chosen measures, instead of a complete account of appropriateness.

Repetition may help more than context does

The introduction and discussion emphasize repeated contractual language. That is part of the opportunity, but also a possible shortcut.

A generator producing a common formulation for each category could recover considerable wording even without representing the current agreement precisely. The absence of a category-only baseline leaves this possibility insufficiently quantified.

The low-variation observation is compatible with reliance on frequent formulations, but does not prove it. The paper does not isolate the cause of that behavior.

Nor does it report a split specifically designed to separate closely related agreement wording. The experiment should not be interpreted as a test on unfamiliar drafting styles or structurally novel contracts.

This is a limit of generalization evidence. The reported test results remain meaningful for their constructed data, while performance on substantially different material is unknown.

Aggregation can conceal decisive details

The contract vector averages clause summaries. This removes an explicit representation of clause order and gives each contribution the same pooling treatment.

A rare exception may matter more to the recommendation than several ordinary provisions. The paper does not test whether such information survives aggregation reliably.

The target-category vector also averages examples. It can represent common properties while obscuring distinctions among variants. The architecture does not separately encode which variant a particular agreement requires.

These observations are architectural concerns, not measured failures established by the paper. The reported study does not compare pooling against representations designed to preserve special conditions or cross-clause relations.

There is also no explicit logical consistency checker. The generator is conditioned on document information, but conditioning is not equivalent to verifying every proposed commitment against the rest of the agreement.

Preprocessing and filtering restrict the task

Removing punctuation and single-letter words simplifies the generation data. The paper does not measure what meaning these operations discard.

The relevant concern is not that normalization must always be harmful. It is that the experiment evaluates normalized outputs, while practical drafting may require distinctions represented in the original form.

The fixed vocabulary and length exclusion further delimit coverage. Clauses longer than 398 tokens do not enter the generation task, and the paper does not quantify how the excluded population differs from the retained one.

It also does not report performance by clause length or structural complexity. As a consequence, success on the retained material cannot establish comparable behavior for longer or more intricate provisions.

Statistical and specification uncertainty remain

The main tables do not include confidence intervals or significance tests. Their rankings are observable, but the paper does not quantify uncertainty around them.

Per-category sample counts are also absent from the reported experimental description. This makes it harder to assess the stability of individual category comparisons.

The continued-training collection is described by its size, but its relationship to downstream evaluation material is not fully specified. The category-summary construction pool likewise needs clearer boundaries.

The collaborative-filtering notation contains ambiguities, and the neighbor-count descriptions conflict. These issues affect exact reproducibility even though the broad procedures are understandable.

A restrained conclusion is therefore appropriate. ClauseRec demonstrates that a staged contract-completion task can be learned and that its generator improves the reported reconstruction measures. It does not establish unrestricted drafting reliability, legal validation, or a complete explanation of which architectural ingredients produce the advantage.

What came after

The authors’ own closing direction is to improve the balance between contextual relevance and factual fidelity. Their discussion points towards recommendations that exploit repeated legal language while preserving the distinctions that matter within it.

No later citing work is identified for discussion, so a supported account cannot attribute a successor architecture, later benchmark result, or adoption claim to ClauseRec. The research trajectory visible here is the one the authors leave open.

That trajectory has a concrete experimental foundation. ClauseRec separates category admission from wording production, constructs authoring-like tasks from completed agreements, and compares structural, similarity-based, and generative approaches. Its examples also show why progress requires more than increasing reference overlap.

The remaining challenge is to connect a proposed provision to the particular agreement with enough precision to preserve its consequential details. ClauseRec makes that challenge measurable in an initial reconstruction setting, while leaving trustworthy use in drafting to further 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

@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}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/aggarwal-2021-clauserec-clause-recommendation-framework-ai/