Introduction
The integration of optimization solvers, such as Quadratic Program (QP) solvers, as differentiable layers within neural networks has enabled the paradigm of "decision-focused learning." This allows models to output optimal actions directly by solving constrained optimization problems based on predicted parameters. However, this architectural shift introduces a significant vulnerability: numerical instability.
The Problem: Numerical Infeasibility
Optimization layers rely on linear algebraic operations that are highly sensitive to the conditioning of input matrices. If a neural network's preceding layers produce parameters that result in a singular or near-singular matrix, the solver fails, typically outputting "NaN" (Not a Number). In safety-critical applications like autonomous driving, such a failure breaks the decision-making chain, potentially leading to catastrophic outcomes. Furthermore, NaNs introduced during training can cause the entire learning process to collapse.
Methodology: Attacks and Defenses
The researchers investigate the robustness of these systems by developing a "numerical instability attack" and a corresponding "SVD-based defense."
Numerical Instability Attacks
The objective of the attack is to find an input $u$ that forces the solver's constraint matrix $A$ to become singular. Three gradient-based strategies were evaluated:
- AllZeroRowCol: Directly forcing a specific row or column toward zero.
- ZeroSingularValue: Targeting the closest singular matrix via Singular Value Decomposition (SVD).
- ConditionGrad: Maximizing the condition number of the matrix (the ratio of the largest to smallest singular values).
Empirically, the AllZeroRowCol attack proved most effective due to its simplicity in the gradient landscape, achieving a 100% success rate in producing NaNs across undefended models.
The SVD-Based Defense
To mitigate these risks, the paper proposes a differentiable layer that bounds the condition number of the matrix $A$ before it reaches the solver. This layer performs an SVD, clamps the smallest singular values to ensure they remain above a threshold relative to the largest singular value, and reconstructs the matrix. This ensures the matrix remains well-conditioned, effectively neutralizing potential Denial of Service (DoS) attacks.
Experimental Evaluation
The framework was tested across three distinct domains: synthetic assignment problems, Jigsaw Sudoku reasoning, and autonomous vehicle speed planning.
Key Results
- Defense Efficacy: The proposed SVD-based defense reduced the attack success rate to 0% across all tested scenarios.
- Performance Improvements: Beyond security, the defense improved training stability. In the Jigsaw Sudoku task, test accuracy rose from 0.91 to 0.96.
- Safety in Autonomous Driving: In speed planning scenarios, the defense enabled stable training and safer speed profiles in cases where undefended models frequently failed to converge (only 12.8% success rate for undefended runs).
Conclusion
This work highlights a critical vulnerability in modern decision-focused learning. By implementing differentiable SVD-based conditioning, practitioners can ensure that optimization layers remain robust against both adversarial attacks and natural numerical instability, leading to more stable and performant AI systems.
Summary updated