Lipschitz-Bounded 1D Convolutional Neural Networks using the Cayley Transform and the Controllability Gramian

Patricia Pauli, Ruigang Wang, Ian R. Manchester, Frank Allgöwer

TL;DR

This paper introduces a novel way to build 1D convolutional neural networks (CNNs) that are robust by design. By using control theory tools—specifically the Cayley transform and the controllability Gramian—the authors create a "direct parameterization" that guarantees a user-defined Lipschitz bound, enabling stable, unconstrained training of networks that are inherently resistant to adversarial attacks.

What Problem Does This Paper Address?

Deep learning models are notoriously fragile; small, carefully crafted perturbations to an input (adversarial attacks) can lead to wildly incorrect outputs. A common way to measure this sensitivity is the Lipschitz constant—essentially a speed limit on how fast the output can change relative to the input. A low Lipschitz constant means the network is robust.

However, enforcing a Lipschitz bound during training is difficult. Existing methods often rely on "layer-wise" bounds (multiplying the bounds of each layer), which is overly conservative and kills model expressivity. Other methods use constrained optimization, which is computationally expensive because it requires projecting weights back into a "safe" space after every gradient step. This paper seeks a way to bake robustness directly into the network's architecture so it can be trained using standard, unconstrained optimization methods without sacrificing too much performance.

Methods

The authors propose a direct parameterization for 1D CNNs. Instead of training raw weights and then trying to constrain them, they define the weights as functions of underlying "free" variables in a way that mathematically guarantees the Lipschitz bound is never exceeded.

Key technical components include:

  • State-Space Representation: They treat 1D convolutions as Finite Impulse Response (FIR) filters and represent them in a discrete-time state-space form. This makes the parameterization independent of the input signal's length.
  • Linear Matrix Inequalities (LMIs): They use LMIs to certify the Lipschitz constant of the entire input-output mapping.
  • Controllability Gramian: In a novel twist, they use the controllability Gramian (a concept from control theory) to solve a Lyapunov equation. This ensures that the complex matrix conditions required for the Lipschitz guarantee are satisfied by construction.
  • Cayley Transform: This tool is used to parameterize orthogonal matrices, which are essential for maintaining the desired properties of the network layers without restricting them too much.

This approach allows for the inclusion of standard components like average and maximum pooling layers, which have been challenging to handle in previous robust parameterization schemes.

The 1D CNN architecture used for the ECG dataset, featuring convolutional, pooling, and dense layers.

Datasets

The researchers evaluated their approach on the MIT-BIH arrhythmia database. This is a well-known benchmark for 1D CNNs consisting of electrocardiogram (ECG) recordings. The task is to classify heart wave signals into one of five categories: normal beat, left/right bundle branch blocks, and two types of premature contractions.

Examples of the five different heart wave classes from the MIT-BIH dataset.

Key Insights and Ideas

  • Global vs. Local Bounds: By imposing the Lipschitz bound on the entire input-output mapping rather than just multiplying individual layer bounds, the authors significantly reduce "conservatism." This means their "LipCNNs" can be more complex and expressive while still being provably robust.
  • Control Theory Meets Deep Learning: The use of the controllability Gramian to satisfy LMI conditions is a sophisticated bridge between classical control theory and modern machine learning. It provides a scalable way to handle convolutional layers that previous "direct" methods struggled with.
  • Input Agnostic: Because the convolutional layers are parameterized in state-space, the resulting robustness guarantees hold regardless of whether the input signal is 100 samples or 10,000 samples long.

Key Results

The authors compared their LipCNNs against vanilla CNNs and L2-regularized CNNs.

  • Adversarial Robustness: Under a projected gradient descent (PGD) attack, the LipCNNs maintained much higher accuracy as the perturbation strength increased. While the vanilla CNN's accuracy plummeted, the LipCNNs (especially those with lower Lipschitz bounds) remained stable.
  • Performance Trade-off: There is a clear trade-off between the guaranteed Lipschitz bound and clean-data accuracy. A very tight bound (e.g., $\rho=5$) leads to higher robustness but lower accuracy (~85%), while a looser bound (e.g., $\rho=50$) achieves near-vanilla accuracy (~95%) with significantly better robustness than standard models.
Comparison of test accuracy under adversarial attack for vanilla, L2-regularized, and LipCNNs. The LipCNNs (purple and yellow) show superior stability as perturbation strength increases.
The accuracy-robustness tradeoff: as the Lipschitz constant increases, test accuracy generally improves, but robustness to perturbations decreases.

Limitations and Future Work

The primary limitation is that this work is currently restricted to 1D CNNs. While 1D signals (like audio or ECG) are important, the most common use case for CNNs is 2D image processing. The authors note that 2D convolutions also have state-space realizations, and they plan to extend this parameterization to 2D CNNs in future work. Additionally, the current framework assumes slope-restricted activation functions like ReLU or tanh; extending this to a wider variety of non-linearities could further improve model flexibility.

Summary updated

BibTeX
@inproceedings{pauli2023lipschitz,
  author = {Patricia Pauli and Ruigang Wang and Ian R. Manchester and Frank Allgöwer},
  title = {{Lipschitz-Bounded 1D Convolutional Neural Networks using the Cayley Transform and the Controllability Gramian}},
  booktitle = {CDC},
  year = {2023},
  doi = {10.1109/cdc49753.2023.10383534},
}
Figure