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.
Metadata
Release files for nnconvexity 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nnconvexity-0.1.1.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nnconvexity-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.8 MB
Release files / nnconvexity-0.1.1.tar.gz
| Download URL | nnconvexity-0.1.1.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91d9c9df0bdf00fa80668e1dac43ea412f6e9c3d5ab797418a20371dcc6d8db6
|
|
BLAKE2b-256 checksum How to use checksums |
aca2d7ee10fd2d48e3787d684973d54e3bfe73f841ded5d9d88bcb57bb2b3955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Release files / nnconvexity-0.1.1-py3-none-any.whl
| Download URL | nnconvexity-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52bdf8105923724bfe9b65bf439092eb2c7b3d9363d83fac8171f0a6eb630ce8
|
|
BLAKE2b-256 checksum How to use checksums |
12483fdaa33f5168da8b567f90ce4108b826e273a40e049634d9c37d686da18c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|