Manuscript Offprint
arXiv:2610.27910Local learning with imperfect analog synapses
ABSTRACT
Analog in-memory computing delivers efficient neural network inference at the edge, but systems deployed in non-stationary environments may need to adapt in situ to locally acquired data. Backpropagation faces two structural obstacles here. Its global error transport lets stochastic write errors compound across layers, and its backward pass demands bidirectional, high-precision peripheral circuitry absent from inference-oriented crossbar arrays. We introduce Channel-wise Spatial Gradient learning (CwSG), a strictly local, forward-only rule that trains each convolutional layer by rewarding spatial variation in its feature maps. In simulations replaying the measured trajectories of 1,189 phase-change memory and 1,268 filamentary memristor devices, CwSG learns with single, unverified, sub-1 V pulses. It matches backpropagation on phase-change memory with 59-fold fewer pulses and outperforms it by 53 percentage points on highly variable filamentary memristors, with 8-bit forward converters and without transposed crossbar reads or network-wide activation storage. Analog training thus becomes a problem of credit assignment, in which algorithmic design rather than hardware compensation alone overcomes severe programming noise.
Introduction
Analog in-memory computing (AIMC) delivers highly energy-efficient edge inference by performing matrix-vector multiplications directly within non-volatile memory arrays, such as phase-change memory (PCM) and filamentary memristors (FMs) . Extending the same arrays from inference to learning would let deployed edge systems adapt to locally acquired data, with potential benefits for energy, latency, and privacy . Yet the very architecture that makes AIMC efficient for inference is difficult to reconcile with how neural networks are conventionally trained.
The first challenge is credit assignment: determining how each layer should change its weights. Standard offline training relies on backpropagation (BP), which retains intermediate activations and transports errors backward through successive transposed weight matrices . Mapped onto AIMC, this global dataflow demands bidirectional array access, duplicated peripheral converters, or separately programmed copies of the transposed weights , undermining the simple, unidirectional architecture of inference-oriented crossbars.
Forward-only, layer-local learning therefore offers a natural alternative. The original Forward-Forward proposal showed that each layer can be trained on its own “goodness” objective, removing inter-layer backward error transport and network-wide activation retention , although the original algorithm underperforms on deep networks. Supervised local methods have since made this approach substantially more effective for deep convolutional architectures. Convolutional Channel-wise Competitive learning (CwC), in particular, associates groups of channels directly with classes: it obtains a supervised prediction from the active layer alone, without an auxiliary classifier or a second presentation of modified data .
The second challenge is physical: replacing BP with a layer-local objective does not, in itself, make learning robust to imperfect devices. Analog non-volatile memories exhibit device-to-device variability, state-dependent conductance evolution, and stochastic programming steps . Controlling the size of a physical weight change is therefore difficult. Locality helps by removing the dependence of each layer's learning signal on imperfect weights in later layers. The choice of local objective remains critical, however: a local rule developed under precise numerical optimization may become unstable, drift systematically, or favor degenerate solutions once gradient magnitudes are distorted.
CwC illustrates this general problem concretely. Its goodness score rewards the activation energy of each class-associated channel group, allowing a nearly uniform map to score highly without encoding spatial detail. This offers a shortcut to high goodness: increasing activity broadly rather than learning a selective spatial response. This tendency, already visible under ideal numerical updates, is reinforced by stochastic programming, as broad increases in activity can be easier to achieve than carefully shaped spatial responses.
Here, we show that robust learning with imperfect analog synapses can emerge from changing what each layer rewards: spatial structure instead of activation amplitude. We introduce Channel-wise Spatial Gradient learning (CwSG), which preserves the features that let CwC train deep networks (class-to-channel supervision, classifier-free local prediction, and a greedy layer-wise schedule) but replaces activation-amplitude goodness with finite-difference spatial-gradient energy. A uniform feature map now scores exactly zero, regardless of its amplitude, whereas edges, contours, and textures contribute directly. Each layer is thus rewarded not simply for responding strongly, but for producing spatially differentiated responses. We show that this change does more than improve convolutional accuracy: it also supports effective learning under sign-only updates and stochastic device programming.
Under full-precision optimization, CwSG achieves the highest accuracy among the evaluated backpropagation-free methods on MNIST, Fashion-MNIST, and CIFAR-10, approaching end-to-end BP to within 0.2, 0.6, and 2.6 percentage points, respectively. When constrained to fixed-magnitude, sign-only updates, CwSG loses only 0.6, 1.5, and 0.4 percentage points on the same tasks, whereas standard BP loses 25.6 points on CIFAR-10. In controlled write-noise experiments with sign-only updates, CwSG tolerates up to an order of magnitude higher noise levels than BP.
We then evaluate CwSG in device-calibrated simulations that replay experimentally measured programming trajectories from 1,189 PCM and 1,268 FM devices. On SVHN , CwSG reaches 82.5% on PCM, comparable to the 82.2% obtained by direct fixed-pulse in-situ BP, while requiring only 6.4 rather than 378 programming pulses per device, a 59-fold reduction. Conversely, on the quasi-linear but more variable FM trajectories, CwSG reaches 84.9%, whereas the evaluated BP implementation remains
2/30 at 31.5%. CwSG also retains its accuracy with 8-bit forward converters and never requires a transposed crossbar read. Robust analog training, therefore, does not need to rely on precise device programming: it can emerge from a learning rule designed around the native operations of the hardware.
Active compensation offers another route to robust analog learning by improving the fidelity of physical weight updates. Iterative program-and-verify , mixed-precision digital accumulation , and auxiliary analog accumulators can all deliver accurate updates, but at the price of repeated reads and writes, digital accumulation, or scheduled transfer operations. CwSG targets the inexpensive programming regime in which each update is a single low-voltage soft SET or RESET pulse, applied without reading or verifying the device state . Our previous experiments demonstrated supervised Forward-Forward and competitive-forward learning with such updates in FM classifier layers operating on pretrained image features . CwSG extends this approach to training the convolutional layers themselves.
The paper proceeds in three stages. We first compare CwSG with BP and other local methods under ideal numerical updates, then introduce sign-only updates and programming noise. Finally, we evaluate learning with measured device responses, finite-resolution converters, and small batches.
A spatial-gradient objective improves local convolutional learning
We begin by defining the CwSG learning rule and establishing its algorithmic viability independently of analog synaptic behavior. By evaluating its performance under full-precision optimization, we isolate its capacity to solve the architectural problem of weight transport before introducing physical device non-idealities.
We build upon the supervised architecture of CwC because it satisfies three hardware locality criteria: (i) forward-only updates without storing intermediate activations across multiple layers, (ii) no transposed backward projections or weight transport, and (iii) strictly rely on a layer-local error signal (Fig. 1a). Alternative approaches address some of these constraints, but they typically retain some form of nonlocal dataflow or introduce auxiliary supervision mechanisms. Direct Feedback Alignment (DFA) methods and its variants remove exact weight symmetry but still distribute a global error signal that requires network-wide activation storage . Other layer-wise methods derive supervision through auxiliary classifier heads or embedding comparisons, as in Dictionary Contrastive Learning (DCL) , introducing shared external embeddings, additional trainable weights (l-DCL), or peripheral computation . CwC instead maps groups of output channels directly to target classes, deriving a supervised learning signal from the active layer's inputs, activations, and label. This classifier-free, forward-only operation eliminates the need for auxiliary heads and fulfills all three locality criteria by construction, providing an ideal foundation for CwSG. Supplementary Note 1 provides formal definitions of these criteria and a detailed comparison across the evaluated learning rules.
Layers are trained greedily: while layer learns, previously trained layers remain frozen and downstream layers are not evaluated (Fig. 1b). At inference, CwSG predicts the class using only the goodness scores of the final layer.
For a single convolutional layer, we define the output channel activation at each spatial position
3/30 a → Forward ← Backward ← Update
Channel-wise Spatial Gradient (CwSG)
b
Training N epochs
Greedy training schedule

