TRANSMISSION // 2611.28881v1
Teaching small AI models to check loan rules with a solver
Source published
FormaFin trains small language models to turn loan covenants into formulas that a solver can check. Results on a constructed benchmark are promising, but the study has important limits.

Loan agreements can set detailed financial limits, and checking them means more than deciding whether a borrower is in breach: lenders may also need to calculate how close the borrower is to a limit. FormaFin explores whether an AI can translate those rules into formulas, which a solver can then use to calculate answers for specified financial figures and conditions.
The challenge: turning contract language into checks
A loan covenant is a condition a borrower must meet, such as keeping debt below a specified multiple of earnings. Lenders revisit these conditions as new financial figures arrive. A language model can read a covenant and answer questions about it, but calculating the “cushion” before a breach can be especially demanding: the system must identify the applicable rule and work out how far a figure can change before crossing its limit.
Bethel Hall and William Eiers propose a different approach in FormaFin. Rather than asking a model to answer each case directly, they train it to translate a covenant into a reusable mathematical formula. The Z3 solver evaluates that formula against specified figures, dates and conditions to calculate compliance, earnings cushion and debt capacity.
The calculation depends on the formula faithfully representing the contract. A solver’s result is conditional on the encoded rule, modeled inputs and defined domain; using a solver does not by itself establish that a contract was interpreted correctly or every real-world case is covered. FormaFin therefore includes checks on the translation as well as the calculation.
Three stages, from examples to checks
First, a teacher model translated 1,000 training clauses into formulas. The researchers filtered those outputs for technical problems, parameter grounding and consistency with the clause, with a separate model judging consistency. This left 789 teacher-generated examples for supervised fine-tuning; they were not independently verified expert annotations.
Next, the model received reinforcement-learning feedback from Z3. For an upper limit, the solver tested a formula 2% below the threshold, at the threshold and 2% above it; tests were reversed for lower limits. Relevant dates and conditions were also tested. Malformed formulas or formulas with an invalid parameter list received zero reward. A valid formula received a base reward plus partial credit according to the share of tests it passed. This provided a training signal without requiring a reference formula for every clause.
Finally, FormaFin compared formulas from separately trained models. If Z3 could prove two formulas equivalent across the researchers’ defined input domain, the formula could be used for automated checks; disagreements went to an analyst. This is a safeguard, not a guarantee: models can agree and still share a mistake.
To evaluate the approach, the authors created CovenantBench, with 143 clauses from 108 agreements and constructed compliance certificates. It contains 2,527 questions about compliance, earnings cushion and debt capacity. It tests calculations against real contract language, but the financial figures are constructed rather than records of actual borrower compliance.
Promising results, with important qualifications
On CovenantBench, the authors report 94.8% accuracy for their Qwen 7-billion-parameter FormaFin model. Across three model families, accuracy ranged from 92.6% to 96.8%. On this benchmark, the trained formalizers outperformed the larger open models tested as direct question-answering “readers,” including a 70-billion-parameter model. This is a comparison among the tested systems on this task, not a general claim that smaller models outperform larger ones. For the Qwen 7B model, earnings-cushion accuracy rose from 34.1% as a reader to 95.0% when it formalized the covenant and used the solver.
The authors also tested whether formulas could check other models’ answers. FormaFin flagged 95.6% to 99.7% of errors in the evaluated systems. Among answers it accepted, 99.0% to 99.9% were correct in this benchmark. These figures do not establish performance across all financial analyses or in live lending.
One analysis shows why testing on a finite set of examples is not enough: among formulas correct on every benchmark certificate, the solver found 50 that differed from the reference across the wider defined domain. Of those 50 differences, 47 involved applying a covenant before its effective date, a situation the benchmark certificates did not cover. Formal equivalence checks can expose such cases, but model agreement without a reference still cannot rule out shared errors.
What the study does not establish
The benchmark includes clauses for which certificates could be constructed and two models produced exactly agreeing specifications. Those references are not expert annotations, and one of the two models was the same proprietary teacher used to generate training examples. These selection requirements may favor simpler covenants. Clauses with date schedules or conditions were harder: FormaFin scored 88.8% on that subset, compared with 96.3% on the others.
The paper gives the 143 agreements’ dates as 1993–2015 and separately describes its evaluation as limited to US public-company agreements mostly from 1996–2008. The figures are constructed, not real compliance records. The study does not establish readiness for lending decisions or transfer to other financial rules. Regulatory ratios and investment mandates are proposed as possible future applications, not demonstrated results.
FormaFin is described in an arXiv preprint, so its findings should be treated as preliminary. Its central idea is narrower: separating rule interpretation from calculation may make some covenant checks easier to inspect. Whether it remains dependable across messier contracts and real financial workflows remains an open question.
- FormaFin
- financial AI
- loan covenants
- SMT solver
- reinforcement learning
- AI verification
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
VeriLogic trains AI with checkable proof paths
Shared method: Both papers train models with reinforcement learning informed by formal verification: FormaFin uses an SMT solver to reward financial-rule formulas, while VeriLogic uses Lean4 feedback on reasoning paths and proofs. The verifiers, tasks and reward designs differ, so this is a shared high-level method, not evidence that either approach works in the other setting.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2611.28881v1 — Original paper
Excerpt reference:
static/papers/2611.28881v1.md:199-284
Basis: Paper text
Source SHA-256:39259b0f9dc31288ce131348ed9617bd9e4794a9fcddfe6cfbf07e920a4240442611.29147v1 — Original paper
Excerpt reference:
static/papers/2611.29147v1.md:354-486
Basis: Paper text
Source SHA-256:3c98a2bb13f4d50c91f27970a61227c642b9d07a6b3bd0feff2248be17fdecca
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
VeriLogic trains AI with checkable proof paths
Source published
Shared keywords: ai verification, reinforcement learning
VeriCUA checks AI agents’ work by looking for evidence
Source published
Shared keywords: ai verification
A financial AI that knows when not to guess
Source published
Shared keywords: financial ai
A head-to-head safety check for AI agents that learn from experience
Source published
Shared keywords: ai verification
An AI coordinator improves answers by directing attempts, not solving problems
Source published
Shared keywords: ai verification