Mathematical Foundations
SILVA Networks are fixed-point models with a structured interaction field. This page collects the derivations that connect the package API to the math.
For the implementation-level trace from each symbol to the package classes, solver updates, diagnostics, and reference cases, read Implementation Derivations after this page.
For method citations and claim-level citation rules, read the Research Citation Audit.
Research Lineage
| Topic in this page | Literature to cite |
|---|---|
| equilibrium layer \(z^\star=f_\theta(z^\star,x)\) | Bai, Kolter, and Koltun, Deep Equilibrium Models [4]; Deep Implicit Layers tutorial [3] |
| implicit differentiation / adjoint solve | Deep Implicit Layers tutorial [3]; DEQ [4] |
| Anderson acceleration | Anderson, 1965 [10]; Walker and Ni, 2011 [11] |
| Broyden update | Broyden, 1965 [12] |
| GMRES adjoint linear solve | Saad and Schultz, 1986 [13] |
| graph local / graph attention terms | Kipf and Welling, GCN [15]; Velickovic et al., GAT [16]; Gilmer et al., MPNN [17] |
| global set pooling and attention | Zaheer et al., Deep Sets [18]; Vaswani et al., Attention [29]; Lee et al., Set Transformer [19] |
Symbols
| Symbol | Meaning | Package object |
|---|---|---|
| \(x\) | External input features | x |
| \(z_k\) | Recurrent state at solver step \(k\) | internal solver state |
| \(z^\star\) | Equilibrium state | SolverResult.z |
| \(S_\theta\) | Stimulus encoder | StimulusEncoder, input_injection |
| \(H_\theta\) | Optional learned self branch | self_term |
| \(L_\theta\) | Local interaction | local |
| \(G_\theta\) | Global interaction | global_term |
| \(\alpha\) | Damping | SolverConfig.alpha |
| \(r(z)\) | Fixed-point residual | result.residuals |
From Infinite Depth to One Equation
An explicit weight-tied network repeats the same transition:
If the sequence converges, its limit satisfies
assuming \(f_\theta\) is continuous near the limit. The layer can therefore be defined by the residual equation
SILVA chooses a structured \(f_\theta\):
The package keeps each term independently replaceable while the solver only needs the callable \(z\mapsto f_\theta(z,x)\).
This infinite-depth/equilibrium viewpoint follows the DEQ literature, while the \(S_\theta+H_\theta+L_\theta+G_\theta\) decomposition is the SILVA structured interaction field.
Damping and Local Stability
The executed Picard map is often damped:
The equilibrium is unchanged because
Linearize \(T_\alpha\) around \(z^\star\). With an error \(e_k=z_k-z^\star\),
where
If
the linearized dynamics contract. This is exactly the quantity estimated by
damped_spectral_radius.
Banach Fixed-Point Lens
If \(f\) is a contraction on a complete metric space,
then the fixed point exists, is unique, and Picard iteration converges. In finite-dimensional differentiable settings, a sufficient local check is
in an operator norm on the neighborhood being inspected. SILVA diagnostics do not claim this condition globally; they provide local evidence around the computed state.
Implicit Differentiation
Let the solved state satisfy
Differentiate with respect to a parameter block \(\theta\):
Because
the derivative equation becomes
For a scalar loss \(\mathcal L(z^\star)\), define the adjoint vector \(\lambda\) by
Then
implicit_adjoint_solve exposes this linear solve for diagnostics. Public
training still works as ordinary PyTorch code, differentiating through the
finite solver steps.
This derivation is the same implicit-function theorem route used in DEQ and Deep Implicit Layers tutorials. Cite those sources whenever a result relies on the adjoint equation rather than ordinary finite unrolling.
Anderson Acceleration as Constrained Residual Minimization
Let recent residuals be
Collect them as columns:
Anderson acceleration chooses coefficients \(c\) that reduce the mixed residual:
The KKT conditions are
The implementation solves this system and mixes recent transition outputs.
history, ridge, and beta control the memory, regularization, and mixing.
Use Anderson's original fixed-point acceleration paper and Walker-Ni's modern analysis when reporting this solver.
Broyden as an Inverse Secant Update
Broyden uses the root form \(F(z)=0\). With an inverse-Jacobian estimate \(B_k\), the step is
The secant condition asks the next inverse estimate to satisfy
The compact good-Broyden update used here is
Because this educational implementation stores a dense inverse estimate, it is best for small states and controlled experiments.
Use Broyden's 1965 secant-method paper when reporting this solver.
Graph Local Term
Let \(E\) contain directed edges \(j\to i\). The mean local branch is
This is permutation-equivariant: relabeling nodes relabels the output in the
same way, provided edge_index and batch are relabeled consistently.
Use GCN, MPNN, or general GNN references when describing this term as graph message passing.
Graph Attention Term
For graph attention, project each state:
For an edge \(j\to i\),
with the edge-attribute term omitted when no edge_attr is supplied. Incoming
normalization gives
and the local update is
Use the GAT paper for the graph-local attention mechanism and the Transformer paper when discussing the scaled dot-product attention pattern.
Global Mean Field and Gated Context
For graph \(g\),
The static mean-field branch broadcasts
The gated branch first computes
then broadcasts
This gives every node access to graph-scale context while preserving per-minibatch graph separation.
Use Deep Sets for the permutation-invariant mean/set pooling lens. Use the SILVA citation for the specific gated global-context field.
Complexity Checklist
Let \(N\) be the number of entities, \(E\) the number of edges, \(d\) the state dimension, \(K\) the solver iteration budget, and \(m\) the Anderson history.
| Component | Typical memory | Typical work per solver step |
|---|---|---|
GraphLocal |
\(O(Nd+E)\) | \(O(Ed)\) |
GraphAttentionLocal |
\(O(Nd+Eh)\) | \(O(Ed)\) plus segment softmax |
MeanFieldGlobal |
\(O(Nd)\) | \(O(Nd)\) |
TopKGlobalAttention |
\(O(N^2)\) scores per graph | \(O(N^2d)\) before top-k |
| Picard | \(O(Nd)\) | one transition call |
| Anderson | \(O(mNd+m^2)\) | one transition plus small KKT solve |
| Broyden | \(O((Nd)^2)\) | dense inverse update |
| Full Jacobian | \(O((Nd)^2)\) | many autograd calls |
| VJP/JVP | \(O(Nd)\) activation-dependent | one product call |
Practical Reading Rule
Use the fixed-point residual to decide whether the solve finished, the damped spectral radius to inspect local stability, the tensor contract to validate dataset conversion, and the operator tables to explain what a model is allowed to claim.
import torch
from silva_networks import SolverConfig, fixed_point, stability_report
W = torch.tensor([[0.2, 0.1], [0.0, 0.3]])
b = torch.tensor([0.1, -0.2])
f = lambda z: torch.tanh(W @ z + b)
result = fixed_point(f, torch.zeros(2), SolverConfig(max_iter=30, tol=1e-7))
report = stability_report(f, result.z, samples=4, iters=12)
print(result.z.shape, result.residual, report.spectral_radius)
Where to Go Next
| Question | Page |
|---|---|
| What does a fixed point mean operationally? | Fixed Points |
| How do the equations become named SILVA branches? | Derivation Workbook |
| How is the backward linear system implemented? | Implicit Backward Guide |
| Which solver contracts implement these iterations? | Solvers API |