Lipschitz Constant Meets Condition Number: Learning Robust and Compact Deep Neural Networks

Yangqi Feng, Shing-Ho J. Lin, Baoyuan Gao, Xian WeiarXiv 2025

Abstract

Recent research has revealed that high compression of Deep Neural Networks (DNNs), such as massive pruning, often leads to a severe drop in accuracy and increased susceptibility to adversarial attacks. While pruning is intended to promote efficiency, the resulting weight matrices frequently become ill-conditioned, aggravating vulnerability to input noise. This work introduces the Transformed Sparse Constraint joint with Condition Number Constraint (TSCNC), a novel framework designed to maintain well-conditioned weight matrices even at high sparsity. Our theoretical analysis demonstrates that the condition number is a dominant factor in model robustness. Extensive experiments show that TSCNC significantly improves the adversarial resilience of over-sparsified models, bridging the gap between compactness and robustness.

The Robustness Cliff in Pruned Networks

As deep learning models are increasingly deployed on edge devices, pruning—the removal of redundant weights—has become a standard technique for memory and energy efficiency. However, a "robustness cliff" often appears at high compression rates (90%+). While a model might retain its standard accuracy, its resistance to adversarial perturbations—tiny, malicious changes to input data—typically plummets.

The core issue identified in this research is the ill-conditionedness of highly pruned weight matrices. Aggressive pruning can inadvertently create matrices that are nearly low-rank, characterized by a high "condition number." An ill-conditioned matrix acts like an unstable system: a small perturbation in the input is amplified into a large error in the output.

Visualizing the ill-conditioned weight space and the smoothing effect of TSCNC on weight distributions at 90% and 95% sparsity.

Methodology: The TSCNC Framework

To address this, we propose the Transformed Sparse Constraint joint with Condition Number Constraint (TSCNC). This approach integrates two primary components:

  1. Condition Number Constraint ($L_{CC}$): Calculating exact singular values for large matrices is computationally prohibitive. Instead, we employ a scale-invariant Frobenius norm regularizer as a differentiable proxy. This constraint encourages a smoother weight distribution, preventing the matrix from entering an ill-conditioned state where certain directions are excessively amplified.
  2. Transformed Sparse Model: Pruning decisions are guided by a Taylor expansion estimate of the change in adversarial loss ($\Delta L_{CE}$). Weights that contribute least to the model's robustness are prioritized for removal.

Our theoretical contribution (Theorem 3.4) establishes that the condition number serves as a bound for the local Lipschitz constant. By explicitly controlling the condition number, we provide a stable mathematical foundation that preserves robustness even when 95% of connections are removed.

Key Insights: Smoothness and Stability

A critical observation is the difference in weight distributions between TSCNC and baseline methods like HYDRA. While standard pruning often results in "peaky" distributions that lead to ill-conditioned matrices, TSCNC maintains a more spread-out distribution. This "smoothing" effect is essential for keeping the condition number low and the model stable.

Furthermore, our analysis suggests that while moderate sparsity can theoretically improve robustness by limiting the Lipschitz constant, this benefit is only realized if the condition number is kept in check. Without this balance, the benefits of sparsity are overwhelmed by the instability of an ill-conditioned matrix.

Experimental Results

We evaluated TSCNC against state-of-the-art baselines, including HYDRA and MAD, across benchmarks such as CIFAR-10, CIFAR-100, SVHN, and Tiny-ImageNet using architectures like VGG and ResNet.

Comparison of Accuracy (%) and Condition Number (K) across HYDRA, MAD, and TSCNC at 90% and 95% sparsity levels.

As shown in the results, TSCNC consistently outperforms existing methods, particularly at extreme sparsity levels:

  • Adversarial Robustness: On CIFAR-10 (VGG-16 at 95% sparsity), TSCNC achieved 46.43% accuracy under AutoAttack (AA), significantly higher than HYDRA's 40.19%.
  • Clean Accuracy: Beyond robustness, TSCNC often improves standard accuracy. On CIFAR-100 at 95% sparsity, TSCNC's clean accuracy was nearly 9% higher than that of MAD.
  • Condition Number Stability: The proposed constraints effectively prevent the condition number from exploding, which is the primary failure mode for baseline methods at high compression.

Conclusion and Future Directions

TSCNC demonstrates that adversarial robustness and high model compression are not mutually exclusive, provided the internal stability of the weight matrices is maintained. While this work focuses on ReLU-based convolutional and fully-connected networks, the underlying theory of condition numbers is broadly applicable. Future research will explore extending these constraints to modern architectures like Transformers and Large Language Models (LLMs), where efficient yet robust deployment is a critical challenge.

Summary updated

BibTeX
@misc{feng2025lipschitz,
  author = {Yangqi Feng and Shing-Ho J. Lin and Baoyuan Gao and Xian Wei},
  title = {{Lipschitz Constant Meets Condition Number: Learning Robust and Compact Deep Neural Networks}},
  year = {2025},
  eprint = {2503.20454},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.20454},
}
Figure