Skip to main content

omnibias.curvature.torch

0.1.0a2AlphaPython >=3.10AGPL / commercial

Scoped parameter-curvature formulas, Fisher and Gauss–Newton constructions, natural steps, and sharpness utilities.

import omnibias.curvature.torch
Module contract & mathematical conventions

Torch, multi-layer exact-curvature sharpness.

The arbitrary-depth, PyTorch counterpart of omnibias.curvature.sharpness (one-layer, JAX). Curvature functionals are computed matrix-free from exact Hessian-vector products, so they scale to deep networks and drop into any training loop -- an MLP, a JetMLP PINN, or the omnibias.score.flow CNF velocity field.

Import as::

from omnibias.curvature.torch import sharpness_aware_loss, sam_objective

This subpackage requires the optional torch extra (pip install "omnibias-curvature[torch]"); it is intentionally *not* imported by the JAX-only top-level omnibias.curvature.

Shared formulas do not imply universal floating-point identity. Verify dtype, shape, derivative-order support, and the stated numerical assumptions for the path you use.

Imports & aliases​

These names share a definition with another public module. Follow a name for its full contract, parameters, and examples.

Import from this moduleCanonical reference
CollapseResultomnibias.curvature.torch.CollapseResult
ExactSAMomnibias.curvature.torch.ExactSAM
HessianOperatoromnibias.curvature.torch.HessianOperator
curvature_sharpnessomnibias.curvature.torch.curvature_sharpness
dense_hessianomnibias.curvature.torch.dense_hessian
hessian_eigenvalue_extremesomnibias.curvature.torch.hessian_eigenvalue_extremes
hessian_frobenius_sqomnibias.curvature.torch.hessian_frobenius_sq
hessian_top_eigenvalueomnibias.curvature.torch.hessian_top_eigenvalue
hessian_traceomnibias.curvature.torch.hessian_trace
hutchinson_frobenius_sqomnibias.curvature.torch.hutchinson_frobenius_sq
hutchinson_traceomnibias.curvature.torch.hutchinson_trace
hvpomnibias.curvature.torch.hvp
min_norm_solveomnibias.curvature.torch.min_norm_solve
numerical_rankomnibias.curvature.torch.numerical_rank
rank_collapseomnibias.curvature.torch.rank_collapse
regularization_pathomnibias.curvature.torch.regularization_path
regularized_solveomnibias.curvature.torch.regularized_solve
sam_objectiveomnibias.curvature.torch.sam_objective
sam_sharpness_gapomnibias.curvature.torch.sam_sharpness_gap
sharpness_aware_lossomnibias.curvature.torch.sharpness_aware_loss
top_eigenvalueomnibias.curvature.torch.top_eigenvalue