RepairFormer: Automated Repair of Structured Inputs Using Transformers

📅 2026-08-05
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of repairing minimally corrupted structured input files—such as JSON or INI—that frequently fail to parse due to minor syntactic damage, a problem for which existing repair methods often sacrifice content fidelity or introduce semantic errors. To this end, the paper introduces the first Transformer-based approach for this task, proposing a format-aware supervised sequence generation framework. The method integrates oracle-driven validation with a boundary-localized repair mechanism to concentrate generation efforts on faulty regions, thereby producing high-fidelity repairs. Empirical results demonstrate that the approach achieves a 97.57% repair success rate while recovering 94.29% of original content, and it significantly enhances efficiency on long files, operating five times faster than current state-of-the-art techniques.
📝 Abstract
Structured input files such as JSON, DOT, OBJ, INI, S-expression, and TinyC are widely used in software systems, but small corruptions can cause parsers to reject otherwise useful data. Repairing such inputs is important because malformed configuration, program, and data files can interrupt testing, analysis, deployment, and downstream automation even when most of the original content remains intact. Existing repair techniques can produce structurally valid inputs, but they often rely on deletion or repeated search, which may lose original content and result in semantic incorrectness. This paper presents RepairFormer, a transformer-based framework for structured input repair. The approach formulates repair as a supervised sequence generation task and uses format tags, oracle validation, and boundary-localized repair to generate valid outputs while preserving content. The boundary workflow focuses generation on the detected fault region, reducing the input size, and supporting repair of longer files. In evaluation, RepairFormer achieves a 88% in repair and 94% in recovery, showing strongest content preservation when repairs are successful. Additional experiments on our benchmark shows RepairFormer repairs 97.57% and recovers 94.29% with 5x faster runtime compared to state of the art.
Problem

Research questions and friction points this paper is trying to address.

structured input repair
parser errors
malformed files
content preservation
software reliability
Innovation

Methods, ideas, or system contributions that make the work stand out.

RepairFormer
structured input repair
transformer-based generation
boundary-localized repair
format-aware validation