Autoformalization for Agda via Fine-tuning Large Language Models

dc.contributor.authorHuang, Pei
dc.contributor.departmentChalmers tekniska högskola / Institutionen för data och informationstekniksv
dc.contributor.departmentChalmers University of Technology / Department of Computer Science and Engineeringen
dc.contributor.examinerCoquand, Thierry
dc.contributor.supervisorRanta, Aarne
dc.contributor.supervisorThierry
dc.date.accessioned2026-01-09T09:58:34Z
dc.date.issued2025
dc.date.submitted
dc.description.abstractAutoformalization, translating informal mathematical statements into fully formal machine-checkable code, has recently attracted interest thanks to advances in large language models (LLMs). However, progress has been hindered by the lack of highquality parallel corpora pairing natural language with formal code, especially for less-popular systems such as Agda. We address this gap by introducing SMAD (Synthetic Multilanguage Autoformalization Dataset), a 400K 4-to-3 parallel corpus covering four formal languages (Dedukti, Agda, Coq, Lean) and three natural languages (English, French, Swedish), generated via the Informath project. We finetune the open-source Qwen2.5-7B-Instruct model on SMAD and achieve substantial gains: BLEU-4 improves from 32.90 to 76.16, and Agda syntax error rate falls from 98.43 % to under 8 %. We further explore joint training across multiple formal and natural languages, demonstrating that multilingual and multi-formal regimes yield notable improvements in low-resource Agda settings. Our work establishes the first LLM-based Agda autoformalization system and provides systematic insights into model scaling, multilinguality, and dataset construction for future research.
dc.identifier.coursecodeDATX05
dc.identifier.urihttp://hdl.handle.net/20.500.12380/310852
dc.language.isoeng
dc.setspec.uppsokTechnology
dc.subjectAutoformalization
dc.subjectMultilingual Formalization
dc.subjectFine-tuning
dc.subjectLoRA
dc.subjectLarge Language Models
dc.subjectQwen2.5-7B-Instruct
dc.subjectAgda
dc.subjectFormal Proof Assistants
dc.subjectSynthetic Multilanguage Autoformalization Dataset (SMAD)
dc.subjectGF
dc.titleAutoformalization for Agda via Fine-tuning Large Language Models
dc.type.degreeExamensarbete för masterexamensv
dc.type.degreeMaster's Thesisen
dc.type.uppsokH
local.programmeData science and AI (MPDSC), MSc

Ladda ner

Original bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
CSE 25-89 PH.pdf
Storlek:
845.19 KB
Format:
Adobe Portable Document Format

License bundle

Visar 1 - 1 av 1
Hämtar...
Bild (thumbnail)
Namn:
license.txt
Storlek:
2.35 KB
Format:
Item-specific license agreed upon to submission
Beskrivning: