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.

Metadata

Release files for geojax 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geojax 0.1.0
File Size Uploaded
geojax-0.1.0.tar.gz 3.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for geojax 0.1.0
File Interpreter ABI Platform
geojax-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.1 MB

Release files / geojax-0.1.0.tar.gz

Download URL geojax-0.1.0.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6b2712fc17443910e001a18da6f4766c9f98ca263313910b14cbdbfc4a9fbaeb
BLAKE2b-256 checksum
How to use checksums
1bb59e634a3c82d1cafd6cc4e550e3cdb2020b8ec720e4e5976afbcb5528be95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / geojax-0.1.0-py3-none-any.whl

Download URL geojax-0.1.0-py3-none-any.whl
Size 85.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9c9403233eb0f97e65107d8dc7a124b7b6f6296264eb1612d67f28b6a151e6e
BLAKE2b-256 checksum
How to use checksums
1844ec2380079339bfd39923babf0fc17848e0a4380cc6036781b3b33f1f3de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page