Backpropagation (BP)
C
maximize for channel group
minimize for other channel groups
CwC
norm
Reward amplitude
CwSG
seminorm
Reward spatial variation
Figure 1. Channel-wise spatial-gradient learning enables strictly local credit assignment. a Credit assignment comparison. CwSG evaluates a supervised loss at the active layer and strictly confines the gradient computation to that layer. Backpropagation transports global errors through successive transposed-weight operations . b Greedy training schedule on CNN-7. Previously trained layers act as a frozen feature extractor, the active layer optimizes its local loss, and downstream layers remain uncomputed. The RMSnorm is parameter-free. At inference, network predictions rely exclusively on the per-class goodness scores produced by the final layer. c CwC and CwSG goodness functions, illustrated by the layer activations for an MNIST digit ‘8’ after training to maximize each respective objective. CwC rewards squared activation amplitude, whereas CwSG rewards spatial-gradient energy across the horizontal and vertical axes. A spatially uniform high-amplitude response therefore yields high CwC goodness but exactly zero CwSG goodness. d Exact computation for a single CwSG layer. The local activation error propagates backward only through the parameter-free ReLU and RMS normalization steps to form the weight update . The gradient is computed exclusively from spatially and temporally local information and does not rely on physical weight reads.
by
where is the input tensor, the weight tensor, and the 2D convolution operator. The output channels are partitioned into disjoint class groups . In CwC, each class group is assigned a goodness score
4/30
Each score evaluates local classification confidence by measuring the total activation energy within its class-specific channel group. The class k yielding the highest goodness score therefore represents the local prediction of the layer. Because this score depends only on the total activation energy, a spatially uniform map scores as highly as a structured one, and CwC layers may develop nearly uniform activation maps that carry little of the spatial structure convolutional layers are meant to extract (Supplementary Note 3).
CwSG preserves the architecture of CwC but replaces raw activation energy with spatial-gradient energy. Fig. 1c illustrates the distinction: CwC can reward a broad response, whereas CwSG rewards spatial variation within the feature map. The goodness score function becomes the discrete Dirichlet energy corresponding to the seminorm of the activation maps
(3)
with the discrete partial derivatives defined as
Fig. 1d shows how these goodness scores provide both a prediction and a learning signal within the layer. A softmax converts the scores into class probabilities, and the layer minimizes the cross-entropy loss for the ground-truth label y:
Differentiating the CwSG spatial objective transforms the gradient from the amplitude scaling of CwC into a discrete Laplacian (Supplementary Note 6), yielding a local weight update proportional to the negated spatial second derivative of the activations
where is the cross-entropy error of the score vector, and denotes the 2D cross-correlation.
In our convolutional architecture, a parameter-free root-mean-square normalization (RMSnorm) is applied to the pre-activations across output channels at each spatial position, before the ReLU activation (Fig. 1b). This operation fixes the channel energy at each spatial position, so a class group can raise its goodness score only by winning a larger share of a fixed budget, not by inflating amplitudes. Mathematically, the RMSnorm introduces an additional factor into the gradient:
where is a normalization matrix that enforces this cross-channel competition (Supplementary
5/30
Note 6). The gradient depends only on the active layer's input, forward activations, and target label: no error is transported between layers and no transposed weight read is required. Batched training retains only the active layer's local buffers, rather than activations from the full network (see Methods).
Table 1. Full-precision optimization test accuracy of CNN-7 on MNIST, Fashion-MNIST, and CIFAR-10. BP and DFA are trained end-to-end, and the layer-wise methods with the greedy schedule, under the matched per-parameter update budget defined in Methods ( epochs) with stochastic gradient descent (SGD). The batch size is 64. Values are mean one standard deviation over five independent seeds after hyperparameter selection on the validation split (Supplementary Note 11). Bold marks the highest mean accuracy among backpropagation-free methods.
| Algorithm | MNIST | Fashion-MNIST | CIFAR-10 |
|---|---|---|---|
| BP | 99.51 ± 0.05 | 93.27 ± 0.19 | 86.28 ± 1.60 |
| DFA | 89.48 ± 0.43 | 80.50 ± 1.98 | 38.65 ± 1.06 |
| DCL | 98.97 ± 0.07 | 91.41 ± 0.78 | 77.28 ± 1.27 |
| l-DCL | 98.95 ± 0.15 | 91.06 ± 0.65 | 79.11 ± 0.12 |
| CwC | 99.18 ± 0.06 | 91.07 ± 0.64 | 77.77 ± 0.67 |
| CwSG (This work) | 99.34 ± 0.04 | 92.70 ± 0.06 | 83.66 ± 1.24 |
We first evaluate CwSG under ideal numerical updates with a stochastic gradient descent (SGD) optimizer, before introducing any device constraint. All the benchmarked methods use the same CNN-7 architecture (see Methods). The layer-wise methods are trained following the greedy schedule: when layer is under training, earlier layers are frozen, later layers are not evaluated, and only layer is updated (Fig. 1b). This matches the per-parameter budget of the end-to-end baselines (see Methods). All accuracies in this work are averaged over five independent seeds after hyperparameter tuning (see Methods).
As shown in Table 1, CwSG is the strongest backpropagation-free method on every convolutional benchmark. It reaches on MNIST, on Fashion-MNIST, and on CIFAR-10. This performance trails end-to-end BP by only 0.17, 0.57, and 2.62 percentage points, respectively.
The comparison with CwC isolates the effect of changing the local goodness while preserving the same class-to-channel encoding and greedy schedule. CwSG improves over CwC by 0.16 points on MNIST, 1.63 points on Fashion-MNIST, and 5.89 points on CIFAR-10, with the accuracy advantage increasing as the task demands richer spatial representations. Spectral analysis (Supplementary Note 2) confirms the corresponding representation change: CwC activations progressively collapse toward the near-DC band with depth, whereas CwSG retains broadband spatial structure and visibly preserves edges and textures in deep activation maps. On an MLP architecture (see Methods), where neighboring units have no intrinsic geometric relationship, the one-dimensional difference objective depends on an arbitrary ordering of the hidden units and provides no systematic advantage. We therefore treat this experiment as a negative control (Supplementary Note 7).
CwSG tolerates sign-only weight updates
We next test whether CwSG can learn when weight updates no longer carry the gradient magnitude. In analog memories, precise conductance targets can be reached using program-and-verify (PnV) loops,
6/30
Phase-change memory (PCM)

b
Filamentary memristor (FM)
C
d
BP / DFA epoch (end-to-end)
0
25
50
e
BP / DFA epoch (end-to-end)
0
25
50
f
CNN-7 - CIFAR-10

Greedy epoch (layer-wise)
Greedy epoch (layer-wise)
BP DCL I-DCL CwC CwSG
Figure 2. CwSG preserves convolutional accuracy under sign-constrained updates motivated by measured analog programming. a, b Measured conductance trajectories under repeated pulses for 1,189 phase-change memory devices (a) and 1,268 filamentary memristors (b). Fixed-amplitude pulses produce stochastic, state-dependent steps (see Methods, statistics detailed in Fig. 4). c Optimizer mapping to a differential conductance pair. Programming pulses target or based strictly on gradient sign. d CIFAR-10 training trajectories on CNN-7 under full-precision SGD. Layer-wise algorithms follow the bottom greedy epoch axis, where ticks mark successive layers, while BP and DFA follow the top end-to-end axis. All methods train under the matched per-parameter update budget defined in Methods. Lines and shaded regions denote the mean and one standard deviation over five independent seeds. e CIFAR-10 training trajectories under SignSGD, following the layout and matched update budget of d. f Absolute difference in endpoint test accuracy between panels d and e. DFA is omitted because its weak full-precision baseline precludes meaningful measurement.
which alternate programming pulses and readout operations until the target is reached . But this precision comes at the cost of high bit-line voltages, multiple pulse-and-read cycles per update, and reduced device endurance and retention .
An appealing alternative is to exploit the soft programming regime of the devices, in which each update is a single low-voltage pulse without a verification read .
The measured conductance trajectories in Figs. 2a and b illustrate this regime in phase-change memory and filamentary memristors. Repeated identical pulses produce gradual conductance evolution, but the individual steps are stochastic and state-dependent, so a fixed programming pulse does not provide a precise conductance increment proportional to the gradient.
We encode each signed weight in a differential pair of devices such that , where s is a system-level gain hyperparameter. Applying a single fixed-amplitude soft programming pulse then
7/30 restricts the updates to a ternary regime: the positive device is programmed, the negative device is programmed, or the synapse remains unchanged (Fig. 2c). This discrete operation discards the continuous magnitude of the computed gradient, leaving only its sign to determine the update.
To separate the loss of gradient magnitude from device variability, we first use sign-only stochastic gradient descent (SignSGD). For a gradient component , it replaces the SGD update with
Every nonzero update now has magnitude . Weights and gradient computations remain at full precision, and no device noise or state-dependent response is included at this stage.
Table 2. Sign-only update test accuracy of CNN-7 on MNIST, Fashion-MNIST, and CIFAR-10. The protocol is identical to that of Table 1, except that the optimizer is SignSGD.
| Algorithm | MNIST | Fashion-MNIST | CIFAR-10 |
|---|---|---|---|
| BP | 99.15 ± 0.14 | 88.60 ± 1.49 | 60.65 ± 1.43 |
| DFA | 94.99 ± 0.68 | 81.74 ± 0.90 | 44.82 ± 0.30 |
| DCL | 97.88 ± 0.12 | 88.87 ± 0.22 | 66.56 ± 0.41 |
| l-DCL | 97.89 ± 0.23 | 89.67 ± 0.22 | 67.96 ± 0.82 |
| CwC | 98.24 ± 0.22 | 90.17 ± 0.29 | 74.41 ± 0.72 |
| CwSG (This work) | 98.71 ± 0.09 | 91.22 ± 0.19 | 83.26 ± 0.32 |
Under SignSGD, CwSG reaches 98.71% on MNIST, 91.22% on Fashion-MNIST, and 83.26% on CIFAR-10 (Table 2). Relative to its SGD results, the corresponding losses are only 0.63, 1.48, and 0.40 percentage points. The excellent robustness of CwSG against sign-only updates, compared with other methods, is clearest on CIFAR-10, where CwC loses 3.36 points, DCL and l-DCL each lose approximately 11 points, and BP loses 25.63 points (Figs. 2d–f). Changing the local objective therefore improves not only the accuracy reached under SGD, but also how much of that accuracy is retained when update magnitudes are removed.
Two features help interpret these results; class-to-channel supervision and the spatial form of the local objective. The first feature is shared by CwC and CwSG. For a single example without RMSnorm, the weight gradient factorizes into
where is a Hebbian factor computed from the forward pass. The cross-entropy factor is negative for the target class and positive for all other classes. Consequently, the label determines whether SignSGD follows or opposes the sign of the local factor . Each signed update therefore still reinforces the target group and weakens the others; only the magnitude information, which expresses confidence rather than direction, is discarded.
Despite sharing this sign-sufficiency mechanism, CwC and CwSG differ in how their Hebbian factors distribute update directions across the weights. For ReLU (non-negative) layer inputs and activations, CwC's factor is non-negative (Supplementary Note 6). Its nonzero weight updates therefore
8/30 all point upward for a target group and downward for a non-target group. On a balanced K-class dataset, each group encounters K - 1 times as many non-target as target examples: nine to one for ten classes. SGD compensates by giving the rarer upward updates larger magnitudes than the more frequent downward updates, but SignSGD removes this weighting, and leaves CwC with a net downward drift.
CwSG instead asks the layer to strengthen or weaken spatial contrasts, rather than simply raise or lower its overall response. Adding a uniform offset to an activation map leaves its spatial differences, and therefore its goodness, unchanged. Accordingly, the goodness derivative sums to zero over the feature map:
with the finite-difference boundary convention defined in Supplementary Note 6.
To isolate the consequence for weight updates, consider the Hebbian factor before ReLU masking,
(10)
where the correlation is evaluated at a fixed kernel offset, and is the mean of the corresponding input values. The mean term vanishes by Eq. 9, leaving a contribution determined by how input variations align with the activation contrasts. Unlike the non-negative CwC factor, this contribution can take either sign. A non-target example therefore no longer forces a group-wide decrease of weights, and sign-only updates can retain direction to shape the response, instead of only turning its overall activity up or down (Supplementary Note 4).
This argument identifies a source of robustness and not a formal guarantee of drift-free weight updates. ReLU masking, RMSnorm, and batch averaging modify the sign structure; all reported simulations include these operations and use the full gradients (Supplementary Note 6).
BP layers lack this structural mechanism because the error is a weighted mixture of downstream class errors. Under SignSGD, fixed-amplitude updates in upper layers can flip the signs of downstream gradients, causing a compounding failure with depth.
CwSG limits sensitivity to write noise
Retaining accuracy under fixed-magnitude updates does not yet establish robustness to errors in those updates. We next compare BP and CwSG on CIFAR-10 using CNN-7 and CNN-12 under controlled Gaussian programming-noise models , pairing each optimizer with the noise of the programming scheme it represents (see Methods).
For SignSGD, we add noise to each applied weight increment: with . For a nominal magnitude , the weight standard deviation per committed write is . We therefore compare the learning rules at the same (see Methods).
Fig. 3b reports the results of this first study with hyperparameters selected as detailed in Supplementary Note 11. Under SignSGD, as discussed in the previous section, BP is penalized before any
9/30

