Skip to content

Learned Solver API

This module keeps the task transition, initializer, residual representation, learned Anderson controller, readout, and distillation loss independently replaceable. The mathematical derivation and source-scale protocol are in Learned Solvers and Backward Approximations.

silva_networks.solver_learning

Learned fixed-point solvers expressed through SILVA components.

The HyperDEQ construction follows Bai, Koltun, and Kolter, "Neural Deep Equilibrium Solvers" (ICLR 2022): a learned initializer predicts a first state, then a compact controller predicts Anderson coefficients and a mixing value from compressed residual history. Task-specific transitions remain ordinary SILVA modules and can be replaced independently of the solver.

SILVAHyperDEQTransition

Bases: Module

Default vector transition used by SILVAHyperDEQ.

Supply a custom transition(z, condition) module to use convolutional, multiscale, graph, Fourier, recurrent, or other structured SILVA mappings.

SILVAHyperInitializer

Bases: Module

Default condition-to-state initializer for vector or tensor states.

SILVAResidualCompressor

Bases: Module

Compress an arbitrary batched residual to four stable statistics.

SILVAHyperAndersonParameters dataclass

Per-example coefficients predicted for one learned Anderson update.

SILVAHyperAndersonController

Bases: Module

Predict Anderson coefficients and mixing from residual history.

Residual and condition compressors are replaceable. Their outputs must be rank-two tensors shaped (batch, feature_dim).

SILVAHyperDEQOutput dataclass

State, prediction, and complete learned-solver trajectory.

SILVAHyperDEQLoss dataclass

Training terms used to distill a learned equilibrium solver.

SILVAHyperDEQ

Bases: Module

Configurable learned equilibrium solver inside the SILVA grammar.

The default constructor provides a compact vector experiment. Replacing transition and initializer is enough to apply the learned solver to sequence, image, graph, operator, or multiscale states without changing the controller contract.

teacher

teacher(condition, *, initial=None)

Compute the high-precision teacher fixed point.

silva_hyper_deq_loss

silva_hyper_deq_loss(prediction, teacher_state, *, target=None, task_loss=None, trajectory_weight=1.0, initializer_weight=1.0, residual_projection_weight=1.0, task_weight=1.0, discount=0.8)

Compute source-aligned initializer, trajectory, residual, and task terms.

Where to Go Next

Question Page
How are learned Anderson updates derived? Learned Solvers and Backward Approximations
How is the family executed? Learned Solvers Lab
How do I replace the transition? Advanced Extension Handbook