Skip to main content

GeoJAX

GeoJAX

GeoJAX is a JAX-native toolkit for Riemannian geometry and manifold optimization. Geometry objects provide manifold primitives, models provide JAX scalar cost functions, and class-style solvers combine the two.

[!IMPORTANT] GeoJAX is alpha software. The 0.1 series deliberately favors a coherent scientific API over backward compatibility.

Highlights

  • Exact geodesic operations where closed forms are available, with machine-readable retraction and transport proxies elsewhere.
  • Matrix manifolds, Lie groups, hyperbolic spaces, shape spaces, low-rank models, and arbitrary pytree products.
  • JAX autodifferentiation, jit-compatible core operations, batch helpers, and pytree-safe optimization state.
  • Executable tutorial pages that place mathematical discussion, code, output, and figures in one document.

Installation

GeoJAX requires Python 3.11 or newer. After the first PyPI release, install it with:

python -m pip install geojax

For development from a local checkout:

python -m pip install -e ".[dev,docs,examples]"

Quick Start

The following problem minimizes a Rayleigh quotient on the unit sphere. Its solution is a dominant eigenvector of A.

import jax.numpy as jnp

from geojax.geometry import Sphere
from geojax.optimization import ConjugateGradient, Minimize

M = Sphere(size=3)
A = jnp.array(
    [[3.0, 1.0, 0.0],
     [1.0, 2.0, 0.0],
     [0.0, 0.0, 0.5]]
)

problem = Minimize(
    M=M,
    cost=lambda x: -x @ A @ x,
    solver=ConjugateGradient(verbosity=0),
    key=0,
)
x_hat, final_cost, history = problem.solve()

Sphere(size=3) is the unit sphere embedded in R^3. Minimize obtains the ambient derivative with JAX, converts it through the geometry, and delegates the iteration to the selected solver.

Scientific Scope

The public geometry namespace includes Euclidean, sphere, oblique, simplex, hyperbolic, torus, Grassmann, Stiefel, generalized orthogonality, Lie-group, SPD, fixed-rank, elliptope, spectrahedron, correlation, Kendall-shape, and pytree product geometries.

The public solver set is:

  • SteepestDescent
  • ConjugateGradient
  • TrustRegions
  • BarzilaiBorwein
  • LBFGS
  • ParticleSwarm
  • NelderMead

See the geometry guide, optimization guide, and executable tutorials for the mathematical and computational conventions.

Documentation

Install the documentation dependencies and build the complete site locally:

python -m pip install -e ".[docs,examples]"
make website
python -m http.server 8000 --directory site

The build executes every tutorial, fails on Sphinx warnings, and audits the generated HTML for malformed mathematics and broken local references. Open http://127.0.0.1:8000 after the server starts.

Development

python -m pip install -e ".[dev,docs,examples]"
pytest
ruff check geojax tests
python -m build
python -m twine check dist/*

The geometry protocol and optimization protocol describe the contracts expected from new implementations. Maintainers can follow the release checklist for manual TestPyPI and PyPI publication.

Citation

Academic users can cite the project using CITATION.cff. Release history is recorded in CHANGELOG.md.

License

GeoJAX is released under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geojax-0.1.0.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

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

geojax-0.1.0-py3-none-any.whl (85.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geojax-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for geojax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b2712fc17443910e001a18da6f4766c9f98ca263313910b14cbdbfc4a9fbaeb
MD5 50439d0675b1575ac2c34ccf5b89ca6f
BLAKE2b-256 1bb59e634a3c82d1cafd6cc4e550e3cdb2020b8ec720e4e5976afbcb5528be95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geojax-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 85.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for geojax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9c9403233eb0f97e65107d8dc7a124b7b6f6296264eb1612d67f28b6a151e6e
MD5 1905e08a2f56d5fd62883dd5ead48cfe
BLAKE2b-256 1844ec2380079339bfd39923babf0fc17848e0a4380cc6036781b3b33f1f3de5

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 Sentry Error logging StatusPage Status page