b

CIFAR-10 — CNN-12
C
Ir-normalized write noise (update noise)
d
e
Ir-normalized write noise (update noise)
f

write noise (target noise)
Figure 3. CwSG requires fewer weight updates than backpropagation (BP) and is intrinsically more robust to write noise. a Update-weight noise injection model with emulating state-blind soft SET and RESET programming. b Test accuracy against learning-rate-normalized update noise for CNN-7 and CNN-12 on CIFAR-10 under SignSGD. The curves show the average test accuracy over five independent runs, and the panels below display the absolute accuracy difference between CwSG and BP. Hyperparameters are optimized for the noiseless condition of each rule and kept identical under noise. c Test accuracy against the average number of updates per weight for the CNN-7 StoSignSGD sweep shown in c. Dashed guides connect matched physical noise levels and are annotated with the update ratio between BP and CwSG. d Test accuracy against learning-rate-normalized update noise under StoSignSGD, following the conventions of b. e Target-weight noise injection model emulating iterative program-and-verify schemes. f Test accuracy under full-precision SGD against target noise , following the conventions of b.
noise is injected: its noise-free accuracy falls to 60.6% on CNN-7 and 45.0% on CNN-12, down from 86.3% and 88.9% under full-precision SGD. As the noise variance increases, the compounding error overwhelms the global gradient, dropping BP to near random chance by on CNN-7 and by 0.01 on CNN-12. CwSG retains substantially more accuracy. At , it maintains 61.5% on CNN-7 and 70.4% on CNN-12, and it approaches chance level only at .
SignSGD commits a pulse for every candidate update. To reduce this programming cost, we next test a stochastically gated SignSGD (StoSignSGD) optimizer, which issues each pulse with a probability
10/30 that increases with the gradient magnitude:
where is a gating gain hyperparameter governing saturation. Every committed write remains a fixed-magnitude event, while the expected update in the unsaturated regime is directly proportional to the continuous gradient (see Methods). In the literature, stochastic pulse-coding schemes exploit the same probabilistic quantization but encode the update magnitude in the number of applied pulses , whereas here it is carried entirely by the probability of committing a single pulse or none.
The results using this StoSignSGD (Fig. 3d) substantially change this picture with regard to SignSGD. Because StoSignSGD recovers the continuous gradient in expectation, it restores BP to near its noise-free baseline (84.3% on CNN-7, 87.2% on CNN-12) and gives it a lead over CwSG of up to 6.9 percentage points in the low-noise regime ( ). This advantage does not survive high programming noise, and the hierarchy inverts at on both architectures, where CwSG establishes a lead of more than 10 percentage points on CNN-7 and maintains it through the end of the sweep. The gating also benefits CwSG itself, improving its accuracy at on CNN-7 from 37.0% under SignSGD to 45.2%, as committing fewer updates reduces the accumulated write noise for both learning rules.
StoSignSGD also shows a strong programming-cost advantage (Fig. 3c). Compared to SignSGD, which applies 39,100 updates per weight, StoSignSGD reduces the total number of applied pulses by a factor of 17 under BP (2,303 updates per weight). CwSG sparsifies the updates even further, achieving a 37.4-fold reduction (1,046 updates per weight). At matched noise levels, CwSG therefore reaches comparable accuracy while committing roughly two to eight times fewer pulses per weight, a reduction that translates directly into programming-energy savings.
We next test whether the noise-resilience advantage of CwSG persists when updates retain their magnitudes directly through SGD. For this study, we use target noise, which perturbs the desired stored weight rather than the increment (Fig. 3e): . This equation provides a simplified model of residual error after programming a conductance target, as in PnV-based schemes. Here, measures fractional error relative to the target weight. Fig. 3f shows that under SGD, BP and CwSG start on par in the noise-free case, but CwSG overtakes BP for , and its lead widens substantially with the noise level. At , BP falls to chance level on CNN-12, while CwSG still reaches 33.9%.
The same hierarchy extends to readout noise ( ) for all three optimizers; on CNN-7, CwSG maintains up to a 45-point advantage over BP across the entire SignSGD update-noise grid (Supplementary Note 9).
This hierarchy stems from the dataflow of BP, where gradients are computed through cascading transposed weight matrices, so every write perturbation persists as an additive error that re-enters subsequent backward passes and compounds geometrically with depth (Supplementary Note 5). The local updates of CwSG decouple the layers and bypass this inter-layer noise propagation entirely. In addition, the discrete Dirichlet energy acts as a spatial high-pass filter that suppresses the low-frequency spatial noise imprinted by imperfect updates, yielding a higher signal-to-noise ratio than the raw
11/30 amplitude goodness of CwC (Supplementary Note 3).
CwSG trains with measured PCM and FM programming trajectories
We next test whether the advantages observed under Gaussian noise persist when synaptic updates follow measured device responses. The simulations use programming trajectories recorded from 1,189 fabricated phase-change memory (PCM) devices and 1,268 filamentary memristors (FM) (Fig. 4a and b; see Methods).
For learning, each technology is operated in a single programming direction. In PCM, successive low-voltage soft SET pulses increase conductance through progressive crystallization, with a steep initial rise followed by saturation near 190 S over the measured 10,000-pulse sequence (Fig. 2a). In FM, soft RESET pulses progressively decrease conductance through partial dissolution of the conductive filament. The measured 5,000-pulse trajectories begin near 90 S and show a more linear decrease (Fig. 2b).
The mean single-pulse conductance changes are +14.9 nS for PCM and -3.2 nS for FM. Both technologies exhibit heavy-tailed step distributions, with large increments occurring substantially more often than in the Gaussian reference (Fig. 4c). The spread of the increments also varies markedly between devices (Fig. 4d). These measurements therefore introduce state-dependent programming behavior, heavy-tailed programming steps and device-specific variability into the learning evaluation.
Each simulated weight is represented by a differential pair, , using trajectories from two distinct measured devices (Fig. 4e). Because the networks contain many more weights than the characterized device pools, measured trajectories are reused approximately equally across the network, but a trajectory is never paired with itself (see Methods). Fig. 4f illustrates the corresponding crossbar mapping: each convolutional layer maps to a dedicated array region.
We train the wide CNN-7W architecture (see Methods) on MNIST and SVHN with StoSignSGD. Hyperparameters are optimized independently per algorithm and per technology. The update gating gain controls the probability of applying a programming pulse.
On MNIST (Figs. 5a and d), CwSG and BP reach similar accuracies on both technologies. The difference emerges in programming cost. On PCM, BP uses an average of 8.0 pulses per device over training, compared with 16.2 for CwSG, because the global gradients of an easily fitted task vanish after the first few epochs. On the noisier filamentary memristors, this hierarchy inverts, with CwSG requiring nearly three times fewer pulses than BP.
On the harder SVHN dataset (Fig. 5b, and c), with PCM, CwSG reaches 82.5% accuracy using only 6.4 pulses per device, whereas BP reaches 82.2% using 378 pulses. Both remain below their full-precision baselines of 93.6% and 95.1%, respectively, but CwSG matches BP's accuracy with 59-fold fewer programming events.
On FM, the benefits of CwSG extend to accuracy (Fig. 5e, and f). CwSG reaches 84.9%, whereas BP reaches only 31.5%, a gap of 53.4 percentage points. CwSG still uses fewer pulses: 1,688 per device, compared with 3,279 for BP.
Several lessons emerge from these results. In all cases except MNIST on PCM, CwSG uses fewer programming pulses while achieving similar or higher accuracy.
On SVHN, this advantage takes two distinct forms: far fewer writes at comparable accuracy on
12/30

