- Main
Provable Editing and Repair of Deep Neural Networks
- Tao, Zhe
- Advisor(s): Thakur, Aditya V.
Abstract
Deep neural networks (DNNs) are increasingly deployed in safety-critical, scientific, and user-facing applications, yet they can still exhibit incorrect or unsafe behavior after training. Ensuring that a DNN satisfies safety properties is therefore critical for trustworthy deployment. Efficient methods can verify such properties, as demonstrated by the annual DNN verification competition. However, provably editing a DNN to satisfy desired properties remains challenging. This dissertation studies provable editing of DNNs: the problem of enforcing hard constraints on DNN behavior through minimal parameter changes, with formal guarantees that the constraints hold over specified input regions. Provable editing is fundamental for repairing, constraining, and improving the trustworthiness of trained models without retraining, and it has broad applications in safety-critical systems, explainable AI, control, and scientific computing.We study four progressively expressive variants of this problem:1. Provable Pointwise Editing: We present APRNN, the first efficient and architecture-preserving algorithm for provable pointwise editing of DNNs that runs in polynomial time in the size of the edited layers, using a novel conditional forward semantics that fixes the activation pattern at each repair input, thereby reducing the NP-hard editing problem to linear programming and scaling from ResNet DNNs to LLMs.2. Provable V-Polytope Editing: We extend APRNN to address, for the first time, provable editing over continuous input regions defined as convex hulls of vertices, exploiting the local linearity of ReLU DNNs to reduce the universally quantified V-polytope editing problem to pointwise editing on the vertices.3. Provable H-Polytope Editing: We present PREPARED, the first polynomial-time algorithm for enforcing hard output constraints over high-dimensional halfspace-bounded input polytopes, using a novel parametric linear relaxation that constructs tight output bounds over the entire input polytope as linear constraints in terms of the parameters.4. Provable Gradient Editing: We present ProGrad, the first polynomial-time algorithm for enforcing hard constraints on DNN gradients using a novel conditional backward semantics, enabling provable alignment of gradient-based explanations and gradient behavior in applications ranging from LLMs to scientific and control systems.Across all four contributions, a common principle is pruning the optimization space to a sound, linear underapproximation of the original nonlinear problem that can be solved efficiently using linear programming, while still being effective at finding edits. We demonstrate that our family of provable editing techniques is practical, scalable, and broadly applicable through extensive experimental evaluation on a wide range of DNNs and benchmarks, including Qwen3 and Llama3 LLMs, ResNet152 and VGG19 image-classification DNNs, BERT sentiment-classification transformers, ACAS Xu aircraft collision-avoidance DNNs, scientific-computing DNNs, and VNN-COMP benchmarks.