Placing Specialized Units on Analog Crossbars

A trained neural network has a free symmetry. You can reorder the hidden units of a layer, reorder the next layer's input weights to match, and the function computed is exactly unchanged. On an analog in-memory chip, which stores each weight as the electrical conductance of a memory cell in a grid called a crossbar, that reordering is no longer free. It decides which physical column each unit occupies, and real columns differ. Wire resistance attenuates voltages along metal lines (called IR-drop), defects freeze some cells, and distortion grows with distance from the sensing circuitry. The simulators used to train networks for these chips mostly draw noise independently and identically for every weight, so in simulation every placement looks equally good. We propose that a substantial and predictable part of the gap between simulated and real analog accuracy comes from one interaction. Training makes hidden units non-interchangeable, and hardware distortion that depends on position then punishes some placements far more than others.

The proposal has two parts. The first is a retraining-free procedure. It scores each hidden unit's sensitivity after training, characterizes each crossbar's spatial distortion, and solves an assignment problem that puts the most important units on the cleanest columns and rows. The second is a theory-backed prediction about when this helps. Placement should matter only to the degree that units have specialized. A network stuck in its symmetric phase, where units still compute near-identical functions, should gain nothing from reordering. That prediction is what makes this more than a remapping heuristic.

Core Claim

The statistical-mechanics literature shows that units in a layer start out interchangeable and later break that symmetry abruptly, taking on distinct roles. Saad et al. derive exact equations for online gradient descent in two-layer networks and show that the symmetric plateau is a stable fixed point. Schwarze et al. show that generalization jumps discontinuously once enough data breaks that symmetry. van Meegen & Sompolinsky show that after the transition individual neurons carry non-interchangeable selectivity. Goldt et al. add a sharper fact: in over-parameterized students, surplus units that fail to specialize act as "noise collectors", and asymptotic error grows linearly with their number. These papers motivate the claim. Specialization creates large differences in how much each unit matters, and the surplus units are natural candidates for the worst hardware locations.

Our claim is that after training, the sensitivity of each unit to the analog distortion of its physical location is strongly heterogeneous. Under spatially structured distortion, the placement that matches high-sensitivity units to low-distortion locations closes a measurable fraction of the gap between an i.i.d.-noise simulator and a circuit-level crossbar model. That fraction should grow with a measured index of specialization and vanish for unspecialized networks.

The closest prior work is Chowdhury et al.. They show that, in mixture-of-experts models, experts specialized on frequent tokens develop large weight norms and are therefore noise-sensitive. Using this, they route the highest-scoring experts to digital hardware, keeping 62.50% average accuracy on OLMoE against a 63.17% FP16 baseline. We differ in three ways. We work inside dense layers at unit granularity rather than whole experts. We use placement within the analog array rather than offloading to digital hardware. And we evaluate against spatially structured distortion, whereas they use functional simulation.

Fault-aware mapping is also an existing hardware topic; Design Space Exploration of Dense and Sparse Mapping Schemes for RRAM Architectures studies how mapping interacts with stuck-at faults. Our contribution relative to that line is to derive the sensitivity ordering from specialization and to predict when ordering can matter at all.

Research Program

The first component is a small theory result. We extend the teacher-student ODEs of Goldt et al. to give each student unit $k$ its own weight-noise variance $\sigma_k^2$, which models column-dependent distortion. With all $\sigma_k$ equal, the equations reduce to the known case. With unequal $\sigma_k$, the exact permutation symmetry of the plateau is broken from the start, so this calculation also answers the file's open question of whether physical layout breaks symmetry before training. We expect three outcomes, and each is checkable by simulating the ODEs:

  • Heterogeneous noise slightly shortens the plateau, much as small perturbations destabilize a saddle.
  • In over-parameterized students, the units that end up superfluous tend to be the noisy ones when training sees the true noise map.
  • When training is i.i.d. and deployment is heterogeneous, the error gap between the best and worst assignment scales with the spread of the $\sigma_k$ multiplied by how unequal the per-unit contributions are.

Mori & Mignacco constrain this part. They proved that dropout that is too strong suppresses specialization entirely. We therefore expect a regime of heavy analog noise during training in which units never specialize, and in which placement gains disappear.

The second component is the placement procedure. For a layer feeding a crossbar, we estimate each unit's sensitivity $s_i$. This is the increase in validation loss when that unit's weight column alone is perturbed with a calibrated distortion, computed with a single batch of perturbation probes. We also characterize each physical column (and row) with a distortion level $d_c$, taken from a circuit solver for the chip's geometry or from a measured defect map. If the cost is approximately separable, the placement minimizes

$$\sum_i s_i \, d_{\pi(i)}$$

over permutations $\pi$ mapping units to columns. This is a linear assignment problem solved exactly in cubic time. Rows matter too: a layer's rows are the previous layer's units, so reordering one layer's units reorders the next crossbar's rows. Because of that coupling we solve layers jointly, alternating between them until no layer's ordering changes. Where IR-drop couples units non-separably, we refine the solution with pairwise swaps evaluated in the circuit model. None of this changes the trained weights, and it can be redone per chip.

