This repository provides an industrial-grade, PyTorch-based numerical solver for Deep Analog Neural Networks (specifically, Cascaded MonDEQs).
By leveraging Operator Splitting Theory (Eckstein 1989), we replace traditional sequential solving methods with a simultaneous Two-Loop Splitting architecture. This mathematical framework guarantees global convergence while achieving machine-level precision (
Traditional sequential solvers suffer from a massive latency period where downstream layers wait idly for upstream layers to converge. Our splitting algorithm enables immediate, simultaneous updates across all layers.
As shown below, our method achieves
A key theoretical discovery is that inner-loop convergence is unnecessary. By relaxing the internal accuracy to a single proximal step (
The solver is designed for stability under strong coupling regimes (
# A minimal example of the solver's API
from solver import MonDEQSolver
# Initialize the engine (Float64 is recommended for machine-limit precision)
solver = MonDEQSolver(alpha_base=0.1)
# Execute the Two-Loop Splitting (k=1) algorithm
# H1, H2: Resistive networks (Strongly Monotone)
# B, C, D: Coupling and input matrices
u_state, v_state = solver.solve(
H1, B1, H2, B2, C1, D1, u_ext,
sigma_val=1.5,
target_tol=1e-10
)