Abstract
Memristor-based analog compute-in-memory (CIM) architectures provide a promising substrate for the efficient deployment of Large Language Models (LLMs), owing to superior energy efficiency and computational density. However, these architectures suffer from precision issues caused by intrinsic non-idealities of memristors. In this paper, we first conduct a comprehensive investigation into the impact of such typical non-idealities on LLM reasoning. Empirical results indicate that reasoning capability decreases significantly but varies for distinct benchmarks. Subsequently, we systematically appraise three training-free strategies, including thinking mode, in-context learning, and module redundancy. We thus summarize valuable guidelines, i.e., shallow layer redundancy is particularly effective for improving robustness, thinking mode performs better under low noise levels but degrades at higher noise, and in-context learning reduces output length with a slight performance trade-off. Our findings offer new insights into LLM reasoning under non-ideality and practical strategies to improve robustness.
Introduction
To make Large Language Models (LLMs) sustainable for edge devices, researchers are turning to Compute-In-Memory (CIM) architectures using memristors (e.g., RRAM, PCM). These architectures perform calculations directly within memory arrays, bypassing the energy-intensive "von Neumann bottleneck" and potentially offering >40x energy efficiency over traditional GPUs. However, memristors are analog and imperfect, suffering from non-idealities such as block-wise Gaussian noise and stuck-at faults (SAFs).
While previous research focused on simple classification, this study investigates whether noisy analog chips can handle complex reasoning tasks like math and logic, where early errors can catastrophically derail multi-step "Chain-of-Thought" processes.
Methodology
The authors simulated a memristor-based environment to test LLMs (primarily Qwen3 0.6B, along with Qwen3 1.7B and Llama 3.2 1B) under varying noise levels ($\sigma$) and SAF rates.
Hardware Substrate
The target hardware consists of memristor-based CIM macros, utilizing technologies like RRAM, FeRAM, PCM, and MRAM to achieve high energy efficiency.
Evaluation Benchmarks
Three prominent reasoning benchmarks were used:
- IFEval: Instruction-following ability.
- GPQA-Diamond: High-level scientific multiple-choice questions.
- MATH-500: Difficult mathematical problems requiring multi-step logic.
Training-Free Robustness Strategies
To mitigate noise without expensive re-training, three strategies were evaluated:
- Thinking Mode: Forcing the model to output reasoning (using
<think>tags) before the final answer. - In-Context Learning (ICL): Using 2-shot examples to guide model structure.
- Module Redundancy: Repeating specific model parts (e.g., Feed-Forward Networks or entire layers) and averaging results to smooth out hardware noise.
Key Insights and Results
Impact of Non-Ideality
- The "Token Explosion" Trap: High hardware noise often triggers "token explosion," where models generate infinite repetitive loops. This significantly degrades energy efficiency, as the chip remains powered on longer than a GPU would.
- Fragility of Mathematical Reasoning: Performance on MATH-500 dropped much faster than general instruction following, falling from 51.5% to 11.4% under high noise ($\sigma = 0.02$).
- Sensitivity of Shallow Layers: Early layers are far more noise-sensitive. Adding redundancy to the first 25% of the model provided benefits comparable to doubling the entire model at a fraction of the hardware cost.
Mitigation Performance
- Redundancy Effectiveness: Quadrupling FFN modules (FFN x4) recovered the MATH-500 score to 30.1% and IFEval to 52.2%.
- Energy Gains: While high noise initially increased energy consumption to 2.63J (worse than GPU's 1.43J), the "Shallow (4x)" redundancy strategy reduced it to just 0.3J.
- Thinking Mode Limitations: While helpful at low noise, "Thinking Mode" suffered from "mode collapse" at higher noise, producing empty reasoning tags.
Conclusion
This work highlights the critical challenges of deploying LLMs on analog CIM hardware. While hardware noise can cause reasoning collapse and energy inefficiency, training-free strategies—particularly shallow layer redundancy—offer a practical path toward robust, energy-efficient edge deployment. Future work will explore larger models and noise-aware training to further bridge the gap between analog hardware and reliable AI reasoning.
Summary updated