Sneak-Path-Coded Quantized Weights
Implementation & benchmark of arXiv:2607.15929 — Current Should Not Sneak: Constrained Codes for Reliable Memristor Crossbar Arrays
Source paper: Current Should Not Sneak: Constrained Codes for Reliable Memristor Crossbar Arrays arXiv:2607.15929 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Store quantized neural-network weights in ReRAM using GF(4)- or GF(8)-based constrained blocks rather than writing raw symbols. The encoder selects codewords whose local patterns cannot create the most damaging short rectangular sneak paths, while a decoder reconstructs the original quantized symbols after sensing. This targets persistent edge-model storage and memristor crossbar weight loading, where reducing read errors may be more valuable than the coding-rate loss.
Formulas
Mathematical statement
The paper's RES-LOCO construction uses GF(4) symbols when b=2 rows are read simultaneously and GF(8) symbols when b=3 rows are read simultaneously; b is the number of simultaneously read wordlines. Codewords are arranged horizontally and selected from a lexicographically ordered constrained set, with bridge symbols inserted between codewords so concatenation preserves the local constraint. The paper reports that the GF(8) constrained-code rate approaches 0.8145 as codeword length grows. For larger arrays, inserting one all-zero row after every three data rows blocks circumference-4 paths, while the effective rate becomes R_new=(2/3)R, where R is the original horizontal code rate. The GF(4) version uses the same 2/3 rate factor when one zero row is inserted after every two data rows. In the ML adaptation, q is the quantization alphabet size, x is a vector of quantized weight symbols, E(x) is a constrained encoder, D(y) is the decoder applied to sensed symbols y, Q is the neural-weight quantizer, and Q^{-1} is its dequantizer. The deployed weight is reconstructed as Q^{-1}(D(y)); the measurable objective is reduced symbol error and reduced model-accuracy loss under a fixed physical array budget.
Implementation notes
Integrate the method at the quantized-weight storage and loading boundary, rather than inside the floating-point training graph. First quantize each tensor W to q=4 or q=8 levels using a per-channel affine quantizer Q. Represent each quantized level as one GF(q) symbol and tile the symbol stream into horizontal blocks of length L. Construct a constrained codebook by enumerating q-ary length-L strings, rejecting strings containing the selected short sneak-path motif, and retaining a lexicographically ordered subset. For each message index, emit the corresponding codeword. Between consecutive codewords, exhaustively search the allowed bridge symbols or bridge words and choose one whose concatenation satisfies the constraint. For arrays larger than the protected row group, optionally insert an all-zero row after every two data rows for GF(4), or after every three data rows for GF(8), applying the paper's rate penalty R_new=2R/3. Pseudocode is: symbols=Q(W); blocks=chunk(symbols,L); codes=[codebook[index(block)] for block in blocks]; bridges=choose_valid_bridges(codes); physical=layout_rows(codes,bridges,zero_row_policy); write(physical); sensed=read(); decoded=D(remove_bridges_and_zero_rows(sensed)); W_hat=Q_inverse(decoded). The paper supplies the GF(4)/GF(8) alphabet choice, lexicographic constrained construction, bridge requirement, and row-insertion rate formula; estimate actual symbol error rates from hardware or a calibrated circuit-level simulator. The first cheap experiment should use a small CNN or transformer with int4 and int8 weights. Compare raw storage, ordinary ECC, GF(4) coding, GF(8) coding, and zero-row variants under identical injected sneak-path corruption. Measure symbol error rate, post-load top-1 accuracy, storage overhead, read latency, and energy. Success means lower accuracy loss at the same physical array size, or equal accuracy with fewer read retries; the zero-row variant should specifically produce S_4=0 while exposing whether its one-third capacity cost is acceptable.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.