API Docs#

Public API#

The functions and classes of the three groups. The main ones are also available directly from multigeom (for example multigeom.compute_fisher).

Encoders#

multigeom.encoders.load_encoder(name_or_path)

Load an encoder that is already fitted.

multigeom.encoders.NeuralEncoder(*args, **kwargs)

A backbone followed by a readout.

multigeom.encoders.validate_encoder(encoder, *)

Check encoder against the contract.

multigeom.encoders.EncoderReport(n_neurons, ...)

Result of validate_encoder: the number of neurons, the scale of the responses and any warnings.

multigeom.encoders.EncoderContractError(...)

The encoder breaks a rule of the contract; rule is its id (R1-R9).

multigeom.Encoder(*args, **kwargs)

What the pipeline asks of an encoder f: image -> responses (see the rules above).

Geometry#

multigeom.geometry.compute_fisher(image, ...)

Compute the top-k eigenpairs of J(x) = (1/σ²) J_{f_φ}ᵀ J_{f_φ}.

multigeom.geometry.compute_g

Compute top-k eigenpairs of G(x) for a single image via the conditional-pair estimator (Algorithm 1).

multigeom.geometry.FisherOutput(eigenvalues, ...)

Top eigenpairs of J(x) returned by compute_fisher: eigenvalues [k] and eigenvectors [k, P], largest first.

multigeom.geometry.EstimatorOutput(...)

Top eigenpairs of G(x) returned by compute_g: eigenvalues [k] and eigenvectors [k, P], largest first.

Analysis#

multigeom.analysis.subspace_alignment(...[, ...])

Compute 𝒜_k = (1/k) ‖V_Aᵀ V_B‖_F² where V_A, V_B are the top-k eigenvectors of two PSD matrices.

multigeom.analysis.bures_wasserstein(...[, ...])

Compute the Bures–Wasserstein distance d_BW(A, B) on the cone of PSD matrices, using truncated eigendecompositions.

Module reference#

Every module of the package, with its functions and classes.

multigeom

multigeom: the multi-scale Fisher information geometry of neural population codes, estimated with conditional diffusion models (Azeglio, Laquitaine, Ferrari, Chalk; NeurIPS 2026).