Research 4 min read

Notwithstanding anything to the contrary: mapping hierarchy in nested conditionals

How we train our contract models to resolve conflicting 'notwithstanding' and 'subject to' clauses without losing the transaction's underlying logic.

2026 · 10 · 29·admin

The phrase “notwithstanding anything to the contrary contained herein” is the drafting equivalent of a master key. Lawyers use it to ensure a specific obligation survives the rest of the document. It is a blunt instrument, designed to cut through ambiguity by asserting absolute supremacy.

The problem arises when multiple clauses claim this same absolute supremacy. Across the 2.4 million contracts processed by ZAAN to date, the average enterprise Master Services Agreement (MSA) contains 14 distinct “notwithstanding” clauses and 22 “subject to” modifiers. In 8% of these agreements, we observe a structural failure: two global overrides collide, or a circular dependency is created where Clause A is subject to Clause B, which is subject to Clause C, which states it applies notwithstanding Clause A.

Standard natural language processing struggles with this. A general-purpose model reads a contract for semantic proximity or sentiment. It sees related words and assumes a relationship. But conditional legal logic is not a matter of semantic similarity. It is a strict boolean hierarchy. When we began training ZAAN-7B Counsel, we had to teach the model to stop reading these phrases as text and start reading them as executable logic.

Mapping the dependency tree

A contract is a set of instructions. To evaluate those instructions, ZAAN-7B Counsel converts the text into a dependency graph. Nodes are obligations or rights. Edges are the conditions that connect them.

We classify conditional edges into three categories. “Subject to” implies subordination; the current node yields to the target node. “Provided that” introduces a condition precedent; the current node cannot activate unless the target condition is met. “Notwithstanding” asserts supremacy; the current node overrides the target node.

When Review reads an agreement, it extracts these nodes and draws the edges. If Clause 8.2 states “Notwithstanding Section 7,” the model draws a one-way override edge from 8.2 to 7. This is simple enough. The complexity scales when the overrides are global rather than specific, or when they are nested within long, unbroken paragraphs.

The limitation of liability battleground

The most frequent site for nested conditionals is the limitation of liability. A standard framework places a general cap at the top. Below it sit the carve-outs, such as indemnification obligations, intellectual property infringement, or data breaches. Below those sit the carve-backs, which are exceptions to the exceptions.

Consider a typical data breach provision. The main cap is limited to the fees paid in the trailing twelve months. The data breach cap is a super-cap of three times those fees. The text might read: “Notwithstanding Section 10.1, liability for breaches of Section 4 shall not exceed the Super-Cap, provided that this exception shall not apply to the extent such breach results from the indemnified party’s gross negligence, which remains subject to the exclusions in Section 10.3.”

Mapping this manually requires a reviewer to trace references across multiple pages, holding the hierarchy in their head. Mapping it programmatically requires the model to isolate the exact scope of the override. The model must recognise that Section 10.3 (the exclusion for indirect and consequential damages) survives the override of Section 10.1 (the general cap), but only in the specific event of gross negligence. If the model misinterprets the scope of “which,” the liability analysis is entirely wrong.

Resolving circular overrides in Review

When a human reviewer encounters a broken hierarchy, they usually flag it with a marginal note asking opposing counsel to clarify. Review 4.2 attempts to do the same, but with mathematical precision.

If ZAAN-7B Counsel maps the dependency graph and detects a loop, it throws a High severity flag. We do not attempt to generate an inline redline to fix a circular override. Guessing the commercial intent behind a logical paradox is too high a risk. Instead, Review drops a comment in the Word margin that provides the trace. It lists the conflicting nodes plainly: “Circular override detected. Section 9.2 is subject to Section 11, but Section 11 applies notwithstanding Section 9.”

Similarly, if two clauses both contain the phrase “notwithstanding anything to the contrary in this Agreement,” and both attempt to govern the same specific scenario, Review flags the collision. It forces the reviewing lawyer to decide which clause actually has priority.

Drafting for strict hierarchy

The best way to handle complex conditional logic is to avoid writing it. In Draft, we enforce strict cross-referencing to prevent the accumulation of global overrides.

When a lawyer uses Draft to assemble an agreement, the deal-point form asks for the priority of obligations. If a user dictates that the confidentiality terms should survive termination, Draft does not generate a blanket “notwithstanding anything to the contrary” clause. It generates a specific, targeted override: “Notwithstanding Section 14 (Termination).”

By forcing the model to cite the exact section it intends to override, we prevent the creation of logical time bombs. The resulting text is drier, narrower, and much easier to enforce.

A contract should not require a compiler to understand its basic logic. If the instructions loop infinitely, the drafting has failed.

See it on a contract you have already reviewed.

Send us a draft your team has already redlined and we will show you what ZAAN catches, and what it misses.