Conv2D Backward Approximation #
NF (rounded) backend: Conv2D backward (VJP) runtime→spec approximation.
This file proves soundness of explicit bounds for the three Conv2D gradients computed by
Spec.conv2d_backward_spec:
- kernel gradient
- bias gradient
- input gradient
Each gradient has a different nested-indexing pattern, so the proof keeps the three bound families
visible rather than hiding them behind one large opaque lemma.
The important public objects are the tensor-level bounds (conv2d*BoundTensor), the approximation
theorems (approxT_conv2d_*_deriv_spec), and conv2dRevNode, which packages Conv2D as a RevNode
so it composes via RevGraph.backprop_approx.
PyTorch analogue: these are the VJP/gradient computations produced by Autograd for Conv2D. https://pytorch.org/docs/stable/autograd.html https://pytorch.org/docs/stable/generated/torch.nn.functional.conv2d.html
Map of this file #
- Shared padding/read lemmas (to relate the padded-input branches to the original
approxThypothesis). - Bias gradient bounds:
conv2dBiasPointBound,approx_conv2d_bias_point, and tensor-lifted bound. - Kernel gradient bounds:
conv2dKernelPointBound,approx_conv2d_kernel_point, and tensor-lifted bound. - Input gradient bounds:
conv2dInputPointBound,approx_conv2d_input_point, and tensor-lifted bound. conv2dRevNode: packaging as aRevNodeso the bound composes inside larger graphs.
References #
- Dumoulin & Visin, A guide to convolution arithmetic for deep learning (indexing/stride/padding conventions).
- Goodfellow, Bengio, Courville, Deep Learning (MIT Press, 2016), convolution/backprop background.
- Baydin et al., Automatic Differentiation in Machine Learning: a Survey (JMLR 2018) (VJP framing).
Padded-input helper used by the Conv2D spec: cast when padding = 0, otherwise padMultiChannel.