b
C
Step distribution (all devices)

d
Device-to-device variability
e Differential conductance cells
f Simplified Topology for AIMC in-Situ Local Learning
Figure 4. Physical substrate and statistical characterization of fabricated memory arrays. a, b Transmission electron microscopy images of a filamentary memristor from the characterized array (a) and of a representative phase-change memory device of the same technology generation (b), both integrated in the back end of line of a hybrid memristor–CMOS process, alongside optical micrographs of their respective 1T1R arrays (see Methods). c Distribution of normalized conductance steps z across all devices. d Device-to-device variability of the per-device step standard deviation normalized to the median. e Differential-pair weight mapping , where s is a system-level gain hyperparameter. The illustrated electrical connections route a single, fixed-amplitude, sub-1 V programming pulse (see Methods) to either or . f Crossbar implementation for CwSG training. Each convolutional layer unrolled via im2col maps onto its own memristive array. The RMSnorm and ReLU activation are computed digitally, allowing each layer to produce its per-class goodness locally for both weight updates and final prediction.
PCM, and substantially higher accuracy with fewer writes on FM. These observations are consistent with the reduced sensitivity of CwSG to imperfect programming discussed above. By contrast, the noise-sensitivity of BP is amplified by realistic statistics: the non-ergodic, high-kurtosis device noise and asymmetric updates trap BP in a compensatory cycle, forcing it to spend additional pulses to correct the perturbations injected by its own preceding updates. Note that the accuracies reported are lower than those of the ideal model at matched noise level, indicating that realistic device statistics
13/30
MNIST — CNN-7W

b
Phase-change memory (PCM)
SVHN — CNN-7W
C
End-to-end epoch
25
50
d
MNIST — CNN-7W

e
Filamentary memristors (FM)
SVHN — CNN-7W
f
End-to-end epoch
25
50
Figure 5. Device-calibrated training of CwSG and backpropagation (BP) on analog devices. All panels show the CNN-7W architecture trained at batch size 256 with StoSignSGD under the matched per-parameter update budget defined in Methods: N greedy epochs per layer for CwSG, CwC, and DCL and N end-to-end epochs for BP, with N=30 on MNIST and N=50 on SVHN. a MNIST test accuracy. b SVHN test accuracy against average pulses per device on phase-change memory. Filled regions mark the best accuracy at each pulse budget, demonstrating that excess pulses do not yield further improvements. c SVHN test accuracy throughout training for the selected configurations marked by stars in b spanning 300 cumulative greedy epochs for CwSG and 50 end-to-end epochs for BP. Dips mark layer transitions (see Methods). d MNIST programming pulses per device. e, f SVHN test accuracy and training trajectories on filamentary memristors, following the exact layout conventions of b and c.
penalize global error transport more severely than idealized assumptions suggest.
The device comparison reveals a second lesson: the response that gives the highest accuracy depends on the learning rule. BP performs much better on PCM than on FM, whereas CwSG reaches 2.4 percentage points higher accuracy on FM. The contrasting conductance trajectories offer a possible explanation. PCM's saturating response provides progressively smaller increments, while FM maintains a more uniform update granularity. CwSG's robustness may allow it to exploit the latter despite substantial programming variability.
The comparisons with CwC and DCL show that layer-wise training alone does not reproduce
14/30
CwSG's performance: both remain below CwSG in the PCM and FM sweeps (Fig. 5b, and e). CwC is a particularly informative comparison because it shares CwSG's class-to-channel supervision and greedy schedule. The improvement therefore highlights the importance of the local objective, not simply the removal of network-wide backpropagation.
The accuracy advantage of CwSG extends to CIFAR-10 (Supplementary Note 8). On PCM, CwSG reaches 58.6% versus 50.0% for BP while using 5.1 rather than 62 pulses per device, approximately a 12-fold reduction. On FM, CwSG reaches 59.4% with 1,415 pulses per device versus 40.2% on BP. Thus, CwSG improves accuracy on both technologies, while the programming-cost advantage depends on the task and device response.
CwSG avoids quantized transposed array reads
Analog training must accommodate not only imperfect programming, but also finite-resolution peripheral converters. Digital-to-analog converters (DACs) drive the array inputs, and analog-to-digital converters (ADCs) digitize the resulting outputs; their precision contributes to the accelerator's energy and area requirements . We therefore evaluate converter quantization at the SVHN operating points of Figs. 5c and f, using the same device-calibrated synapses.
At each layer, the forward DACs and ADCs are quantized to b bits, using the drive and readout ranges specified in Methods. CwSG requires only these forward array interfaces. BP additionally evaluates , which requires a second bank of DACs and ADCs for driving an error signal into the array and digitizing the transposed-product output (Fig. 6e).
To numerically isolate the effect of these additional conversions, we compare two BP configurations. BP (FP32 bwd) uses b-bit forward interfaces but leaves the backward products free of converter quantization. BPq additionally quantizes the backward drive and readout to b bits.
On PCM, eight-bit forward conversion has little effect on accuracy: CwSG and BP (FP32 bwd) remain within one percentage point of their respective ideal-converter results (Fig. 6a). Quantizing BP's backward interfaces introduces an additional penalty. BPq falls to near-chance accuracy at six bits and, at eight bits, remains approximately eight percentage points below the ideal-backward BP control. The gap narrows as converter resolution increases. Thus, a forward resolution sufficient to preserve classification accuracy does not necessarily suffice for backward error transport under the same converter model.
The eight-bit training trajectories illustrate this distinction (Fig. 6b), while the pulse counts show that CwSG retains its low programming activity (Fig. 6c). The accuracy advantage of CwSG on FM also persists with eight-bit forward conversion (Fig. 6d). Converter quantization therefore does not erase the advantages observed with the measured device trajectories.
Local updates on small batches
Layer-local training removes the need to retain activations across the network, but a buffer still needs to memorize the activation of the active layer over a batch (see Methods). Reducing the batch size lowers this storage requirement while averaging each learning decision over fewer examples. We therefore test whether CwSG remains effective when updates are computed from small batches.
We first train the CNN-7W architecture under StoSignSGD on MNIST at batch sizes ranging from
15/30

b
C
d
e
Figure 6. Converter resolution and the architectural cost of a quantized backward pass. a SVHN test accuracy against converter resolution b on phase-change memory. Evaluation uses CNN-7W with device-calibrated synapses, batch size 256, StoSignSGD, and 50 epochs per layer for CwSG, and 50 epochs end-to-end for BP and BPq. Plotted values show the five independent seeds and their mean. BP (FP32 bwd) and CwSG (no bwd) quantize the forward drive and readout and do not quantize any term in the gradient computation. Fully quantized BP (BPq) restricts both backward drive and readout to b bits. b Test accuracy throughout training at 8 bits, following the trajectory conventions of Fig. 5c, with the layer under training labeled. c Programming pulses per device against converter resolution on phase-change memory. d SVHN test accuracy against converter resolution on filamentary memristors. e Peripheral circuitry requirements for intermediate layers. The forward pass (CwSG) requires one digital-to-analog converter per driven row and one analog-to-digital converter per column. Fully quantized BP (BPq) additionally drives the error onto the columns and reads the rows, forcing the duplication of both banks on opposite edges to create a bidirectional crossbar.
256 down to a single sample (see Methods). Under full-precision weights, reducing the batch size barely affects either rule, with the accuracy staying within 0.7 points for CwSG (from 99.3% to 98.6%) and 0.4 points for BP (from 99.4% to 99.0%).
The PCM simulations reveal a much larger difference (Fig. 7a). BP and CwSG reach similar accuracies at batch size 256, but CwSG performs better at batch sizes 64, 16, and 4 while using between 4-fold and 29-fold fewer programming pulses. At batch size one, CwSG still reaches 91.1%, compared
16/30

