Skip to content
Sprint projectMay 25, 2026LA

Spec Mutation Survival Analyzer

Guy Nutman, Nir Nutman · Team LeanLogic

Submitted to The Secure Program Synthesis Hackathon. Sprint projects are early-stage work by participants, not Apart Research publications.

An automated auditing pipeline that measures the actual strength of AI-generated formal specifications by testing how much "real work" each clause is doing.

The Problem: Formal verification is only as strong as the specification it relies on. Even with few-shot prompting, LLMs consistently generate redundant, overlapping constraints. If a spec is bloated with dead weight, the code is being verified against the wrong rules.

How It Works:

Generate: Uses Gemini 2.5 Flash to write a baseline suite of Hypothesis property tests for a specific function.

Mutate: Parses the spec's AST and surgically alters it (flipping relational operators or deleting asserts) to create broken variants.

Execute: Runs the baseline and all mutations against a suite of correct and intentionally buggy implementations.

Score: Calculates Spec Coverage. If a mutation "survives" (catches no bugs), the altered clause was redundant. If it is "killed," the clause was load-bearing.

Prompt engineering alone cannot guarantee secure program synthesis. Programmatic validation—measuring "Spec Coverage" the same way we measure code coverage—is strictly necessary to audit AI-generated constraints.

Reviews

Judging this Sprint?

Review this project

Your public critique appears on this page without your name. Your private critique is not published; only the Apart team reads it. If you agree below, we share your review with grantmaking.ai (opens in new tab) and the Transformative AI Fund so strong projects can be funded.

Not shown on this page.

Shown on this page, without your name.

Only the Apart team reads this, and funders if you agree below.

Share my name publicly on grantmaking.ai *
Share my private critique with funders *

How much would this matter for AI safety if it worked? How innovative is it? For scores of 4-5: is this actually new to the field, or replicating recent work?

Scoring guide
  1. 1Negligible. No clear problem addressed, or no meaningful novelty.
  2. 2Limited. Addresses a real problem but with a generic or well-trodden approach. Incremental at best.
  3. 3Moderate. Clear problem with a reasonable approach; some novelty in framing or method beyond routine application of existing tools.
  4. 4Significant. Important problem with an original approach, or identifies a neglected problem area. A valuable contribution others could build on.
  5. 5Exceptional. Tackles a critical AI safety problem with a genuinely novel approach, or opens a new research direction. Clear theory of change. You'd be excited to share this with researchers in the area.

How sound are methodology, implementation, and findings?

Scoring guide
  1. 1Seriously flawed. Methodology broken, results uninterpretable, or implementation doesn't work.
  2. 2Weak. Approach has significant gaps: missing validation, flawed experimental design, or incomplete implementation.
  3. 3Competent. Technically solid given the short duration. Methodology makes sense, results are interpretable, limitations acknowledged, work builds toward clear conclusions.
  4. 4Strong. Thorough methodology with convincing validation. Results clearly support conclusions. Immediately useful for future work.
  5. 5Exceptional. Ambitious scope executed rigorously. Surprising findings, novel methods, or unusually robust validation.

How clearly are work, findings, and impact potential communicated?

Scoring guide
  1. 1Incomprehensible. Cannot determine what the project is actually claiming or doing.
  2. 2Hard to follow. Key information buried, missing, or diluted by excessive length. Significant effort to extract main points.
  3. 3Clear enough. Can understand the problem, approach, and results without undue effort. Core content clearly present: problem, method, findings, limitations.
  4. 4Well presented. Easy to follow, well-structured, appropriate level of detail. Target audience would get it quickly.
  5. 5Exceptionally clear. A pleasure to read. Complex ideas made accessible. Could serve as a model for how to present this type of work.

  1. This project tackles a real problem for secure program synthesis: formal verification only helps if the specification is strong enough to rule out bad implementations. The idea of “spec coverage” is useful and intuitive. Applying mutation testing to specifications, rather than only to code or tests, is a good direction and could become a helpful diagnostic for LLM-generated specs.

    The project’s strongest point is accessibility. The metric is easy to understand: if mutating or removing a clause does not change which implementations pass, that clause was not doing useful work under the current implementation suite. This gives non-experts a concrete way to inspect specification strength. The report is also clear about the pipeline and limitations.

    The main weakness is that the current empirical setup is still fragile. The evaluation uses only 9 functions, a small fixed suite of 4 implementations per function, and a limited mutation operator set. Because survival depends heavily on which buggy implementations are included, the coverage score may reflect gaps in the implementation suite rather than true redundancy in the specification. The LLM-generated spec result is also hard to interpret: if Gemini repeatedly generated sorting specs for unrelated tasks, that may indicate a prompting/API failure rather than a deep finding about LLM specification generation.

    To strengthen the project, I would first stabilize the LLM spec-generation experiment and rerun it with multiple models and clean prompt logs. Second, expand the mutation operators to include logical connectives and quantifier-related changes. Third, use LLMs or synthesis tools to generate a broader and more adversarial implementation suite so mutation survival better reflects real specification weakness. Finally, the Lean 4 extension would make the work much more relevant to formal verification.

    Overall, this is a solid hackathon prototype with a good core idea, but the current evidence is preliminary. The concept is promising; the next step is making the metric more robust and validating it on a larger, more realistic set of formal specifications.

    Read full reviewShow less
  2. The spec coverage metric and the 67.5% hardcoded baseline are a solid and practical contribution, but the second headline finding is undercut by your own note that the LLM likely fell back to cached behavior under API quota limits. Producing a generic sorting spec for eight of nine unrelated functions reads like a broken API connection, not evidence that LLMs cannot write specs, so that result should be rerun on a stable connection before it carries weight in the abstract. Separating the reliable metric work from the shaky LLM experiment would make the paper stronger.

Cite this project

@misc{nutman2026spec,
  title = {{Spec Mutation Survival Analyzer}},
  author = {Guy Nutman and Nir Nutman},
  year = {2026},
  month = may,
  note = {Submitted to The Secure Program Synthesis Hackathon, an Apart Research Sprint},
  howpublished = {\url{https://apartresearch.com/sprints/projects/spec-mutation-survival-analyzer-hj2p}},
  url = {https://apartresearch.com/sprints/projects/spec-mutation-survival-analyzer-hj2p}
}

Build something like this at the next Sprint

AI Collusion Research Sprint · Oct 23 - 25, 2026