# MedLean: A Modest Step Toward Reviving Formal Medical Verification as a Safety World Model in the Era of MLLMs

> MedLean compiles four oncology guidelines into Lean rules and uses a proved verifier to check care plans without treating missing tests as negative. Across 428 synthetic cases, it eliminated high-risk releases and completed every encoded mandatory duty for both tested models.

- arXiv: https://arxiv.org/abs/2612.06157
- Authors: Zhihao Tang, Chao Li, Jun Zhao
- Published: 2026-12-04
- Topic: Alignment
- Visual carousel: https://instaxiv.com/p/2612.06157
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## A safety check must catch what the care plan leaves out

**0/300** High-risk releases per model, Main vs direct LLM

## MedLean checks the whole plan, not only proposals

**Action-only audit:** A single-claim filter inspects only actions the model proposed; an omitted mandatory scan or workup is outside that check.

**Whole-case audit:** MedLean evaluates every rule in the active guideline, so it can block unsafe actions and report mandatory duties the model left out.

An omitted required action can be a safety failure, not just an incomplete answer.

## Missing evidence stays unknown

1. **Three-valued facts**: Each standardized patient fact is confirmed present, confirmed absent, or unreported; missing is not silently treated as false.
2. **Defer, then request**: If a rule's prerequisite or exclusion is unresolved, that rule stays deferred; the verifier requests the missing check instead of guessing.
3. **Scan the whole case**: The kernel checks every rule, blocks unsafe or blind proposals, and flags approved mandatory actions omitted from the plan.

## The offline library feeds an online safety check

![Figure 2](https://cdn.instaxiv.com/figures/2612.06157/figure2.webp)

Offline, four NCCN/CSCO guidelines yield 1,861 Lean rules; Z3's full-space audit found 362 binary-default leaks. Online, MedLean's proved Lean 4 kernel checks whole plans; its verifier returns feedback for up to two revisions. (Figure 2)

## v4 Main: MedLean improves certification and duty coverage

| Method | Cert (DeepSeek/Astra) | Duty (DeepSeek/Astra) | HR rel. (DeepSeek/Astra) |
| --- | --- | --- | --- |
| Direct LLM | 0/300;23/300 | 10/127;78/127 | 161 (98);21 (21) |
| Single-Claim | 0/300;23/300 | 10/127;78/127 | 0 (0);0 (0) |
| Plain Rule | 0/300;23/300 | 8/127;49/127 | 7 (7);8 (8) |
| **MedLean** | **299/300;300/300** | **127/127;127/127** | **0 (0);0 (0)** |

_v4 Main, n=300 synthetic cases; duty n=127. DeepSeek-V4.1-Flash/GPT-6.2-Astra. Cert=pre-filter; parentheticals are blind. Whole-plan table._

## Why the binary shortcut can reduce completeness

**Plain Rule:** A missing finding can itself trigger a workup; assigning it false can remove that trigger.

**MedLean:** Three-valued facts keep that evidence unresolved, while whole-case scanning flags an approved duty absent from the draft.

Plain Rule reduced all-duty completion in five of six model-cohort comparisons; the sixth tied at zero.

## Exact gating rejected flawed plans and passed matched controls

| Method | Adverse plans leaked | Valid controls passed |
| --- | --- | --- |
| LLM-as-Judge (≥0.8) | 7/50 (14%) | 10/50 (20%) |
| Graded score (≥0.8) | 9/50 (18%) | 50/50 (100%) |
| **MedLean exact gate** | **0/50 (0%)** | **50/50 (100%)** |

_v3 stress test: 50 paired adverse plans and matched controls. Source: diagnostic benchmarks table._

## A base pass is not a referral answer

1. **Base certificate**: It rejects unsafe or blind actions, omitted approved duties, and missing or extraneous checks, but not every eligible target's status left unreported.
2. **Consultation gate**: It adds an exact status for each target: eligible, blocked, deferred, or not applicable, with no missing, extra, duplicate, or mismatched entries.
3. **Empty-plan audit**: Base certification passed 108/300 empty plans (36%); consultation certification passed 0/227 target cases (0%).

## What this prototype has not established

- **Synthetic structured cases**: All 428 cases were structured synthetic vignettes, not raw EHR notes; upstream extraction errors were outside the evaluation.
- **Narrow guideline coverage**: The library covers four 2026 lung and gastric oncology guidelines; 143 of 1,029 source records remain partial or pending.
- **No clinical validation**: No independent blinded review by board-certified oncologists was reported; guideline compliance does not establish real-patient efficacy.
- **Reward training not tested**: The study tests inference-time correction capped at two turns, not end-to-end reinforcement-learning weight updates.

Best used when: As a research prototype for structured oncology-plan audits, not a deployed or clinically validated decision-support system.

## Key takeaways

- A care plan can be unsafe through an action it proposes or a required action it omits.
- For structured cases, preserve unknown facts and check every applicable rule before release.
- Can this work with noisy records, independent oncology review, and specialties beyond the four guidelines?

## Links

- arXiv: https://arxiv.org/abs/2612.06157
- PDF: https://arxiv.org/pdf/2612.06157

## Citation

```bibtex
@article{tang2026medlean,
  title   = {MedLean: A Modest Step Toward Reviving Formal Medical Verification as a Safety World Model in the Era of MLLMs},
  author  = {Tang, Zhihao and Li, Chao and Zhao, Jun},
  journal = {arXiv preprint arXiv:2612.06157},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.06157}
}
```
