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.0.tar.gz (6.1 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.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eclipse_nn-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 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.0.tar.gz
Algorithm Hash digest
SHA256 5eb5415cc9560e19efa4a967945f9f42d0ca3d831f13aa9fee00bf470bed6798
MD5 d5be35018a34d81c73db36710536f246
BLAKE2b-256 b5042f448b02538f6f8bfa85ea4b279cd4d9483fae04ed740ac69e7751a6e3a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eclipse_nn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41cbab44dcf5179f6f067ee7c5fdf404c260aaa060c1055e12782c1fad1a5671
MD5 b668491d632c0bda69d47889b686b0aa
BLAKE2b-256 879fc7ba8d4ccee44c8869a91b99f5d515a70b77a96decc63a9dda0c0c45a2c1

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