Abstract
Standard deep learning architectures rely on explicit layers where outputs are direct functions of inputs. This paper introduces a generalized framework for implicit layers, where the output is defined as the solution to an equilibrium equation. By leveraging the Implicit Function Theorem and automatic differentiation, we enable the integration of complex modules—such as optimization solvers and physical constraints—into end-to-end trainable networks without requiring manual gradient derivations. We demonstrate the effectiveness of this approach across tasks including image segmentation, graph matching, and 3D shape inference, showing that implicit layers provide a more powerful and flexible representation than traditional explicit mappings.
Introduction
In standard deep learning, layers are explicit: an input $x$ is transformed via a formula $f(x)$ to produce an output $y$, represented as $y = f(x)$. However, many real-world problems are more naturally described implicitly. For example, an output might be the solution to a physics simulation, a geometric constraint, or a complex optimization problem. Forcing these problems into explicit formulas is often restrictive or impossible. While previous works integrated specific optimization solvers, they often required tedious manual mathematical derivations for gradients and were limited to specific problem types like convex quadratic programming.
Methodology
The proposed framework shifts from the explicit $y = f(x)$ to an implicit formulation $F(x, y) = 0$. Here, the layer's output $y$ is the value that satisfies the equilibrium equation $F$ given input $x$.
The Implicit Function Theorem (IFT)
To enable backpropagation, the derivative of the output with respect to the input is required. The authors utilize the Implicit Function Theorem to provide an analytical expression for these derivatives: $$J_{y,x} = -[J_{F,y}]^{-1} [J_{F,x}]$$ This formula allows the network to "see through" the solver used in the forward pass to calculate how to update the weights.
Automatic Differentiation Integration
A key practical contribution is the use of standard automatic differentiation (AD) tools to handle the Jacobians ($J_{F,y}$ and $J_{F,x}$). By applying AD to the function $F$ itself, the necessary Jacobians can be extracted automatically, making implicit layers "plug-and-play" for any differentiable equation and eliminating the need for manual derivation.
Experimental Evaluation
The framework was validated across four distinct domains: digit recognition (MNIST), image segmentation (HazySky), 3D shape inference (ShapeNet), and graph matching (CUB-200-2011).
Key Results
- Image Segmentation: Using an implicit Normalised Cuts (NCut) layer, the network learned custom similarity metrics, achieving an 85% Intersection over Union (IOU), significantly outperforming the classical non-learning NCut method (70% IOU).
- Graph Matching: The implicit approach demonstrated faster convergence than traditional iterative methods and supported complex, non-convex constraints.
- 3D Shape Inference: "Level Set" implicit layers allowed for the inference of smooth 3D surfaces from 2D images with lower memory overhead than voxel-based methods.
Discussion and Conclusion
Implicit layers represent a strictly more powerful representation than explicit layers, as every explicit layer can be formulated implicitly. This approach decouples the forward pass (which can use any specialized solver) from the backward pass (handled by IFT).
However, challenges remain, including the computational cost of matrix inversion for large layers and potential stability issues if solvers fail to find unique solutions. Future work may explore applying this framework to differentiable physics engines or entire networks defined as large implicit functions.
Summary updated