b
Figure 7. MNIST accuracy at different batch sizes for CwSG and backpropagation (BP) on analog devices. a, b MNIST test accuracy and programming pulses on CNN-7W with phase-change memory (a), and filamentary memristors (b) for five independent seeds with one standard deviation represented as a vertical bar. Training is done under StoSignSGD under the matched per-parameter update budget defined in Methods: N greedy epochs per layer for CwSG and N end-to-end epochs for BP, with batch size 1 (N=1), 4 (N=3), 16 (N=5), 64 (N=10), and 256 (N=30).
with 72.3% for BP.
BP is even more sensitive in the FM simulations (Fig. 7b). Both rules reach 96.3% at batch size 256, but at batch size one BP falls to 56.5%, with a large seed-to-seed spread. CwSG retains 93.2%, only 3.1 percentage points below its large-batch accuracy. Thus, the MNIST single-sample configurations separate the learning rules much more strongly with measured programming trajectories than with ideal numerical updates.
The harder SVHN task reveals both the advantage and the limits of small-batch local learning (Supplementary Note 10). With ideal numerical updates, both rules remain within 3.5 percentage points of their batch-size-256 accuracies under the tested schedules. On PCM, CwSG reaches 41.1% at batch size one using approximately nine pulses per device, whereas BP falls to near-chance accuracy. Although this remains a substantial advantage, CwSG also loses considerable accuracy relative to its large-batch result. On FM, CwSG still learns at batch size 64, but both methods approach chance-level performance at batch size one.
The combination of two constraints is responsible for the collapse of BP on both technologies. The few-sample updates and stochastic programming can be accommodated individually, but together they remove the gradient averaging that shields the optimization from the update stochasticity. In these conditions, the weights undergo a continuous random walk, and BP re-amplifies the accumulated perturbation through the error propagation through the transposed weight at every gradient computation. Under the same constraints, CwSG confines the perturbations to its active layer, avoiding the propagation of the gradient (Supplementary Note 5).
17/30
Discussion
Robust analog learning depends not only on where the learning signal is computed, but also on what each layer is trained to reward. CwSG retains the class-to-channel supervision and layer-local training of CwC while replacing activation-amplitude goodness with spatial-gradient energy. Under the common architectures and training protocols evaluated here, this change improves both convolutional accuracy and robustness to imprecise updates. On CIFAR-10, discarding gradient magnitudes reduces accuracy by only 0.40 percentage points for CwSG, compared with 3.36 points for CwC and approximately 11 points for DCL and l-DCL. The comparisons with CwC and DCL under measured device trajectories reinforce the same conclusion: layer-wise training alone does not reproduce the robustness obtained by redesigning the local objective.
These results complement our previous experimental demonstration of supervised Forward-Forward and competitive-forward learning with single-pulse, sub-1 V RESET programming in FMs . That demonstration trained fully connected classifier layers on features from a fixed, pretrained convolutional backbone. CwSG extends learning to the convolutional representations themselves.
The spatial objective connects representation advantage quality to update structure. Amplitude-based goodness can reward a spatially uniform class-specific response, whereas adding a uniform offset leaves CwSG's goodness unchanged. Spectral analysis shows that CwSG preserves broadband spatial structure across depth (Supplementary Note 2). This offset invariance gives the goodness derivative a zero spatial sum. A simplified analysis shows how this property allows update directions to reflect spatial contrasts (Supplementary Note 4).
The absence of inter-layer backward transport provides a separate advantage, shared with other layer-local methods. It removes the dependence of an earlier layer's learning signal on downstream weights, without preventing imperfect upstream weights from altering the forward representations. CwSG therefore avoids transposed crossbar reads and their associated backward converter requirements. The converter experiments show that its accuracy can be retained with eight-bit forward interfaces. Its greedy schedule also replaces network-wide activation retention with buffers for the active layer (see Methods), creating a memory saving that could be used either to reduce on-chip storage or to increase batch averaging.
The comparison between PCM and FM reveals a distinct accuracy-programming-cost trade-off: PCM requires fewer learning pulses on all three datasets and also provides higher accuracy on MNIST. FM increases mean accuracy by 2.4 percentage points on SVHN and 0.8 points on CIFAR-10, but requires approximately 264 and 277 times as many pulses, respectively. Among these configurations, PCM is the better choice when minimizing programming activity, whereas FM provides a modest additional accuracy margin on the two harder tasks.
In the literature, analog training schemes using high-precision digital accumulators or auxiliary analog arrays compensate for stochastic programming while retaining end-to-end backpropagation. CwSG supports learning through direct, unverified programming on forward crossbars, without auxiliary arrays or program-and-verify circuitry. Nevertheless, compensation mechanisms could also be combined with local learning to improve update fidelity.
Several algorithmic constraints delimit the present results. The demonstrated advantage relies on
18/30 spatially structured feature maps; the one-dimensional analogue tested on fully connected networks provides no systematic improvement (Supplementary Note 7). The class-to-channel encoding also requires at least one channel per class in every supervised layer, making narrow layers difficult to reconcile with large class counts. Class grouping and adaptive assignments provide possible directions for relaxing this constraint, but their compatibility with stochastic programming remains to be evaluated.
Local gradient formation, normalization, goodness evaluation, and stochastic pulse selection remain peripheral operations, evaluated in full precision here (Supplementary Note 6). Their arithmetic, memory traffic, and random-number generation, together with the additional forward passes through the frozen layers that the greedy schedule requires, must be included when translating reduced pulse counts into system-level energy savings. Intrinsically stochastic magnetic tunnel junctions could be explored as a source for the stochastic pulse selection of StoSignSGD . Our evaluation replays measured single-device trajectories. Closed-loop training on an integrated crossbar, with array-level parasitics and the local learning periphery in place, is the natural next step.
Taken together, these results show that precise programming is not the only route to effective analog learning. CwSG illustrates how matching each layer's objective to spatial representations and simple programming operations supports learning with imperfect analog synapses.
Acknowledgements
This work benefited from France 2030 government grants managed by the French National Research Agency (ANR-22-PEEL-0010, ANR-22-PEEL-0013, ANR-23-PEIA-0002). This project was provided with computing HPC and storage resources by GENCI at IDRIS thanks to the grant 2025-AD011016471 on the supercomputer Jean Zay's A100-H100 partition. Large language models (OpenAI ChatGPT, Anthropic Claude) were used for copyediting parts of this manuscript.
Author contributions statement
T.D. proposed the spatial gradient objective, developed the software framework, and performed the full-precision and device-calibrated simulations. A.R. conducted the analysis and characterization of the filamentary memristor soft RESET regime. G.N., G.B., and J.M.L. fabricated the phase-change memory devices and conducted the soft SET programming regime analysis. A.R. and J.M.L. performed the phase-change memory characterization. J.M.P., J.O.K., and D.Q. supervised the project. T.D. wrote the initial version of the manuscript. All authors discussed the results and contributed to the final manuscript.
Competing interests
Damien Querlioz is a Guest Editor of the Collection Future Computing: Paradigms and Design for Next Generation Applications. Damien Querlioz was not involved in the journal's review of, or decisions related to, this paper. The remaining authors declare no competing interests.
19/30
Data availability
The data measured in this study are available from the corresponding author upon request.
Code availability
The software programs developed for this work are available online: https://github.com/INTEGNANO/LL-CwSG.
Methods
Network architectures
Table 3. Architecture conventions. All variants share the same feature block (bias-free convolution or dense projection, parameter-free RMS normalization, ReLU). Convolutional variants downsample with max pooling. The parameter count covers the bias-free feature block (weights of the convolutional/hidden layers). For BP and DFA, the linear readout adds a negligible, dataset-dependent term (e.g. 2,560 for CNN-7 at 10 classes). CNN first-layer parameter counts assume a 3-channel input, while MLP-5 assumes a flattened input.
| Architecture | Hidden layers | Pooling | Parameters | Hidden layer width |
|---|---|---|---|---|
| MLP-5 | 4 | — | 1.14 M | |
| CNN-7 | 6 | every 2 layers | 1.70 M | 64, , |
| CNN-7W | 6 | every 2 layers | 6.79 M | 128, , |
| CNN-12 | 11 | every 4 layers | 10.5 M | 64, , , |
Architectures are denoted CNN-X or MLP-X, where is the number of trainable feature layers and the final stage is the classification mechanism of the learning rule under evaluation. All trainable layers throughout this work (convolutional, fully connected, and the optional classifier head), use weight matrices without bias terms, so that, together with the parameter-free RMS normalization, every trainable parameter of the network is a weight that maps directly onto a differential device pair in the analog implementation. All evaluated networks are plain feedforward architectures, in line with prior forward-only learning studies. Residual connections would introduce cross-layer data paths whose activations must be buffered across layer boundaries and merged downstream, breaking the strictly layer-local data flow of the greedy scheme. Every convolutional layer applies a convolution with stride 1 and same padding, initialized with the He-normal scheme, followed by RMS normalization and a ReLU activation. Spatial downsampling is performed exclusively by max pooling with stride 2, inserted after every second convolutional layer (after every fourth layer for CNN-12, which reaches the same three spatial stages at greater depth). The convolutional stack is resolution-agnostic and is applied unchanged to every dataset. After the last convolutional layer, features are aggregated by global average pooling. BP and DFA require a fully connected softmax classifier appended after this aggregation, as both rules derive their error signal from a global network output. CwC, DCL, l-DCL, and CwSG require no classifier layer, since DCL and l-DCL read out class scores through their dictionary of embeddings, while CwC and CwSG obtain a class prediction in every layer from the
20/30 per-class goodness. Table 3 lists the layer widths of each variant. The Wide variant scales all channel widths uniformly by a factor of 2, leaving depth, pooling, and every other convention unchanged.
MLP-5 follows the same conventions with fully connected layers. The input image is flattened and processed by four hidden layers of 500 units, each applying a bias-free dense projection initialized with the He-normal scheme, followed by the same parameter-free RMS normalization and ReLU activation; the classifier requirement is identical, with a classifier appended for BP and DFA only. For CwSG on fully connected layers, where no 2D spatial neighborhood exists, the spatial-gradient goodness is replaced by its 1D analog, computed from central differences between neighboring neurons within each class group.
Optimizers
Stochastic Gradient Descent (SGD)
To evaluate the learning algorithms, we implement three optimization schemes. As a baseline, full-precision training is performed using SGD, which could be applied to devices using a costly program-and-verify (PnV) scheme. It applies continuous updates proportional to the gradient , scaled by a learning-rate hyperparameter , such that
Sign-only Stochastic Gradient Descent (SignSGD)
To model physical crossbar arrays where programming events are restricted to single, fixed-amplitude pulses (soft SET and RESET regimes), we constrain the updates using SignSGD. This optimizer discards the gradient magnitude and retains only its direction, yielding
Stochastic Sign-only Stochastic Gradient Descent (StoSignSGD)
To bridge the performance gap for algorithms reliant on the gradient magnitude without violating the requirement for single-pulse physical updates, we use a stochastic StoSignSGD optimizer. This optimizer gates the fixed-amplitude pulses using a Bernoulli mask whose firing probability scales with the gradient magnitude, such that
where is a gating gain hyperparameter governing saturation. In the unsaturated regime ( ), the expected update recovers a step proportional to SGD, with effective learning rate :
StoSignSGD therefore encodes the gradient magnitude into the stochastic firing rate of constant-amplitude pulses.
21/30
Greedy training schedule
All layer-wise rules train under the greedy schedule unless stated otherwise. Layers are trained strictly sequentially. Layer receives its full update budget of N epochs, while the already-trained layers act as a frozen read-only feature extractor and the layers above remain at their random initialization. Because every objective is purely local, no forward pass beyond layer is required during its training phase, and no device outside array is programmed. The update budget is matched to the end-to-end baselines by construction, since N epochs per layer under the greedy schedule and N end-to-end epochs give every trainable parameter the same number of update opportunities. During greedy training, the test accuracy is probed at the layer currently being trained through its per-layer prediction readout. On hardware, this schedule implies that each crossbar is written during a single contiguous phase and only read afterward.
Batch storage
Let denote the number of activations at layer for one sample, the number of inputs for the network, the batch size, and the network depth. Backpropagation retains the output of every layer for its backward pass, requiring
Greedy training of layer instead retains only the input and output of the active layer, while the frozen feature extractor (layers 0 to ) discards its activations as soon as the next layer is computed. This gives
Local activation storage is therefore bounded by the most demanding layer and independent of depth, whereas that of BP grows with depth L.
These buffers are sufficient to form the batched weight update, because the batch gradient of the active layer is the sum of its per-sample gradients. It can be computed either directly from the m buffered inputs and local errors counted in Eq. 17, or by processing the samples one at a time, summing their gradients into an accumulator with one entry per weight of the active layer. The latter replaces the batch activation buffer by a memory of size , with the number of active-layer weights. In both cases, no network-wide computation graph is ever stored.
Class-to-channel encoding
For CwC and CwSG, the output channels of each convolutional layer (units of each hidden layer for MLP-5) are partitioned into K disjoint groups, where K is the number of classes, and the standard one-hot encoding maps each class to one group. This encoding requires the channel count of layer to be a multiple of K. When it is not, the residual channels are excluded from the class mapping (for example, 4 of the 64 conv1 channels on CIFAR-10). They are however included in the normalization and gradient computation, and therefore receive non-zero updates. This one-hot construction breaks down entirely once the number of classes exceeds the width of a layer ( ), since not every class can be assigned a channel, and it becomes wasteful whenever K is large compared
22/30 to , as each class is then represented by very few channels.
Noise-injection strategy
All three noise models perturb the weights multiplicatively with i.i.d. zero-mean Gaussian variables , applied element-wise, and differ only in which quantity carries the perturbation and when it is drawn. The two programming models (update and target noise) inject noise exactly once per optimizer step, at the moment the optimizer's update is committed to the stored weights, so a parameter that receives no update at a given step receives no noise either.
Update noise, used for the SignSGD and StoSignSGD experiments, is implemented as , so the perturbation scales strictly with the magnitude of the applied update. Because sign-based optimizers apply fixed-magnitude steps , the absolute noise injected per committed write has standard deviation in weight units. We therefore sweep the learning-rate-normalized level , implemented by dividing the injected perturbation by the tuned learning rate of each algorithm, so that a given produces the same physical per-write perturbation for every learning rule even though the tuned of BP and CwSG differ by more than an order of magnitude. Without this normalization, the same nominal would inject absolute noise proportional to each rule's learning rate, and the comparison between algorithms would be confounded by their hyperparameters. Under StoSignSGD, the Bernoulli gate acts before the injection, so coordinates that emit no pulse at a given step receive neither an update nor noise, making the injected noise update-gated exactly as in a pulse-based write scheme.
Target noise, used for the SGD experiments, is implemented as , so the perturbation scales with the programmed target weight and maintains a constant signal-to-noise ratio with respect to the stored value, as achieved by PnV schemes. The swept level requires no learning-rate normalization, since the perturbation is anchored to the weight magnitude rather than to the update. The noise is applied to every weight written at the given step.
Readout noise is implemented as and is purely transient, since the stored weights are never modified. A fresh, independent noise tensor is drawn for every input sample and for every physical access to the array, in both training and evaluation. Forward and backward passes constitute separate reads, so backpropagation error traverses an independently perturbed , while the weight gradient is computed against the forward-pass realization. Read noise is applied to every weight-bearing operation, including all convolutional kernels and the dense readout.
Device characterization
Filamentary memristors
Filamentary memristor conductance trajectories were measured on a fabricated crossbar array , a one-transistor-one-resistor (1T1R) architecture integrating hafnium oxide ( ) memristive devices over a 130 nm complementary metal-oxide-semiconductor (CMOS) front end. Each 300 nm-diameter device features a stacked configuration consisting of titanium nitride (TiN), , titanium (Ti), and a top TiN electrode. Source lines are shared by adjacent cells, and the array is accessed in direct analog mode for both reading and programming. With differential pairing, its 8,192 devices implement up to 4,096 synapses. Devices were formed with a fixed-amplitude scheme rather than a
23/30
Table 4. Programming and read conditions for the characterized memory arrays. Word line (WL), bit line (BL), and source line (SL) voltages are provided alongside the exact pulse timing profile: rise time (), plateau duration (), and fall time (). The soft programming operations (bold) constitute the strictly fixed-amplitude, unverified updates used for experimental measurements.
| Technology | Operation | Applied Voltages (V) | Pulse Timing | ||||
|---|---|---|---|---|---|---|---|
| WL | BL | SL | (ns) | (ns) | |||
| Filamentary | Forming | 2.8 | 2.4 | 0 | 100 | 10 s | 100 |
| Memristors (1,268 devices) | SET | 2.5 | 2.0 | 0 | 100 | 50 s | 100 |
| RESET | 4.5 | 0 | 2.0 | 100 | 1 s | 100 | |
| Soft RESET | 4.5 | 0 | 0.9 | 100 | 600 ns | 100 | |
| Read | 4.5 | 0.2 | 0 | 100 | 5 s | 100 | |
| Phase-Change | RESET | 4.8 | 0 | 20 | 500 ns | 20 | |
| Memory (1,189 devices) | Soft SET | 1.0 | 0.5 | 0 | 20 | 100 ns | 700 |
| Read | 4.8 | 0.4 | 0 | 10 | 1 s | 10 | |
Swept from 0.1 V to 4.9 V in 0.2 V increments.
voltage ramp: identical pulses were applied repetitively (one to five shots) until conduction appeared, followed by three SET-RESET wake-up cycles that reinforce a thick, stable filament and initiate a progressive, approximately monotonic low-voltage RESET slope. The update scheme exploited in this work is not precise conductance targeting through iterative PnV loops, but a low-stress, state-agnostic update that gradually decrease conductance under identical sub-1 V RESET pulses. The 0.9 V amplitude balances the two failure modes of the regime, as lower amplitudes shrink the per-pulse decrement below the stochastic variability and degrade linearity, while higher amplitudes trigger premature filament dissolution, with single pulses dropping the conductance by more than 25 S on 20.3% of devices at 1.0 V, against 2.6% at 0.9 V and none at 0.8 V. Beyond roughly 2,000 to 3,000 RESET pulses, the trajectories grow markedly more variable. The statistics used in the device-calibrated simulations are derived from 5,000 RESET pulses at 0.9 V and 600 ns duration (Table 4) applied to a cohort of 1,268 randomly selected devices across the array; the full optimization of this programming regime is described in ref.
Phase-change memory
Phase-change memory (PCM) conductance trajectories were measured on 1T1R cells integrated into a 4 kb crossbar array, fabricated in the back-end-of-the-line (BEOL) of a 130 nm CMOS process. The devices employ a 300 nm “Wall” integration architecture, but omit the germanium nitride (GeN) thermal confinement layer used in more highly scaled iterations of this technology. To establish a uniform high-resistance amorphous baseline, each device is first initialized using a staircase RESET sequence. This sequence applies 25 pulses at a constant word-line voltage of 4.8 V while sweeping the bit-line voltage from 0.1 V to 4.9 V in 0.2 V increments (Table 4), with a non-disturbing read operation after each step. Instead of targeting precise conductance values through PnV loops, the update scheme exploited in this work relies on state-agnostic, single-pulse updates that gradually increase conductance via progressive crystallization of the germanium-antimony-telluride (GST) active volume. Following initialization, devices are subjected to 10,000 identical soft SET pulses (word-line voltage V,
24/30 bit-line voltage . The extended 700 ns fall time of these pulses facilitates gradual structural relaxation, driving a monotonic, cumulative increase in conductance. To trace the exact conductance evolution used in the network simulations, a read operation ( ) is interleaved between successive programming pulses. The device-calibrated simulations use these measured 10,000-pulse trajectories, acquired from a cohort of 1,189 randomly selected devices across the array.
Weight encoding
To represent signed values, each weight is encoded using a differential conductance pair with a positive and a negative device such that
where s is a system-level gain hyperparameter identical across all cells.
Because the network contains far more weights than the pools of measured phase-change and filamentary devices, the differential pairs are assigned by sampling without replacement. Each weight receives two devices drawn at random from the pool, and once too few devices remain to form a pair, the full pool is restored and reshuffled before the assignment continues, until every weight is mapped. Measured devices are therefore reused across the network, each an approximately equal number of times, while every differential pair is always formed from two distinct physical devices.
No initialization programming is carried out on the differential pair; the initial analog weights are determined by the state of the devices after a RESET operation (Table 4).
Data augmentation
CIFAR-10 is augmented with a standard augmentation pipeline. Each training sample receives zero padding (4 pixels) followed by random cropping, and a random horizontal flip. The augmented inputs are then normalized before being fed to the network. The augmentation is applied at runtime and resampled independently at every epoch.
Peripheral converter resolution
Every layer’s matrix multiplication is driven and read at b bits by DACs and ADCs. The remaining computations are not quantized by the converter models.
Drives are unipolar and convert the input of each layer; the input of the first layer is scaled to . RMS normalization sets each position's channel vector to unit root-mean-square before the rectifier, so a fixed drive range serves each interface: 4 for every hidden array, 1 for the network input, and 2 for the head, whose drive is a spatial mean of rectified activations. A drive spreads levels over its range with step .
A readout digitizes the pre-activations, before normalization and ReLU, over levels on with step , rounding to the nearest code and clipping at . With denoting the number of products a column accumulates, for a convolution and the last-layer channel count (512) for the head,
25/30
Both quantizers use an unclipped straight-through estimator: the backward pass treats each quantizer as the identity, assigning a gradient of one everywhere, including for saturation conversions. BP reads its error from the same arrays driven during the forward pass, which requires a second pair of bipolar converter banks: a drive presenting the error so that the array computes , and its readout. Following the backward implementation of AIHWKit , the error is divided by its absolute maximum before the drive, and the digital result is multiplied back after the readout, so the drive spans and the readout keeps the fixed range of the forward pass. Two BP configurations are defined. BP (FP32 bwd) is a numerical control in which the backward matrix products are evaluated without converter quantization. This isolates the effect of forward quantization and does not represent an implementation that eliminates the backward datapath. The second, more realistic configuration (BPq) quantizes the backward drive and the backward readout at the same b bits as the forward pass, so each array carries drive and readout converter banks on both edges and the crossbar becomes bidirectional, with the additional peripheral circuitry this implies.
26/30
References
-
Le Gallo, M. et al. A 64-core mixed-signal in-memory compute chip based on phase-change memory for deep neural network inference. Nat. Electron. 6, 680–693 (2023).
-
Kim, H., Mahmoodi, M., Nili, H. & Strukov, D. B. 4k-memristor analog-grade passive crossbar circuit. Nat. Commun. 12, 5198 (2021).
-
Wan, W., Kubendran, R., Schaefer, C., Eryilmaz, S. B., Zhang, W., Wu, D., Deiss, S., Raina, P., Qian, H., Gao, B. et al. A compute-in-memory chip based on resistive random-access memory. Nature 608, 504–512 (2022).
-
Ambrogio, S., Narayanan, P., Okazaki, A., Fasoli, A., Mackin, C., Hosokawa, K., Nomura, A., Yasuda, T., Chen, A., Friz, A. et al. An analog-ai chip for energy-efficient speech recognition and transcription. Nature 620, 768–775 (2023).
-
Huang, Y., Ando, T., Sebastian, A., Chang, M.-F., Yang, J. J. & Xia, Q. Memristor-based hardware accelerators for artificial intelligence. Nat. Rev. Electr. Eng. 1–14 (2024).
-
Hung, J.-M., Xue, C.-X., Kao, H.-Y., Huang, Y.-H., Chang, F.-C., Huang, S.-P., Liu, T.-W., Jhang, C.-J., Su, C.-I., Khwa, W.-S. et al. A four-megabit compute-in-memory macro with eight-bit precision based on cmos and resistive random-access memory for ai edge devices. Nat. Electron. 4, 921–930 (2021).
-
Kang, P., Moosmann, J., Liu, M., Zhou, B., Magno, M., Lukowicz, P. & Bian, S. Bridging generalization and personalization in human activity recognition via on-device few-shot learning. arXiv preprint arXiv:2508.15413 (2025).
-
Winkle, K., Lemaignan, S., Caleb-Solly, P., Bremner, P., Turton, A. J. & Leonards, U. In-situ learning from a domain expert for real world socially assistive robot deployment. In Robotics: science and systems (2020).
-
Hundman, K., Constantinou, V., Laporte, C., Colwell, I. & Soderstrom, T. Detecting spacecraft anomalies using lstms and nonparametric dynamic thresholding. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining, 387–395 (2018).
-
Lillicrap, T. P., Cownden, D., Tweed, D. B. & Akerman, C. J. Random synaptic feedback weights support error backpropagation for deep learning. Nat. Commun. 7, 13276 (2016).
-
Akrout, M., Wilson, C., Humphreys, P. C., Lillicrap, T. P. & Tweed, D. B. Deep learning without weight transport. CoRR, abs/1904.05391 (2019).
-
Woo, S., Park, J., Hong, J. & Jeon, D. Activation sharing with asymmetric paths solves weight transport problem without bidirectional connection. In Beygelzimer, A., Dauphin, Y., Liang, P. & Vaughan, J. W. (eds.) Advances in Neural Information Processing Systems (2021).
-
Marinella, M. J., Agarwal, S., Hsia, A., Richter, I., Jacobs-Gedrim, R., Niroula, J., Plimpton, S. J., Ipek, E. & James, C. D. Multiscale co-design analysis of energy, latency, area, and accuracy of a reram analog neural training accelerator. IEEE J. on Emerg. Sel. Top. Circuits Syst. 8, 86–101, DOI: 10.1109/JETCAS.2018.2796379 (2018).
27/30
-
Narayanan, P., Fumarola, A., Sanches, L. L., Hosokawa, K., Lewis, S. C., Shelby, R. M. & Burr, G. W. Toward on-chip acceleration of the backpropagation algorithm using nonvolatile memory. IBM J. Res. Dev. 61, 11:1–11:11, DOI: 10.1147/JRD.2017.2716579 (2017).
-
Song, L., Qian, X., Li, H. & Chen, Y. Pipelayer: A pipelined reram-based accelerator for deep learning. In 2017 IEEE International Symposium on High Performance Computer Architecture (HPCA), 541–552, DOI: 10.1109/HPCA.2017.55 (2017).
-
Xiao, T. P., Bennett, C. H., Feinberg, B., Agarwal, S. & Marinella, M. J. Analog architectures for neural network acceleration based on non-volatile memory. Appl. Phys. Rev. 7, 031301, DOI: 10.1063/1.5143815 (2020). https://pubs.aip.org/aip/apr/article-pdf/doi/10.1063/1.5143815/19740151/031301_1_online.pdf.
-
Hinton, G. The forward-forward algorithm: Some preliminary investigations. arXiv preprint arXiv:2212.13345 2, 5 (2022).
-
Papachristodoulou, A., Kyrkou, C., Timotheou, S. & Theocharides, T. Convolutional channel-wise competitive learning for the forward-forward algorithm. AAAI'24/IAAI'24/EAAI'24, DOI: 10.1609/aaai.v38i13.29369 (AAAI Press, 2024).
-
Gaba, S., Sheridan, P., Zhou, J., Choi, S. & Lu, W. Stochastic memristive devices for computing and neuromorphic applications. Nanoscale 5, 5872–5878, DOI: 10.1039/c3nr01176c (2013). https://pubs.rsc.org/nr/article-pdf/5/13/5872/3182107/c3nr01176c.pdf.
-
Zahoor, F., Azni Zulkifli, T. Z. & Khanday, F. A. Resistive random access memory (RRAM): An overview of materials, switching mechanism, performance, multilevel cell (mlc) storage, modeling, and applications. Nanoscale Res. Lett. 15, 90 (2020).
-
Netzer, Y., Wang, T., Coates, A., Bissacco, A., Wu, B., Ng, A. Y. et al. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, vol. 2011, 4 (Granada, 2011).
-
Esmanhotto, E., Hirtzlin, T., Bonnet, D., Castellani, N., Portal, J.-M., Querlioz, D. & Vianello, E. Experimental demonstration of multilevel resistive random access memory programming for up to two months stable neural networks inference accuracy. Adv. Intell. Syst. 4, 2200145 (2022).
-
Rao, M., Tang, H., Wu, J., Song, W., Zhang, M., Yin, W., Zhuo, Y., Kiani, F., Chen, B., Jiang, X. et al. Thousands of conductance levels in memristors integrated on cmos. Nature 615, 823–829 (2023).
-
Gallo, M. L., Sebastian, A., Mathis, R., Manica, M., Giefers, H., Tüma, T., Bekas, C., Curioni, A. & Eleftheriou, E. Mixed-precision in-memory computing. Nat. Electron. 1, 246 – 253 (2017).
-
Rasch, M. J., Carta, F., Fagbohungbe, O. & Gokmen, T. Fast and robust analog in-memory deep neural network training. Nat. Commun. 15, 7133 (2024).
-
Gokmen, T. & Haensch, W. Algorithm for training neural networks on resistive device arrays. Front. Neurosci. Volume 14 - 2020, DOI: 10.3389/fnins.2020.00103 (2020).
28/30
-
Ambrogio, S., Narayanan, P., Tsai, H., Shelby, R. M., Boybat, I., Nolfo, C., Sidler, S., Giordano, M., Bodini, M., Farinha, N. C. et al. Equivalent-accuracy accelerated neural-network training using analogue memory. Nature 558, 60 (2018).
-
Li, C., Belkin, D., Li, Y., Yan, P., Hu, M., Ge, N., Jiang, H., Montgomery, E., Lin, P., Wang, Z. et al. Efficient and self-adaptive in-situ learning in multilayer memristor neural networks. Nat. Commun. 9, 2385 (2018).
-
Imbert, B., Renaudineau, A., Diallo, M., Aguirre-Morales, J.-D., Iftakher, M., Harabi, K.-E., Turck, C., Drouhin, M., Hirtzlin, T., Vianello, E. et al. Forward-forward learning exploiting low-voltage reset of rram. In 2024 IEEE International Electron Devices Meeting (IEDM), 1–4 (IEEE, 2024).
-
Renaudineau, A., Diallo, M. H., Dupuis, T., Imbert, B., Iftakher, M. A., Harabi, K.-E., Turck, C., Hirtzlin, T., Bonnet, D., Melul, F., Aguirre-Morales, J.-D., Vianello, E., Bocquet, M., Portal, J.-M. & Querlioz, D. Forward-only learning in memristor arrays with month-scale stability (2026). 2601.09903.
-
Nøkland, A. Direct feedback alignment provides learning in deep neural networks. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS'16, 1045–1053 (Curran Associates Inc., Red Hook, NY, USA, 2016).
-
Lv, C., Xu, J., Lu, Y., Wang, X., Wang, Z., Xu, Z., Yu, D., Du, X., Zheng, X. & Huang, X. Dendritic localized learning: Toward biologically plausible algorithm. In Forty-second International Conference on Machine Learning (2025).
-
Choi, S., Jeon, M., Hwang, Y., Oh, J., Lim, S., Lee, J. & Kang, M. Dictionary contrastive learning for efficient local supervision without auxiliary networks. In The Twelfth International Conference on Learning Representations (2024).
-
Nøkland, A. & Eidnes, L. H. Training neural networks with local error signals. In Chaudhuri, K. & Salakhutdinov, R. (eds.) Proceedings of the 36th International Conference on Machine Learning, vol. 97 of Proceedings of Machine Learning Research, 4839–4850 (PMLR, 2019).
-
Belilovsky, E., Eickenberg, M. & Oyallon, E. Decoupled greedy learning of CNNs. In III, H. D. & Singh, A. (eds.) Proceedings of the 37th International Conference on Machine Learning, vol. 119 of Proceedings of Machine Learning Research, 736–745 (PMLR, 2020).
-
LeCun, Y., Cortes, C. & Burges, C. Mnist handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist 2 (2010).
-
Xiao, H., Rasul, K. & Vollgraf, R. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747 (2017).
-
Krizhevsky, A. Learning multiple layers of features from tiny images. Tech. Rep. (2009).
-
Jiang, M., Xu, Y., Li, Z. & Li, C. Current opinions on memristor-accelerated machine learning hardware. Curr. Opin. Solid State Mater. Sci. 37, 101226, DOI: https://doi.org/10.1016/j.cossms.2025.101226 (2025).
29/30
-
Bernstein, J., Wang, Y.-X., Azizzadenesheli, K. & Anandkumar, A. signsgd: Compressed optimisation for non-convex problems. In International Conference on Machine Learning, 560–569 (PMLR, 2018).
-
Joshi, V., Le Gallo, M., Haefeli, S., Boybat, I., Nandakumar, S. R., Piveteau, C., Dazzi, M., Rajendran, B., Sebastian, A. & Eleftheriou, E. Accurate deep neural network inference using computational phase-change memory. Nat. Commun. 11, 2473 (2020).
-
Rasch, M. J., Moreda, D., Gokmen, T., Le Gallo, M., Carta, F., Goldberg, C., El Maghraoui, K., Sebastian, A. & Narayanan, V. A flexible and fast pytorch toolkit for simulating training and inference on analog crossbar arrays. In 2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (AICAS), 1–4, DOI: 10.1109/AICAS51828.2021.9458494 (2021).
-
Gokmen, T., Onen, M. & Haensch, W. Training deep convolutional neural networks with resistive cross-point devices. Front. Neurosci. 11, 538 (2017).
-
Nandakumar, S. R., Le Gallo, M., Piveteau, C., Joshi, V., Mariani, G., Boybat, I., Karunaratne, G., Khaddam-Aljameh, R., Egger, U., Petropoulos, A., Antonakopoulos, T., Rajendran, B., Sebastian, A. & Eleftheriou, E. Mixed-precision deep learning based on computational memory. Front. Neurosci. Volume 14 - 2020, DOI: 10.3389/fnins.2020.00406 (2020).
-
Ghader, M., Kheradpisheh, S. R., Farahani, B. & Fazlali, M. Forward-only convolutional neural networks with learnable channel-class assignment. arXiv preprint arXiv:2606.09928 (2026).
-
Papachristodoulou, A., Kyrkou, C., Timotheou, S. & Theocharides, T. Chaco: Channel-wise adaptive competitive layer-wise learning. IEEE Transactions on Neural Networks Learn. Syst. 1–15, DOI: 10.1109/TNNLS.2026.3715154 (2026).
-
Iftakher, M. A., Levices, H., Harabi, K.-E., Renaudineau, A., Faye, M.-C., Bouchard, C., Disdier, F., Viala, B., Vianello, E., Talatchian, P., Garello, K., Querlioz, D. & Hutin, L. Intrinsic annealing in a hybrid memristor-magnetic tunnel junction ising machine. Nat. Commun. 17 (2026).
-
Harabi, K.-E., Turck, C., Drouhin, M., Renaudineau, A., Bersani-Veroni, T., Querlioz, D., Hirtzlin, T., Vianello, E., Bocquet, M. & Portal, J.-M. A multimode hybrid memristor-cmos prototyping platform supporting digital and analog projects. In Proceedings of the 28th Asia and South Pacific Design Automation Conference, 184–185 (2023).
-
de Camaret, C. et al. Gen underlayer for segregation-tolerant ge-rich gesbte-based phase-change memory featuring low current, low set drift, and high-temperature data retention. IEEE Transactions on Electron Devices 71, 7454–7460, DOI: 10.1109/TED.2024.3477429 (2024).
-
Le Gallo, M., Lammie, C., Büchel, J., Carta, F., Fagbohungbe, O., Mackin, C., Tsai, H., Narayanan, V., Sebastian, A., El Maghraoui, K. & Rasch, M. J. Using the ibm analog in-memory hardware acceleration kit for neural network training and inference. APL Mach. Learn. 1, 041102, DOI: 10.1063/5.0168089 (2023). https://pubs.aip.org/aip/aml/article-pdf/doi/10.1063/5.0168089/19848543/041102_1_5.0168089.pdf.
30/30