# Beyond Correctness: Attribution of Natural-Language Documentation for Formal Libraries

arXiv: https://arxiv.org/abs/2610.33094 · HTML: https://mlsanity.com/paper/2610.33094/

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 12 of its 34 references that are in the map.
- Submitted 22 Oct 2026.

## Builds on (most cited first, 12 of 12)

- [Measuring Attribution in Natural Language Generation Models](https://mlsanity.com/paper/2112.12870/) (2021)
- [Clover: Closed-Loop Verifiable Code Generation](https://mlsanity.com/paper/2310.17807/) (2023)
- [Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning](https://mlsanity.com/paper/2304.11384/) (2023)
- [Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?](https://mlsanity.com/paper/2310.01831/) (2023)
- [Deep Just-In-Time Inconsistency Detection Between Comments and Source Code](https://mlsanity.com/paper/2010.01625/) (2020)
- [VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code](https://mlsanity.com/paper/2510.06296/) (2025)
- [CASCADE: Detecting Inconsistencies between Code and Documentation with Automatic Test Generation](https://mlsanity.com/paper/2604.19400/) (2026)
- [Hipster: Integrating Theory Exploration in a Proof Assistant](https://mlsanity.com/paper/1405.3426/) (2014)
- [MutDafny: A Mutation-Based Approach to Assess Dafny Specifications](https://mlsanity.com/paper/2511.15403/) (2025)
- [Industrial-Strength Documentation for ACL2](https://mlsanity.com/paper/1406.2266/) (2014)
- [Using Mutation-Analysis to Examine an LLM's Ability to Summarize Code](https://mlsanity.com/paper/2602.17838/) (2026)
- [Natural Language-Focused Software Engineering via Code-Documentation Equivalence](https://mlsanity.com/paper/2606.22247/) (2026)

## Abstract (arXiv)

Formal languages are widely used in software engineering to specify and verify program properties. Because their mathematical notation and logic are hard to read, developers often rely on natural-language documentation to understand the functions in formal libraries. Yet a documentation statement can be provably true and still hold after the function's behavior changes. We call a statement's dependence on the function's specific behavior attribution, and we give a method to check it. We design and implement DocAuth, a documentation-generation method that uses attribution to decide what to publish and attaches to each published sentence the formal property recovered from it, together with checkable evidence. On 150 functions from the Community Books library of the ACL2 theorem prover, three large language models produce proved but non-attributable properties for about a third of the functions. DocAuth matches or exceeds the attribution rate of a mutation-based filter while delivering 37% more attributable sentences. Compared with a pipeline that checks truth alone, it raises the share of published sentences that a second model confirms as attributable from 82.9% to 94.7%. These results show that provable truth does not guarantee that documentation reflects what a function actually does. Attribution complements truth as a criterion for generating and evaluating documentation for formal libraries.
