Warning
This package is still in its early stages. Updates may cause breaking changes.
Neural Geometry is a Python library designed to explore and manipulate the geometric properties of neural network latent spaces. It provides a set of tools and methods to understand the complex, high-dimensional spaces that neural networks operate in, inspired by recent approaches (e.g. Borde et al., 2023).
The primary features of Neural Geometry include:
- An implementation of the neural latent geometry search framework. This framework provides a unique approach to product manifold inference, which can be beneficial in various fields such as machine learning and data analysis.
- A selection of optimization methods to cater to different needs and requirements. These methods can be used to fine-tune the performance of the neural latent geometry search framework.
This package is designed to be compatible with popular scientific computing libraries such as NumPy and PyTorch, making it a versatile tool for researchers and developers working in these environments. Comprehensive documentation is available at docs.
Neural Geometry requires Python 3.12 or newer.
To install Neural Geometry, use uv:
uv pip install neural-geometryYou can install optional packages for development or visualization using:
uv sync --extra dev --extra vis
uv pip install -e ".[dev,vis]" # editable install from pyproject.toml
uv pip install neural-geometry[dev,vis] # install from pypiAfter installing, you can import the package and use it by following the example.
Contributions to Neural Geometry are welcome! To contribute:
- Fork the repository.
- Install the pre-commit hooks using
pre-commit install. - Create a new branch for your changes.
- Make your changes in your branch.
- Submit a pull request.
Before submitting your pull request, please make sure your changes pass all tests.
uv run pytestNeural Geometry is licensed under the MIT License. See the LICENSE file for more details.
