arXiv:2608.05060cs.SEcs.AI2026-08

用Transformer自动修复结构化文件,保留原内容并提升修复成功率。

RepairFormer: Automated Repair of Structured Inputs Using Transformers

论文配图:RepairFormer: Automated Repair of Structured Inputs Using Transformers
图 1 · 摘自论文原文
  • 将修复任务转为序列生成,通过格式标签和边界定位精准修复错误区域。
  • 修复成功率达88%,内容保留率94%,比现有方法快5倍。
  • 适合处理配置文件、数据文件等因小错导致解析失败的场景。

JSON、DOT、OBJ、INI、S-expression、TinyC等结构化输入文件广泛用于软件系统,但微小损坏即可导致解析器拒绝有效数据。修复这些文件至关重要,因为错误的配置、程序或数据文件会中断测试、分析、部署及下游自动化流程,即使大部分原始内容仍完整。现有修复技术虽能生成结构合法的输入,但常依赖删除或重复搜索,易丢失原始内容并导致语义错误。本文提出RepairFormer,一种基于Transformer的结构化输入修复框架。该方法将修复视为监督序列生成任务,利用格式标签、真值验证和边界局部化修复,在保留内容的同时生成有效输出。边界工作流聚焦于检测到的故障区域,减少输入规模,支持长文件修复。评估显示,RepairFormer修复成功率达88%,内容恢复率达94%,在修复成功时表现出最强的内容保留能力。额外实验表明,在自建基准上,RepairFormer修复率达97.57%,恢复率达94.29%,运行速度比现有最优方法快5倍。

原文摘要 · Abstract (English)

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.

结构化修复Transformer内容保留自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。