Examples
Experiment Evidence and New Equilibria
The examples are compact CPU-first validations of the public package API. They are not benchmark scripts; they are compact checks that show how to assemble a SILVA equilibrium, train it, inspect residuals, and move the same pattern to a larger experiment.
Run All Examples
python examples/scalar_deq.py
python examples/graph_silva.py
python examples/vision_channels.py
python examples/molecules.py
python examples/custom_layers.py
python examples/deq_engine_bridge.py
python examples/add_layers_on_top.py
python examples/cortex_hierarchy.py
python examples/spatial_cortex.py
python examples/point_architecture_catalog.py
python examples/scientific_operators.py
python examples/frontier_equilibria.py
python examples/advanced_equilibria.py
python examples/optical_flow_silva.py
python examples/constrained_optimization.py
python examples/stacked_architecture.py
python examples/datasets_quickstart.py
python examples/paper_family_cases.py
python examples/raft_deq_flow.py
python examples/source_data_families.py
What Each Example Covers
| Example | Package objects | Main check |
|---|---|---|
| Scalar DEQ | fixed_point, full_jacobian, stability_report |
numerical solution equals a closed-form fixed point |
| Graph SILVA | SILVAGraphLayer, SolverConfig |
graph state shape, gradients, stability report |
| Vision Channels | SILVAImageLayer |
image tensor state and residual solve |
| Molecules | SILVAGraphLayer |
atoms as entities, bonds as edges, molecule pooling |
| Custom Layers | SILVALayer, custom nn.Module branches |
replacing interaction branches |
| DEQ Engine Bridge | SILVADEQEngine, SILVADEQConfig, silva_deq |
solving arbitrary single-state and multi-state systems |
| Cortex Hierarchy | SILVACortexLayer, SILVACortexNetwork |
deep internal modules inside linked equilibrium points |
| Spatial SILVA Cortex | SILVACortexLayer, silva_equilibrium_model |
residual CNN and U-Net inside one point linked to a different vector point |
| Point Architecture Catalog | point architecture registry and SILVACortexLayer |
ten shape-preserving vector, token, spatial, gradient, and tiny-data checks |
| Full Cortex Operators | every SILVACortexLayer slot and all 25 branch factory names |
internal sequence, self, local, global, custom, output, normalization, solver, shapes, and gradients |
| Scientific Operators | ODE flow, implicit PDE steps, reaction-diffusion, Burgers, Fourier operators, graph PDEs | analytic errors, fixed-point residuals, boundaries, gradients, and resolution changes |
| Recent Equilibrium Families | Fourier equilibrium, physics graph, homotopy, and empirical-measure SILVA models | four bounded reproductions with solver or discrepancy diagnostics |
| Advanced Equilibria | monotone graph, injected transformer, Poisson mirror, physics-informed ODE, DAE root, residual objective | six equation-checked mechanisms with distinct numerical and task diagnostics |
| Optical Flow SILVA | SILVADEQFlow, RAFT-style correlation helpers |
synthetic flow fixed point, EPE, smoothness, gradients |
| Constrained Optimization | SILVAProjectedQPLayer, silva_projected_qp_layer |
projected-QP fixed point, simplex constraints, gradients |
| Stacked Architecture | SILVAGraphNetwork, mixed solvers |
multi-layer equilibrium stack on a selected device |
| Dataset Quickstart | dataset loaders and adapters | public data to GraphTensorBatch to model |
| Citation-Aware Reporting | presets, solvers, diagnostics, citation audit | methods sentence and citation checklist for a concrete configuration |
| Paper Family Cases | sequence DEQ, MDEQ, IGNN, INR, DEQ-DDIM | compact architecture and gradient smokes across generalized cases |
| RAFT and DEQ-Flow | SILVARAFTDEQ, correction loss, cached state |
coupled flow solve, sparse correction predictions, backward pass, and reuse |
| Source-Data Families | source receipts, verified snapshots, monDEQ, pcDEQ, NEMON, EIGNN, MGNNI, DeltaDEQ | six real-tensor mechanism and gradient checks with explicit non-benchmark scope |
Shared Pattern
Every example follows the same engineering path:
The same pattern supports user datasets after preprocessing into the package tensor contract.
Executable Evidence Map
Every worked page now retains its introductory route and adds the complete program, measured compact output, mathematical result contract, interpretation, and full-scale transfer record.
| Worked page | Executable program | Compact evidence |
|---|---|---|
| Advanced Expansions | examples/advanced_expansions.py |
Posterior variance, coupled-root residual, trajectory shape, and certified margins |
| Advanced Equilibria | examples/advanced_equilibria.py |
One result for each advanced equilibrium family, with family-specific residuals |
| Citation Aware Reporting | examples/reproduction_registry.py |
A complete machine-readable source and verification record |
| Constrained Optimization | examples/constrained_optimization.py |
Simplex feasibility, energy, solver residual, and parameter gradients |
| Cortex Hierarchy | examples/cortex_hierarchy.py |
Per-point state shapes, solver choices, logits, loss, and gradients |
| Custom Layers | examples/custom_layers.py |
The custom state shape, final residual, and differentiable loss path |
| Datasets Quickstart | examples/datasets_quickstart.py |
Dataset identity, tensor shape, and measured classification accuracy |
| Deq Engine Bridge | examples/deq_engine_bridge.py |
State shape, iterations, residual ratio, and gradient availability |
| Emerging Equilibria | examples/emerging_equilibria.py |
Family-specific exact-solution, boundary, reconstruction, or trajectory checks |
| Evidence And Protocols | examples/evidence_and_protocols.py |
Repeated-seed statistics, residuals, fingerprints, and three explicit scale tiers |
| Frontier Equilibria | examples/frontier_equilibria.py |
Task, equation, invariance, and fixed-point residuals for four operator classes |
| Full Cortex Operators | examples/full_cortex_operators.py |
Branch activations, solver history, state shape, loss, and gradients |
| Full Scale Training | examples/add_layers_on_top.py |
A measured training loss from the complete optimization path |
| Graph Silva | examples/graph_silva.py |
Node-state shape, task loss, equilibrium residual, and gradients |
| Learned Solvers | examples/learned_solvers.py |
Teacher and learned-solver residuals plus exact, jfb, and shine gradients |
| Molecules | examples/molecules.py |
Atom and molecule tensor shapes, residual, prediction loss, and gradients |
| Optical Flow Silva | examples/optical_flow_silva.py |
Flow shape, endpoint error, iterations, residual, and gradients |
| Paper Family Cases | examples/paper_family_cases.py |
Shape and residual checks across sequence, vision, graph, and diffusion cases |
| Point Architecture Catalog | examples/point_architecture_catalog.py |
Parameters, loss, residual trajectory, and gradient norm for every architecture |
| Quantum Deq | examples/quantum_deq.py |
Circuit measurements, equilibrium residual, task output, and circuit gradients |
| Raft Deq Flow | examples/raft_deq_flow.py |
Flow shape, correction trajectory, solver residual, loss, and gradients |
| Reproduction Registry | examples/reproduction_registry.py |
Verification levels, preserved mechanisms, scale tiers, and source obligations |
| Scalar Deq | examples/scalar_deq.py |
Closed-form agreement, final residual, iteration count, and implicit gradient |
| Scientific Operators | examples/scientific_operators.py |
Ode error plus pde, boundary, and equilibrium residuals |
| Source Data | examples/source_data_families.py |
Losses, certificates, residuals, scale allocation, and cache activity on source data |
| Spatial Cortex | examples/spatial_cortex.py |
Spatial and vector state shapes, per-point solvers, loss, and gradients |
| Stacked Architecture | examples/stacked_architecture.py |
Logit shape, pointwise solvers, loss, and gradient flow across the stack |
| Structured Equilibria | examples/structured_equilibria.py |
Certificates, positivity, one-sided bounds, scale weights, and cache activity |
| Vision Channels | examples/vision_channels.py |
Image-state shape, iteration count, residual, loss, and gradients |
Across the collection, a reported result is treated as the tuple
Keeping these entries separate prevents task quality, solver convergence, and structural validity from being collapsed into one number.
Where to Go Next
| Question | Page |
|---|---|
| How do I choose an example for my data and state layout? | Case Atlas |
| Where should a first-time reader begin? | Introduction by Example |
| How can I run the examples and validation suite? | Run Everything |