Skip to main content

Efficient Compositional Lipschitz Constant Estimation for Deep Neural Networks. Python implementation of the NeurIPS 2024 paper.

Project description

ECLipsE: Compositional-Estimation-of-Lipschitz-Constants

This repository is the codes for paper "ECLipsE: Efficient Compositional Lipschitz Constant Estimation for Deep Neural Networks" (NeurIPS 2024 paper), providing efficient and tight Lipschitz Estimate for feedforword neural networks (FNNs). ECLipsE.m and ECLipsE_Fast.m are functions for the two algorithms proposed and we can obtain the estimates for the Lipschitz constants (strict and tight upper bound), time used, and the trivial Lipschitz upper bound by directly calling the functions with weights of FNNs. The weights should be in the format of W1,W2,..., etc. and the biases are not needed for our methods. The activation functions for the FNNs need to be slope-restricted in [0,1], which is satisfied by most activation functions.

To reproduce the experiments in paper, we first generate / train FNNs as

  1. For randomly generated neural networks, run generate_random_weights.py with corresponding depths and widths for FNNs. The weights of FNNs will be stored under datasets/random.
  2. For neural networks trained on mnist dataset, run training_MNIST.py. The weights of FNNs will be stored under datasets/MNIST.

All the results can be obtained through Lip_estimates.m.

We also provide implementation in python under the "python" folder.

ECLipsE-Gen-Local: Efficient Compositional Local Lipschitz Estimates for Deep Neural Networks

The code under folder ECLipsE_Gen_Local_matlab contains the code for algorithms series ECLipsE-Gen-Local. The alogrithm gives efficient, scalable and tight local Lipschitz estimates for deep FNN. Paper is available at https://arxiv.org/abs/2510.05261.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eclipse_nn-0.1.4.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eclipse_nn-0.1.4-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file eclipse_nn-0.1.4.tar.gz.

File metadata

  • Download URL: eclipse_nn-0.1.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for eclipse_nn-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8eac9f14f700e38ddfae9bafb1f7be4c020c4b76d3e5923a70f68720940126dc
MD5 73c64c647b1376f3263a3e3fc9bbf019
BLAKE2b-256 0d718ea31b0133b0379f2bf068aed78ff868939fa9dc21282a5c656ac9351088

See more details on using hashes here.

File details

Details for the file eclipse_nn-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: eclipse_nn-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for eclipse_nn-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7563e365c11f4f3efe64ecbaf06a624c52554b5022d1be63c5c2bc296d4e5da
MD5 a3376fc7b243367da62c1fd2366ff519
BLAKE2b-256 ef496c1f75e2b348a991f2f8935a396d7300044b7ea2b063f127829c719883f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page