Segmentation networks deployed to inspect civil infrastructure lose accuracy when their weights are corrupted, compressed for edge devices or exposed to new imaging conditions, and retraining is often impractical on site.
This paper proposes Weights2Fix, a unified and auditable framework for maintaining such networks, in which a large language model (LLM) agent edits their weights without gradients, in a sandbox that logs and replays every edit.
Weights2Fix was assessed on five tasks across eleven infrastructure, disaster and land-cover datasets.
The agent restored 73% of 131 damaged networks, against 14% for a rule-based repair, retained more accuracy than training-free quantisation and pruning in most cases and, given normalisation recalibration as a tool, was the best adaptation method in 19 of 30 cases, using a small set