[Paper Review] Local Repair of Neural Networks Using Optimization
This paper proposes an optimization-based framework to repair pre-trained feed-forward neural networks by adjusting weights in a single layer using Mixed-Integer Quadratic Programming (MIQP), ensuring safety constraints are satisfied while preserving original performance. The method successfully repairs networks for safety, classification, and control tasks with minimal accuracy loss.
In this paper, we propose a framework to repair a pre-trained feed-forward neural network (NN) to satisfy a set of properties. We formulate the properties as a set of predicates that impose constraints on the output of NN over the target input domain. We define the NN repair problem as a Mixed Integer Quadratic Program (MIQP) to adjust the weights of a single layer subject to the given predicates while minimizing the original loss function over the original training domain. We demonstrate the application of our framework in bounding an affine transformation, correcting an erroneous NN in classification, and bounding the inputs of a NN controller.
Motivation & Objective
- To address the challenge of repairing neural networks that fail to satisfy safety or performance properties after deployment.
- To maintain high accuracy on the original training data while modifying only a single layer of the network.
- To provide a general, architecture-agnostic repair method applicable to feed-forward networks, unlike prior methods restricted to specific architectures.
- To enable minimal, targeted weight adjustments that satisfy user-defined output predicates over a specified input domain.
- To support applications in robotics, including safe control, classification correction, and kinematic modeling.
Proposed method
- Formulate the neural network repair problem as a Mixed-Integer Quadratic Program (MIQP), optimizing weight changes in a single layer.
- Define safety and performance constraints as predicates on the network output over a given input domain.
- Use binary variables to model neuron activation states, enabling exact modeling of ReLU nonlinearities in the MIQP formulation.
- Minimize the original training loss over the original dataset while satisfying all constraints, ensuring minimal deviation from the original model.
- Apply the MIQP solver to compute optimal weight updates that repair the network for the specified input region.
- Demonstrate the method on three robotics tasks: bounding affine transformations, correcting classification errors, and ensuring safe robot control via CBF and CLF constraints.
Experimental results
Research questions
- RQ1Can a pre-trained neural network be repaired to satisfy safety constraints without retraining from scratch?
- RQ2How can we minimize performance degradation on the original training data during the repair process?
- RQ3Can we achieve precise, local repairs using a single-layer weight adjustment while preserving global accuracy?
- RQ4What is the impact of repairing different network layers (e.g., last vs. hidden layers) on feasibility and performance?
- RQ5How effective is the MIQP-based repair framework in real-world robotics control and verification tasks?
Key findings
- The proposed MIQP-based repair framework successfully satisfies safety and performance predicates across diverse robotics applications with minimal accuracy loss.
- Repairing the last layer achieved a weight deviation of δ = 2.45 in the mobile robot control task, with trajectories fully avoiding the unsafe region.
- The repaired controller dynamically adjusted velocities near unsafe regions while converging to the original policy in safe regions, demonstrating adaptive behavior.
- The method maintained high performance on the original training data, as evidenced by preserved trajectory quality in the QP-based imitation learning setup.
- Infeasibility was observed when repairing the last layer in some cases, suggesting that hidden layer repair may be more robust in complex scenarios.
- The framework enables targeted, minimal repairs that improve safety and correctness without requiring adversarial sample retraining or full network retraining.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.