Higher-order graph evaluation #
The real and nested-dual executions use the existing GraphData representation. A local
jet-preservation law for each pair of nodes propagates through the graph, including its saved
intermediates. Selecting any output then gives mathlib's iterated Fréchet derivative.
The auxiliary environment is held fixed. These results concern exact-real forward evaluation; they do not assume that node JVP/VJP fields are correct merely because the forward maps agree.
Each saved tensor is smooth and its nested-dual value contains its mixed derivatives.
Instances For
Fixed model state has zero mixed derivatives and uses the runtime constant embedding.
The model's seeded input tensor satisfies the context relation at every derivative order.
Join separately certified input families, for example fixed state and varying model inputs.
Shape-list transport changes neither smoothness nor stored derivative coefficients.
Appending a proved node output extends the relation for the saved context.
A typed context lookup retrieves a smooth tensor and its complete jet.
Coordinatewise certificates determine the complete heterogeneous context relation.
A pair of forward maps preserves smooth input families and their full mixed-derivative jets. Reverse-mode correctness is a separate obligation.
Instances For
Reading an existing context entry preserves its smoothness and all derivative coefficients.
Lift a scalar jet rule through an elementwise graph operation reading a saved tensor.
Lift a binary scalar jet rule through any pair of saved tensors of the same shape.
Node-local jet laws on a pair of existing executable graphs, in their recorded order.
- nil
{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{n : ℕ}
{Δ : Type}
{Γ : List Spec.Shape}
: PreservesJet E n GraphData.nil GraphData.nil
An empty graph preserves the supplied input jets.
- snoc
{E : Type u_1}
[NormedAddCommGroup E]
[NormedSpace ℝ E]
{n : ℕ}
{Δ : Type}
{Γ shapes : List Spec.Shape}
{shape : Spec.Shape}
{real : GraphData ℝ Δ Γ shapes}
{nested : GraphData (Runtime.Autograd.Model.Dual.Nested ℝ n) Δ Γ shapes}
{realNode : NodeData ℝ Δ (Γ ++ shapes) shape}
{nestedNode : NodeData (Runtime.Autograd.Model.Dual.Nested ℝ n) Δ (Γ ++ shapes) shape}
(previous : PreservesJet E n real nested)
(node : NodeData.PreservesJet E n realNode.forward nestedNode.forward)
: PreservesJet E n (real.snoc realNode) (nested.snoc nestedNode)
Appending a locally proved node preserves all existing and newly computed jets.
Instances For
Graph evaluation preserves the jet relation for the entire saved context.
Extracting all tangent coefficients at any graph output computes its iterated derivative.