Source-linked AI summary
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
TL;DR
FeFET-based CIM variation is concentrated in conducting cells, and two’s-complement sign extension can place small negative values in high-significance bit planes. CAFE uses C2AM-guided adaptive differential encoding and deployment search to reduce that activity; across representative workloads, it reports lower C2AM and improved accuracy over two’s-complement CIM at lower cost than uniform full-differential encoding.
Problem
In bit-sliced FeFET CIM, two’s-complement sign extension can turn small negative values into high-significance conducting activity, amplifying variation during reconstruction.
Source: §I · p. 2, C. C2AM-Guided Differential Encoding · p. 4Method
CAFE uses C2AM to guide selective differential weight and activation encoding, then combines type-wise enumeration, layer-wise NSGA-II search, and post-GA pruning.
Source: §I · p. 2, B. C2AM: Conducting-Cell Activity Metric · p. 3Results
Takeaways & Limitations
Differential encoding should be allocated selectively because uniform Diff-W/Diff-A removes sign extension most strongly but has the highest branch, storage, and bit-serial overhead.
Source: C. C2AM-Guided Differential Encoding · p. 4
Abstract
from arXiv · showhide
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 C$^2$AM, a bit-significance-weighted conducting-cell activity metric that predicts output deviation and inference accuracy degradation under FeFET device variation. Guided by C$^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 C$^2$AM by up to $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\times$ normalized cost, compared with $3.06\times$ for uniform full-differential encoding.
I. INTRODUCTION
CAFE treats signed representation as a design variable for FeFET variation, using conducting-cell activity to guide differential encoding and adaptive deployment. Across vision and language workloads, it reports lower C2AM and improved robustness over two’s-complement CIM.
- FeFET variation errors are dominated by conducting on-state cells, while two’s-complement sign extension maps small negative values to high-significance ones whose errors grow during shift-and-add reconstruction.Prior approaches modify hardware or treat variation as generic noise, leaving this device- and representation-dependent mechanism unaddressed.Source: §I · p. 1
- CAFE frames signed representation as a hardware design variable for FeFET variation robustness rather than a fixed arithmetic convention.Its overview connects conducting-cell-dominated variation and sign-extension amplification with adaptive differential encoding.Source: §I · p. 2, Figure 1 · p. 2
- CAFE introduces C2AM, a bit-significance-weighted conducting-cell activity metric, and uses it to guide differential weight and activation encodings that suppress sign-extension-induced activity.The framework also combines layer-type sensitivity analysis, type-wise encoding enumeration, layer-wise NSGA-II search, and post-GA pruning to balance robustness and hardware cost.Source: §I · p. 2
- Up to 28.6× C2AM reduction accompanies accuracy gains exceeding 87 percentage points over two’s-complement CIM, approaching full-differential robustness at 1.86–2.78× normalized cost.The results are reported across representative vision and language workloads.Source: §I · p. 2
II. BACKGROUND AND RELATED WORK
FeFET read-current asymmetry makes conducting cells the main source of variation, and bit-sliced signed encodings determine where that activity appears across reconstructed bit planes. CAFE differs from prior robustness and efficiency approaches by reshaping signed bit-plane activity while keeping quantized precision fixed.
A. FeFET Device
- FeFET’s large on/off-current ratio makes off-state leakage negligible, so variation is dominated by on-state read current.A high read gate and stored “1” produce a conducting cell.Source: A. FeFET Device · p. 2
B. Bit-Sliced CIM and Signed Encoding
- Bit-sliced CIM decomposes a quantized dot product into activation and weight bit-plane products, accumulates them on bit lines, and reconstructs signed values through shift-and-add.Differential encoding decomposes signed values into positive and negative components, removing sign extension and suppressing high-significance conducting-cell activity.Source: B. Bit-Sliced CIM and Signed Encoding · pp. 2–3
C. Robustness and Adaptive Deployment
- Unlike hardware compensation, calibration, error correction, or noise-aware training, CAFE reshapes signed bit-plane activity while keeping quantized precision fixed.It uses C2AM to quantify bit-significance-weighted conducting-cell activity and applies pruning as a robustness refinement rather than sparse execution.Source: C. Robustness and Adaptive Deployment · p. 3
III. METHODOLOGY
The methodology models variation in conducting FeFET cells and follows its effect through bit-plane accumulation and signed shift-and-add reconstruction. The resulting error depends on both conducting activity and the reconstruction significance of each bit pair.
A. Conducting-Cell-Dominated Variation
- For bit pair (b, k), the weight and activation bits determine whether a cell conducts, and the signed reconstruction coefficient sets how that partial sum contributes to the output.For unsigned bit planes, the coefficient is 2^b+k; signed encodings alter its sign but still weight errors by reconstruction magnitude.Source: A. Conducting-Cell-Dominated Variation · p. 3
- Off-state cells contribute negligible read current, while conducting on-state cells are modeled with a zero-mean perturbation whose standard deviation is σ.The effective perturbation includes device-to-device, cycle-to-cycle, and read-path on-current variation; ADC quantization is modeled separately.Source: A. Conducting-Cell-Dominated Variation · p. 3
- Shift-and-add reconstruction maps bit-plane current perturbations to output error, with the magnitude of each reconstruction coefficient determining amplification.This concentrates variation effects on conducting 1 × 1 events, especially in high-significance bit slices.Source: A. Conducting-Cell-Dominated Variation · p. 3
B. C2AM: Conducting-Cell Activity Metric
C2AM measures conducting activity weighted by bit significance, reflecting how bit-plane activity contributes to variation-induced error. It can be computed from encoded bit planes without Monte Carlo variation simulation.
- C2AM is a bit-significance-weighted count of conducting activity for each layer.Its model-level value aggregates counts across evaluated samples or tokens, output channels, and reduction dimensions.Source: B. C2AM: Conducting-Cell Activity Metric · p. 3
- C2AM is proportional to the representation-dependent part of the expected error envelope and can be computed directly from encoded bit planes without Monte Carlo variation simulation.Source: B. C2AM: Conducting-Cell Activity Metric · p. 3
- C2AM weights each event by bit significance to reflect shift-and-add amplification, so encodings of the same quantized tensor values can yield different C2AM values when they induce different high-significance conducting patterns.Source: B. C2AM: Conducting-Cell Activity Metric · p. 4
C. C2AM-Guided Differential Encoding
Two’s-complement sign extension creates high-significance conducting activity from negative codes, while differential encoding changes the physical bit representation without changing the signed quantized tensor. CAFE selectively applies differential weight and activation encoding to reduce sign-extension activity and balance robustness against cost.
- Sign extension maps negative codes to leading ones in high-significance bit planes, where paired operand ones create variation-sensitive conducting events amplified by shift-and-add reconstruction.This can occur for near-zero negative weights and activations, despite the represented integer remaining fixed.Source: C. C2AM-Guided Differential Encoding · p. 4
- Differential encoding represents weights and activations as positive and negative unsigned components, removing sign-extension ones from CIM execution while preserving clean quantized arithmetic.The signs are applied during digital recombination.Source: C. C2AM-Guided Differential Encoding · p. 4
- CAFE considers four per-layer weight/activation encoding configurations and applies differential encoding selectively because full differential encoding removes sign extension but has higher branch, storage, and bit-serial overhead.Source: C. C2AM-Guided Differential Encoding · p. 4
D. Sensitivity-Guided Adaptive Deployment
CAFE balances robustness and cost through layer-type sensitivity, type-wise candidate enumeration, layer-wise NSGA-II search, and post-GA pruning. Its normalized area-latency proxy accounts for differential branch and cycle overhead but omits possible peripheral savings.
- CAFE combines layer-type sensitivity, type-wise coarse search, layer-wise NSGA-II, and post-GA pruning to select adaptive encodings for robustness-cost trade-offs.Source: D. Sensitivity-Guided Adaptive… · p. 4, Figure 5 · p. 5
- Differential weights add unsigned magnitude bit planes, while differential activations add bit-serial cycles; the layer-size-proportional weighting contributes to normalized cost.Source: D. Sensitivity-Guided Adaptive… · p. 5
- The normalized area-latency proxy is ranked against the all-TC-W/TC-A baseline and charges differential branch and cycle overhead, without crediting possible peripheral savings.The omitted savings make reported costs conservative for differential policies.Source: D. Sensitivity-Guided Adaptive… · pp. 4–5
1) Layer-Type Sensitivity Analysis:
CAFE profiles Transformer layer types by injecting FeFET-CIM variation into one functional role at a time to guide candidate protections.
1) Layer-Type Sensitivity Analysis:
- Layer types causing larger accuracy degradation receive stronger candidate protections, while more robust types retain lower-cost options.The profiles isolate roles such as query, key, value, output, or feed-forward network projections.Source: 1) Layer-Type Sensitivity Analysis · p. 5
2) Sensitivity-Constrained Type-Wise Coarse Search:
CAFE narrows the search from shared layer-type policies to layer-wise optimization, then refines selected candidates with targeted pruning. The flow uses sensitivity to allocate protection while balancing robustness and cost.
2) Sensitivity-Constrained Type-Wise Coarse Search:
- CAFE first groups layers by type, constraining each type’s encoding choices according to its sensitivity and retaining accurate Pareto-ranked policies as seeds.Robust types can select lower-cost encodings, while sensitive types must include stronger protection.Source: 2) Sensitivity-Constrained Type-Wise… · p. 5
3) Layer-Wise Fine-Grained NSGA-II Search:
- Type-wise policies provide Pareto-ranked seeds, but shared assignments constrain flexibility; layer-wise NSGA-II then searches for higher validation accuracy at lower normalized cost.Its population starts from those candidates and evolves through crossover and mutation, prioritizing feasibility, Pareto rank, and crowding distance.Source: 3) Layer-Wise Fine-Grained NSGA-II… · p. 5, 2) Sensitivity-Constrained Type-Wise… · p. 5
4) Post-GA Pruning Refinement:
- Post-GA pruning targets harmful small-magnitude weights, mainly in two’s-complement layers, where negative codes can restore sign-extension activity.CAFE masks small-magnitude floating-point weights before quantization, sweeps pruning ratios from 0 to 0.7, and selects the best accuracy-cost trade-off under variation.Source: 4) Post-GA Pruning Refinement · p. 5
A. Experimental Setup
The experiments use a behavioral bit-sliced CIM simulator and evaluate a primary ViT-Tiny workload alongside vision and language models. FeFET variation and hardware settings are swept under stated quantization and averaging conditions.
A. Experimental Setup
- A behavioral bit-sliced CIM simulator adapted from NeuroSim models signed Transformer encodings and FeFET errors through bit-plane decomposition, accumulation, ADC quantization, and reconstruction.The evaluation includes ViT-Tiny on CIFAR-100, ViT-Base on CIFAR-100, ViT-Tiny on ImageNet, and Pythia on WikiText-103.Source: A. Experimental Setup · p. 5
- FeFET on-current perturbation is swept from σ = 0 to 0.20 in steps of 0.01, with σ = 0 as the clean reference and results averaged over 20 seeds.Unless specified, weights and activations use 8-bit quantization, with a 6-bit ADC and 64 parallel read rows.Source: A. Experimental Setup · p. 5
- The encoding baselines include two’s-complement, one-sided and full differential, offset-binary, and CSD policies, with deployment cost reported as normalized cost.The perturbation sweep is motivated by reported FeFET D2D and C2C variation.Source: A. Experimental Setup · p. 5
B. Experimental Results
Across variation strengths, sensitivity-guided adaptive search and pruning produce stronger accuracy-cost frontiers than less-guided alternatives. C2AM tracks robustness degradation, while differential encoding improves robustness across hardware settings and workloads.
B. Experimental Results
- C2AM tracks sample-level output divergence and policy-level accuracy loss, and outpredicts normalized count alternatives by retaining bit significance.Its monotonic correlation with normalized accuracy degradation remains strong as variation increases.Source: B. Experimental Results · pp. 5–6, Figure 6 · p. 6, Figure 7 · p. 6
- Across vision and language workloads, differential modes preserve accuracy or suppress perplexity growth under increasing variation, with Diff-W/Diff-A consistently strongest.The tested models include ViT-Base on CIFAR-100, ViT-Tiny on ImageNet, and Pythia-70M and Pythia-160M on WikiText-103.Source: Figure 9 · p. 6, B. Experimental Results · p. 6
- Diff-W/Diff-A achieves the lowest normalized C2AM (0.035, a 28.6× reduction) and the best strong-variation accuracy among the uniform policies.It maintains near-clean accuracy through the default range and the largest robustness margin in extended stress; the table summarizes accuracy, normalized C2AM, and cost.Source: B. Experimental Results · p. 6, Figure 8 · p. 6, Table I · p. 7
- Diff-W/Diff-A reduces average conducting-event ratio by 8.2× overall and 41× in high-significance regions; it reaches 87.8% with a 3-bit ADC while TC-W/TC-A reaches 51.0% even with 6 bits.On ViT-Base on CIFAR-100, Diff-W/Diff-A remains at 93.4–93.5% from 32 to 768 parallel-read rows, while TC-W/TC-A falls to ≤2.8% beyond 64 rows.Source: B. Experimental Results · pp. 6–7, Figure 10 · p. 7, Figure 11 · p. 7
- FFN layers, especially FFN2, dominate degradation under strong variation, while query/key projections are comparatively robust and value/output projections are moderate.This non-uniform sensitivity motivates type-wise seeding and selective layer-wise protection rather than uniform differential encoding.Source: Figure 12 · p. 7, B. Experimental Results · p. 7
- At σ = 0.15, type-wise seeding cuts extra cost for the near-clean 88% target from 1.73 to 1.56, a 10.3% reduction, and increases feasible choices from 10 to 18.The guided search reaches this stronger frontier within 5 generations.Source: Figure 13 · p. 7, B. Experimental Results · p. 7
- At σ = 0.15, pruning gives a 2.70% accuracy gain over no pruning, but excessive pruning damages clean model capacity.The best setting lifts the Pareto frontier at unchanged normalized cost, with TC-W layers the most effective pruning scope.Source: Figure 14 · p. 8, B. Experimental Results · p. 8
- Across three variation levels, sensitivity-guided NSGA-II reaches stronger Pareto frontiers than type-wise search or direct layer-wise NSGA-II, and pruning further improves accuracy at unchanged cost.The guided search combines type-level priors with layer-wise flexibility; direct layer-wise NSGA-II fails to meet the 80% feasibility threshold at σ = 0.20.Source: Figure 15 · p. 8, B. Experimental Results · p. 8
V. CONCLUSION
CAFE uses C2AM to guide adaptive differential encoding, layer-wise deployment, and post-GA pruning for FeFET-based CIM. Across representative workloads, it reduces C2AM and improves robustness while limiting hardware overhead.
V. CONCLUSION
- CAFE introduces C2AM to quantify bit-significance-weighted conducting activity and guide differential encoding, layer-wise deployment, and post-GA pruning.The framework addresses how signed encodings amplify conducting-cell variation in bit-sliced FeFET CIM.Source: §V · p. 8
- The selected adaptive encoding policies are summarized alongside their layer-type composition.The conclusion frames this deployment as balancing robustness with hardware overhead.Source: Figure 16 · p. 8, §V · p. 8
- Across representative workloads, CAFE reduces C2AM by up to 28.6× and improves accuracy under variation by more than 87 percentage points relative to two’s-complement CIM.It approaches full-differential robustness at lower normalized cost.Source: §V · p. 8