arXiv:2610.19697cs.AROct 2026

Manuscript Offprint

arXiv:2610.19697

CAFE: Conducting-Cell-Aware Adaptive Differential Encoding for Robust DNN Inference in FeFET-Based Compute-in-Memory

Wenshuai Yao, Wenyong Zhou, Hanyong Shao, Zhiyuan Ning, Ru Huang, Kechao Tang

Wenshuai Yao 1†^{1\dagger}, Wenyong Zhou 2†^{2\dagger}, Hanyong Shao 1^{1}, Zhiyuan Ning 1^{1}, Ru Huang 1,3^{1,3}, Kechao Tang 1,3∗^{1,3*}

1^{1}School of Integrated Circuits, Peking University, Beijing, China

2^{2}Department of Electrical and Computer Engineering, The University of Hong Kong, Hong Kong

3^{3}Beijing Advanced Innovation Center for Integrated Circuits, Beijing, China

†^{\dagger}: Equal Contribution. *: Corresponding Author. Email: tkch@pku.edu.cn

Abstract—Ferroelectric field-effect transistor (FeFET)-based compute-in-memory (CIM) promises energy-efficient deep neural network (DNN) inference, but device variation can severely degrade bit-sliced CIM accuracy. Prior works either rely on hardware modifications or treat such variation as generic noise, overlooking a key FeFET asymmetry: negligible off-state leakage makes errors dominated by conducting on-state cells. This asymmetry is amplified by two's-complement sign extension, which maps small negative values to high-significance bit slices and magnifies their errors during shift-and-add reconstruction. In this paper, we propose CAFE, a conducting-cell-aware adaptive differential encoding framework built upon this FeFET-specific asymmetry. CAFE introduces C2AMC^{2}AM, a bit-significance-weighted conducting-cell activity metric that predicts output deviation and inference accuracy degradation under FeFET device variation. Guided by C2AMC^{2}AM, CAFE applies differential weight and activation encoding to eliminate sign-extension-induced conducting-cell amplification. To balance robustness and cost, CAFE performs type-wise encoding enumeration, layer-wise NSGA-II search, and post-GA pruning to allocate robust encodings where the robustness-cost trade-off is favorable. Across representative vision and language workloads, CAFE reduces C2AMC^{2}AM by up to 28.6×28.6\times; in the main deployment study, it improves accuracy over two's-complement CIM by more than 87 percentage points and approaches full-differential robustness at 1.86−2.78×1.86-2.78\times normalized cost, compared with 3.06×3.06\times for uniform full-differential encoding.

Index Terms—CIM, device variation, differential encoding, adaptive deployment, Transformer, FeFET

I. INTRODUCTION

Deep neural networks (DNNs), especially modern Transformer-based models [1], have become dominant workloads across vision, language, and recommendation tasks. Their inference cost is largely driven by dense matrix-vector and matrix-matrix multiplications, which require frequent data movement between memory and compute units. Compute-in-memory (CIM) addresses this bottleneck by performing multiply-accumulate operations directly inside memory arrays, thereby improving energy efficiency and throughput for DNN inference. Among emerging nonvolatile devices, ferroelectric field-effect transistors (FeFETs) are particularly attractive for CIM because of their CMOS compatibility, nonvolatility, and high on/off ratio [2].

However, FeFET-based CIM inference remains vulnerable to device variation. In bit-sliced CIM, quantized weights and activations are decomposed into bit planes, computed separately in memory arrays, and reconstructed through shift-and-add operations. Small device-level current variations can therefore be magnified by bit significance and propagate into large output deviations. Prior works typically address this problem in two ways: modifying hardware circuits to compensate for variation, or abstracting variation as generic conductance or output noise for noise-aware training. While effective in some settings, these approaches overlook an important device- and representation-dependent error mechanism in FeFET-based CIM.

Our key observation is that FeFET-CIM variation is not uniformly distributed across all stored bits or cells. Due to the extremely high on/off ratio of FeFETs, off-state leakage is negligible, and variation-induced computation error is dominated by conducting on-state cells. This conducting-cell-dominated behavior becomes especially problematic under two's-complement signed representation: small negative weights or activations are numerically small, but sign extension maps them to many high-significance ones, creating variation-sensitive conducting events whose errors are amplified by shift-and-add reconstruction. Fig. 1 summarizes the three observations that motivate CAFE and the corresponding design components: FeFET variation is centered on conducting cells, two's-complement sign extension induces excessive high-significance conducting activity, and layer sensitivity differs across layer types. Together, these observations make signed representation a device-variation problem in bit-sliced FeFET CIM.

Differential encoding has long been used in analog CIM for signed arithmetic. In contrast, bit-sliced CIM commonly relies on two's-complement or offset-style encodings because they align naturally with bit-plane multiplication and shift-and-add reconstruction, whereas differential encoding incurs additional hardware cost. As a result, signed representation choices in bit-sliced CIM are typically evaluated for arithmetic support, representation cost, or numerical error. This view overlooks the FeFET-specific conducting-cell asymmetry: un-

Figure

Fig. 1. Overview of CAFE. CAFE exploits the conducting-cell-dominated variation behavior of FeFET-based CIM and mitigates two's-complement sign-extension amplification through conducting-cell-aware adaptive differential encoding. It uses C2AMC^{2}AM, a bit-significance-weighted conducting-cell activity metric, to guide differential weight and activation encoding and adaptive layer-wise deployment.

der high on/off ratio devices, signed encodings also determine where variation-sensitive conducting activity appears across bit slices.

To address this gap, we propose CAFE, a conducting-cell-aware adaptive differential encoding framework for robust DNN inference in FeFET-based CIM. CAFE treats signed representation not as a fixed arithmetic convention, but as a hardware design variable for FeFET variation robustness. It introduces C2AMC^{2}AM, a bit-significance-weighted conducting-cell activity metric, to estimate the robustness impact of signed encoding choices. Guided by C2AMC^{2}AM, CAFE selectively replaces two's-complement weight and activation encodings with differential encodings to suppress sign-extension-induced conducting activity. For deployment, CAFE combines layer-type sensitivity analysis, type-wise encoding enumeration, layer-wise NSGA-II search, and post-GA pruning to balance robustness and hardware cost. This paper makes the following contributions:

  • We identify two's-complement sign extension as a key amplifier of FeFET conducting-cell variation and propose C2AMC^{2}AM, a bit-significance-weighted conducting-cell activity metric for predicting variation-induced robustness degradation.

  • We propose CAFE, a conducting-cell-aware adaptive differential encoding framework for bit-sliced FeFET CIM, covering differential weight and activation encoding, layer-wise adaptive deployment, and post-GA pruning.

  • We design a sensitivity-guided deployment flow that combines layer-type analysis, type-wise enumeration, and layer-wise NSGA-II search to allocate differential protection under hardware-cost constraints.

  • We validate CAFE across vision and language workloads, showing up to 28.6×C2AM28.6 \times C^{2}AM reduction and accuracy gains

Figure

Fig. 2. FeFET states, on- and off-current distributions, and cell read behavior.

over two's-complement CIM by more than 87 percentage points, while approaching full-differential robustness at 1.86−2.78×1.86-2.78\times normalized cost.