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. et al. On convex decision regions in deep network representations. Nat Commun 16, 5419 (2025). https://doi.org/10.1038/s41467-025-60809-y

Paper: https://www.nature.com/articles/s41467-025-60809-y

Documentation: https://nnconvexity.readthedocs.io/en/latest/

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: nnconvexity-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for nnconvexity-0.1.1.tar.gz
Algorithm Hash digest
SHA256 91d9c9df0bdf00fa80668e1dac43ea412f6e9c3d5ab797418a20371dcc6d8db6
MD5 bde987bf4d3b5ffad035103476e28a93
BLAKE2b-256 aca2d7ee10fd2d48e3787d684973d54e3bfe73f841ded5d9d88bcb57bb2b3955

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nnconvexity-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52bdf8105923724bfe9b65bf439092eb2c7b3d9363d83fac8171f0a6eb630ce8
MD5 f991d64b078e6c9d1543d461905d4ded
BLAKE2b-256 12483fdaa33f5168da8b567f90ce4108b826e273a40e049634d9c37d686da18c

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