arXiv:2611.08693cs.ARNov 2026

Manuscript Offprint

arXiv:2611.08693

Enabling Retraining-Free Accurate Inference in Analog Compute in Memory Accelerators

George Karfakis, Puneet Gupta

ABSTRACT

Analog compute-in-memory (CIM) accelerators compute matrix-vector products directly inside memory arrays, eliminating weight movement and promising order-of-magnitude gains in inference efficiency. However, converter and device errors make pretrained models unusable on these arrays, and hardware-aware retraining is costly. We enable retraining-free, accurate inference of pretrained models on simple analog arrays with low-cost, shared calibration. Our key observation is that analog error depends on how each layer is represented on the array, and that this representation can be changed offline without changing the computation. We center the inputs and apply Hadamard rotations designed for analog arrays, which keep shared reference errors spread and confine input mixing to each array. Across CNNs, vision transformers and LLMs up to 14B parameters on PCM and ReRAM, the method brings vision models and larger LLMs within a few points of floating-point accuracy and matches or approaches published hardware-aware training without training any weights. On ReRAM with 6-bit ADCs, it restores ViT-B/16 from 37.4% to 82.9% and Phi-4 from 27.0% to 72.2%, both within 2.2 points of floating-point accuracy.

1 INTRODUCTION

Moving model weights between memory and compute can cost more time and energy than the arithmetic itself, especially at the small batch sizes of latency-critical and edge inference (Horowitz, 2014; Gholami et al., 2024). Analog compute-in-memory (CIM) sidesteps this issue by exploiting analog effects to perform matrix-vector operations directly on memory arrays. (Sebastian et al., 2020; Verma et al., 2019). Dense non-volatile memory (NVM) arrays can hold all of a model's weights throughout inference, so no weights stream from external memory (Sebastian et al., 2020; Burr et al., 2023). For models that fit, system studies project 40 to 140 times the energy efficiency of an NVIDIA A100 (Jain et al., 2023).

These efficiency gains come with analog errors that can substantially reduce model accuracy. Precise analog-to-digital converters (ADCs) can be very costly in area and energy, so designs tend to use low-precision ADCs that quantize and clip the array outputs (Shafiee et al., 2016; Murmann, 2024; Xiao et al., 2022b). NVM devices introduce additional errors through programming noise, read noise and drift of the stored weights over time (Joshi et al., 2020; Nandakumar et al., 2019; Mackin et al., 2022; He et al., 2021). These errors can make pretrained models unusable: in our ReRAM simulation with 6-bit ADCs, one day after programming, ViT-B/16 falls from 84.5% to 37.4%, and Phi-4 from 74.4% to 27.0% accuracy over studied benchmarks.

A widely used approach to recovering this accuracy is hardware-aware (HWA) training, which injects analog errors into the forward pass so that the model learns to tolerate them (Joshi et al., 2020; Kariyappa et al., 2021; Rasch et al., 2023; Chen et al., 2025a; Zhou et al., 2025; Büchel et al., 2025; Li et al., 2023a). However, this approach requires access to training data and can be very costly, becoming a serious barrier to analog deployment. The analog foundation models of Büchel et al. (2025), for instance, train on billions of tokens.

Büchel et al. (2025) explicitly call for a post-training method that recovers accuracy under analog errors, but find that the digital post-training quantization (PTQ) methods provide insufficient robustness and lose accuracy when input ranges are held fixed. We seek to recover accuracy while retaining shared, static array settings, which allow reference and control circuitry to be reused across columns and simplify calibration (Khaddam-Aljameh et al., 2022; Ambrogio et al., 2023; Yang et al., 2026a). We develop methods so that off-the-shelf pretrained models tolerate both converter and device errors under these settings without retraining or modifying the arrays.

We observe that the representation of an otherwise identical neural computation determines several distinct physical error mechanisms in analog CIM, and each mechanism can

1^{1}Department of Electrical and Computer Engineering, University of California, Los Angeles, CA, USA.

be attacked by a corresponding function-preserving representation change. We first center the computation to remove static, precomputable work from the analog path. We then apply computationally invariant isometric transformations to express the remaining computation in a basis better suited to the array's noisy conductances and low-precision partial sums. Table 1 summarizes how the array's error mechanisms guide the choice and construction of these transformations.

We reparameterize the weights offline and apply matched digital transforms during inference, without retraining or changing the array hardware. In the ReRAM setting above, they raise ViT-B/16 and Phi-4 accuracy to 82.9% and 72.2%, within 2.2 points of floating-point execution. These gains require neither retraining nor dynamic input ranges: each array uses one static weight mapping scale, input range, and output range.

Our contributions are:

  • We analyze how analog CIM error depends on the representation of weights and activations.

  • We propose a retraining-free reparameterization (centering + regular output rotations + tile-local input rotations) for robust inference on unmodified arrays with static calibration.

  • We evaluate CNNs, vision transformers (ViTs) and large language models (LLMs) on PCM and ReRAM with 4- to 8-bit ADCs, showing consistent accuracy recovery and gains over strong baselines.

References (89)