Skip to main content

Package for analyzing the convexity of neural networks.

Project description

Convexity of representations

This package contains methods to compute convexity scores to measure convexity of latent representations of neural networks as defined in

Tětková, L., Brüsch, T., Dorszewski, T., Mager, F. M., Aagaard, R. Ø., Foldager, J., Alstrøm, T. S., and Hansen, L. K.: On convex decision regions in deep network representations. arXiv preprint arXiv:2305.17154, 2023.

Paper: https://arxiv.org/abs/2305.17154

Documentation: https://nnconvexity.readthedocs.io

Source code: https://github.com/LenkaTetkova/nnconvexity

See code for the paper containing also a demo for using this package.

It provides functions for two types of convexity:

  • Euclidean: sample points on a segment between two points of the same class and evaluate whether they are classified into the same class.
  • graph: approximation of convexity on a manifold -- construct a graph based on nearest neighbors and evaluate proportion of the shortest paths that go through the same class.

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

nnconvexity-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

nnconvexity-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nnconvexity-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for nnconvexity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5068b48d296b360219965073f2b2a1dbbf329b8ac7d8ce8a0a5211ae2976fd5a
MD5 d6e1a7f77161484b9abe3e32e248ce44
BLAKE2b-256 686a9c36e15a9312b8ef135f65b53a151c8aa3b40d3adb7758d08cc75463fbad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nnconvexity-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 710bdf9faabb74d4b87ee8b1158fec5b1028a87908c092a37e7b70e1b07d6a76
MD5 e309d2bafc1dac6349e595d081231c05
BLAKE2b-256 3344ba95f05c318ed10bff3d00b7f223d50bde057afe690fa50bce5b5361da2e

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