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.

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.1.tar.gz (6.3 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.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eclipse_nn-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 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.1.tar.gz
Algorithm Hash digest
SHA256 dc75f2588d40130d061f5a62fc0322333c1ac2fa87168d9e75eda5537ad8536f
MD5 ae7eebdf7f6aeba2e745ee0793ff903d
BLAKE2b-256 0814984e0849b67c5175d85413dfc806c9d0803763ba6cb15e0851875c4c2233

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eclipse_nn-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fc22e836b3b75c297f93b96e310ca53bd5fa2fb202be113f50f5eef6182bfee
MD5 45a15d6990714510f1fd009c29a50b0c
BLAKE2b-256 5ba4033e4b8c422675b4f610491156bb4f17bff5ba3d983ac021ccba91c968cf

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