Papers
Topics
Authors
Recent
Search
2000 character limit reached

Residue Number System Winograd

Updated 13 February 2026
  • Residue Number System (RNS) Winograd is a reformulation of the classical Winograd convolution, embedding modular arithmetic and CRT reconstruction to enable efficient low-precision integer computations.
  • It translates conventional Winograd transforms into modular operations using 8–16 bit arithmetic, supporting larger transform tiles without sacrificing model accuracy.
  • Empirical evaluations show significant throughput improvements on modern hardware by reducing multiplication counts and mitigating floating-point instability.

Residue Number System (RNS) Winograd convolution is a reformulation of the classic Winograd minimal-filtering convolution algorithm for efficient, exact, low-precision integer computation, leveraging the parallel, carry-free properties of the Residue Number System. Motivated by the limitations of floating-point Winograd implementations for low-bitwidth convolutional neural network (CNN) inference, RNS-Winograd enables large transform tiles (e.g., 10×10 to 16×16) and near-minimal arithmetic complexity with 8–16 bit integer operations and no sacrifice in prediction accuracy. By embedding all Winograd steps into modular arithmetic over several small, pairwise-coprime moduli, and reconstructing full-precision results via the Chinese Remainder Theorem (CRT), RNS-Winograd achieves substantial throughput improvements on modern low-precision hardware (Liu et al., 2020).

1. The Classic Winograd Minimal-Filtering Algorithm

Winograd minimal filtering, denoted as F(M×M,R×R)F(M\times M, R\times R), computes the convolution of an R×RR\times R filter gg with an input patch dd to yield an M×MM\times M output tile YY. Let N=M+R1N = M + R - 1. The Winograd convolution in matrix terms is:

Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A

where GG (size N×RN\times R) and R×RR\times R0 (size R×RR\times R1) are the filter and data transform matrices, R×RR\times R2 (size R×RR\times R3) the inverse transform matrix, and R×RR\times R4 denotes element-wise multiplication.

Operationally:

  • Filters are transformed: R×RR\times R5.
  • Inputs are transformed: R×RR\times R6.
  • Element-wise multiplication: R×RR\times R7.
  • The result is inverse transformed: R×RR\times R8.

Winograd reduces arithmetic costs. Direct convolution requires R×RR\times R9 multiplications, Winograd just gg0 per tile, yielding a reduction factor gg1. For example, gg2 gives a gg3 reduction.

2. Residue Number System (RNS) and CRT Reconstruction

An RNS is defined by gg4 pairwise-coprime moduli gg5 with total dynamic range gg6. Each integer gg7 is represented by its residues gg8, where gg9.

Arithmetic in RNS is performed independently in each channel (modulus):

  • Addition/multiplication: dd0, dd1.

CRT reconstruction retrieves dd2 from its residues: For each dd3, let dd4 and dd5. Then,

dd6

This enables fully parallel, carry-free, low-precision computation suitable for quantized neural network inference.

3. Mapping Winograd Transforms to RNS

To embed Winograd into RNS, all transform matrices (dd7, dd8, dd9) must be expressed in integer or modular form. Rational entries are cleared via a least common multiple M×MM\times M0 of all denominators (e.g., M×MM\times M1 with integer M×MM\times M2). Each modulus M×MM\times M3 must be coprime to M×MM\times M4 to permit modular inversion:

  • M×MM\times M5
  • Analogously for M×MM\times M6

This process ensures all per-modulus transforms can be conducted with 8- or 16-bit integer arithmetic within each channel, so the full Winograd procedure is mapped to efficient, low-precision modular operations.

4. End-to-End RNS–Winograd Convolution Process

Given quantized INT8 filters and activations and RNS base M×MM\times M7, the algorithm proceeds channel-wise as follows:

  1. Forward Filter Transform (per residue channel M×MM\times M8):

M×MM\times M9

Can be precomputed per filter.

  1. Forward Data Transform:

YY0

  1. Pointwise Multiplication:

YY1

  1. Inverse Output Transform:

YY2

  1. CRT Reconstruction: For each output element YY3, recover

YY4

The forward data transform is highly amortized, as patches are reused across channels. Depthwise summations and pointwise multiplies can leverage optimized INT8/INT16 GEMM kernels at each modulus (Liu et al., 2020).

5. Complexity Reduction and Arithmetic Analysis

For output tiles YY5, filters YY6, tile size YY7, and YY8 RNS channels, when transform and CRT costs are amortized, the dominant cost is YY9 multiplies per output tile, compared to N=M+R1N = M + R - 10 for direct convolution. The theoretical speedup is:

N=M+R1N = M + R - 11

Representative reduction factors are shown in the following table:

Filter N=M+R1N = M + R - 12 Tile N=M+R1N = M + R - 13 N=M+R1N = M + R - 14 (8-bit) N=M+R1N = M + R - 15 (16-bit)
N=M+R1N = M + R - 16 N=M+R1N = M + R - 17 N=M+R1N = M + R - 18 N=M+R1N = M + R - 19
Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A0 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A1 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A2 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A3
Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A4 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A5 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A6 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A7
Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A8 Y=A[(GgG)(BdB)]AY = A^\top [ (G g G^\top) \circ (B^\top d B) ] A9 GG0 GG1
GG2 GG3 GG4 GG5

In practice, GG6 is selected in the range GG7–GG8 to balance transform cost, reconstruction overhead, and GEMM efficiency.

6. Empirical Performance and Accuracy

Experiments confirm that RNS–Winograd delivers significant acceleration without impairing model accuracy:

  • On Arm Cortex-A73 CPU, 8-bit RNS–Winograd (GG9, N×RN\times R0 filters, N×RN\times R1) yields N×RN\times R2 speedup over INT8 im2col+GEMM baseline for VGG16, with no loss in ImageNet Top-1 accuracy (71.4%).
  • 16-bit RNS–Winograd (N×RN\times R3) achieves N×RN\times R4 speedup over INT16 baseline.
  • For N×RN\times R5 filters (Inception-v3), N×RN\times R6 in 8-bit RNS achieves up to N×RN\times R7 speedup.
  • Transform and CRT/mixed-radix overheads are modest: forward transforms (N×RN\times R8), output transforms (N×RN\times R9), CRT (R×RR\times R00) (Liu et al., 2020).
  • Arithmetic reduction for large tiles (R×RR\times R01, R×RR\times R02, R×RR\times R03) reaches R×RR\times R04.

Empirical validation across VGG16, ResNet50, and Inception (v1/v3) shows no observable top-1 accuracy loss.

7. Implementation Guidelines and Efficacy

RNS–Winograd eliminates numerical instability inherent in large-tile Winograd with FP32 by confining all computation to integer modular domains. The approach is well-suited for modern accelerators supporting wide low-precision GEMMs and parallel SIMD execution. Implementation steps are:

  1. Select appropriate Winograd tile R×RR\times R05 and RNS moduli R×RR\times R06, ensuring the product covers dynamic range and each R×RR\times R07 is coprime with R×RR\times R08 (clearance of transform denominators).
  2. Precompute transformed matrices R×RR\times R09 mod R×RR\times R10.
  3. For each layer: pre-transform filters, process input patches, multiply in the Winograd domain channel-wise, and reconstruct results by CRT.
  4. Aggregate into batched GEMMs for throughput.

RNS–Winograd thus recovers the arithmetic and wall-clock gains of classic minimal filtering, but mapped to robust, tractable, low-precision integer arithmetic (Liu et al., 2020). This approach removes common sources of Winograd instability, provides a parallelism-friendly substrate, and requires only small increases in transformation overhead relative to the potential acceleration. The method is empirically validated at scale for modern CNNs without accuracy degradation.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Residue Number System (RNS) Winograd.