Skip to content

Commit e3e277f

Browse files
committed
docs: state the sense in which the Delaunay mesh is autodifferentiable
Adds the piecewise-smoothness framing to the Delaunay class docstring: smooth within each triangulation topology, measure-zero jump seams at triangle flips (where no method has a gradient), autodiff returning the exact branch derivative on either side — ReLU-network territory — versus the kernel-CDF rectangular meshes' seam-free C-infinity likelihood. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FSqnkgZv97PU9JdkCcthy
1 parent 821fb1b commit e3e277f

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

autoarray/inversion/mesh/mesh/delaunay.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,22 @@ def __init__(
3232
zero between re-wiring events), while point location, barycentric
3333
weights, dual areas and split points are computed in-graph from the
3434
traced vertices, so ``jax.grad`` returns the exact almost-everywhere
35-
derivative. Caveat for batched samplers: the callback is
35+
derivative.
36+
37+
In what sense "autodifferentiable"? The same sense as a ReLU network:
38+
the likelihood is piecewise-smooth — perfectly smooth within each
39+
triangulation topology, with measure-zero jump discontinuities at the
40+
triangle-flip (re-wiring) boundaries, where no gradient exists for
41+
any method. A sampler almost surely never lands on a seam, and on
42+
either side autodiff returns the exact gradient of the branch the
43+
evaluation point is on (FD comparisons show the seams, autodiff does
44+
not — individual finite-difference steps can straddle a flip). This
45+
contrasts the adaptive rectangular (kernel-CDF) meshes, which are
46+
C-infinity by construction with no seams at all — the cleanest choice
47+
for gradient-based inference, with Delaunay a scientifically exact
48+
piecewise-smooth alternative.
49+
50+
Caveat for batched samplers: the callback is
3651
``vmap_method="sequential"`` (one host qhull call per vmap lane) —
3752
the ``KNearestNeighbor`` / ``KNNBarycentric`` subclasses avoid the
3853
callback entirely and remain the batched-throughput option.

0 commit comments

Comments
 (0)