The third component is the gap measurement. We need a "silicon" reference we can actually run. We use a circuit-level crossbar solver with wire parasitics and stuck-at maps, restricted to the sub-128×128 tiles where the file notes such solvers remain tractable. On top of it we add the calibrated programming noise and drift presets of AIHWKit, which come from a 1-million-device PCM array. Large layers are tiled. If we gain access to physical arrays, the same protocol transfers unchanged, but we do not assume it. We report the nonlinear distortion statistic (PC2) from the Batchnorm study for every configuration, so results can be placed relative to that paper's 1.0×10⁻² failure threshold.

Baselines

The naive reference is identity placement, with units in their training order, alongside the average over random permutations. Random permutations give the expected accuracy of an arbitrary mapping, and their spread is itself informative: if the spread is negligible, placement cannot matter. The digital floating-point accuracy and the i.i.d.-noise simulated accuracy serve as upper and intermediate anchors. We define the sim-to-circuit gap as the i.i.d.-simulated accuracy minus the circuit-model accuracy under random placement.

The strongest existing training method is hardware-aware training as in Rasch et al.. It injects calibrated programming noise, drift, quantization and IR-drop into the forward pass and was shown to reach within 1% of FP32 on five of eleven workloads. Their reported WideResNet-16 CIFAR-10 numbers are 25% error under direct mapping and 20% error, matching the digital baseline, after hardware-aware training. We run it through AIHWKit with identical architectures, data, epochs and hyperparameter search budgets as our models. Our placement is applied on top of hardware-aware-trained weights as well as plain digital weights. Beating it means that hardware-aware training plus placement lowers circuit-model error on held-out chip maps by more than the run-to-run standard deviation, with no added training cost.

The strongest robustness method against mismatch is Diversity-aware Weight Perturbation from Chen et al.. It trains against many noise draws, weights the loss by their disagreement, and reports over 15% absolute gains under up to 70% mismatch at about 3.2× training cost. No reported result found on Lacuna for its standalone CIFAR-10 accuracy, so we rerun it ourselves on the same data and budget, and compare at equal wall-clock as well as at equal epochs.

For post-deployment calibration, we fine-tune only batch-norm parameters as in the Batchnorm study, which reports recovering VGG16 on CIFAR-10 to about 87% under FeFET read noise of σ = 0.15. We test it alone and combined with placement.

A unit-level analogue of Chowdhury et al. moves the top fraction of units by maximum weight norm to digital execution. This sets a reference at matched digital budget.

Three ablations isolate the key ingredient:

  • Placement by weight norm alone, which tests whether measured sensitivity adds anything over a free proxy.
  • Placement by sensitivity but ignoring row coupling.
  • Placement in networks deliberately held unspecialized, either by stopping in the plateau or by training with dropout retention below the critical threshold.

Why not just…?

Why not just include IR-drop in hardware-aware training and let the network adapt to its layout? This is the most serious alternative. Rasch et al. already model IR-drop, and a network trained against one fixed spatial map may simply learn to keep important units in clean columns, making our placement redundant. The answer depends on whether the map is known at training time. Spatial distortion includes chip-specific defect maps and drift that differ between dies, and Chen et al. show that hardware-aware training degrades when deployment conditions differ from training. Our experiment trains with the spatial model of one map and evaluates on held-out maps, with and without re-placement. If hardware-aware training with the true map matches placement even on held-out maps, the per-chip benefit is not real, and we will report that.

Why not just recalibrate batch-norm parameters after deployment? It is cheap and works for linear shifts. However, the Batchnorm study shows it fails once nonlinear distortion exceeds PC2 = 1.0×10⁻². Spatial IR-drop is exactly the nonlinear case. We expect the two methods to be complementary, and the experiment reports each alone and combined, binned by PC2.

Why not just sort units by weight norm? Norm is a free proxy and, following Chowdhury et al., plausibly correlates with sensitivity. If norm-sorted placement matches sensitivity-based placement, we adopt it and drop the probe step. The specialization analysis still stands, because it predicts when any ordering helps. Norm may diverge from sensitivity after normalization layers rescale units, and the ablation measures exactly this.

Why not just widen the network for redundancy? Goldt et al. show that under noise, surplus unspecialized units add error rather than absorb it, and that weight decay does not stop this. We sweep width at fixed hardware to locate the point where extra width stops helping, with and without placement that parks surplus units on the worst columns.

Proposed Experiments

We start with the teacher-student setting, using Gaussian inputs and MNIST inputs as in Goldt et al.. We compare the ODE predictions for heterogeneous column noise against simulated training, measuring plateau duration, the final student-teacher overlaps, and the best-versus-worst placement error gap as functions of noise spread.

We then move to MLPs on Fashion-MNIST, VGG-8 and WideResNet-16 on CIFAR-10, and ResNet-18 on TinyImageNet. Each is mapped onto tiled crossbars under the circuit-level model across several sampled defect and IR-drop maps. We report accuracy, the fraction of the sim-to-circuit gap closed by placement, the 1-year drift curve, PC2, and compute cost.

The decisive check is the relationship between gap closure and a specialization index. For the index we use the mean off-diagonal similarity of unit weight vectors, or the dispersion of unit sensitivities. We vary specialization within one architecture through training length, dataset size and dropout strength. The proposal's central claim holds if gap closure rises with specialization and is near zero for networks held in the symmetric phase. It is falsified if placement helps equally for unspecialized networks, which would mean the benefit comes from generic fault avoidance rather than from specialization. It is also falsified if the spread across random permutations is within seed noise, which would mean spatial structure does not matter at these array sizes.