Search papers, labs, and topics across Lattice.
This paper introduces RepairFormer, a transformer-based framework designed to automate the repair of structured input files like JSON and INI, which are often corrupted and rejected by parsers. By framing the repair process as a supervised sequence generation task and employing techniques such as format tags and boundary-localized repair, the model effectively preserves original content while generating structurally valid outputs. Evaluation results demonstrate that RepairFormer achieves an impressive 88% repair rate and 94% content recovery, significantly outperforming existing methods with a 5x faster runtime.
RepairFormer repairs structured inputs with an 88% success rate while preserving 94% of the original content, revolutionizing how we handle corrupted data files.
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.