Reproduce “Formal Specifications from Natural Language” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Christopher Hahn, Frederik Schmitt, Julia J. Tillman, Niklas Metzger, Julian Siber, Bernd Finkbeiner

Pre-trained T5 language models, when fine-tuned, effectively translate natural language into formal specifications like regular expressions, First-order Logic, and Linear-time Temporal Logic. This approach achieved a new state-of-the-art for regex translation with 94.01% semantic accuracy on Regex-synthetic and demonstrated robust generalization capabilities to unseen elements and out-of-distribution instances across all formalisms.

Key insights

  • Fine-tuned pre-trained language models like T5 can effectively leverage their existing natural language understanding to generalize to complex formal specification languages.
  • General-purpose LMs can achieve competitive performance, and even set new state-of-the-art, compared to specialized architectures for natural language to formal specification translation.
  • The models exhibit robust generalization to unseen linguistic elements (e.g., new nouns, operator descriptions) and symbolic representations (e.g., new variable names), suggesting retention of natural language knowledge.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.