Point-Wise Single-Gate Recurrent Unit for Edge Temporal Inference and Its Memristor-Based In-Memory Computing Circuit Implementation
-
摘要: 近年来,边缘设备对时序信息实时处理的需求持续增长。门控循环神经网络具有较强的序列建模能力,已广泛应用于相关任务,但其复杂的递归连接、较高的存储开销以及时间步内的串行计算依赖,制约了其在资源受限边缘系统中的高效部署。为此,本文提出了逐通道单门循环单元 P-SGRU,以逐通道递归调制替代传统全连接隐状态到隐状态(hidden-to-hidden,H2H)变换,将递归参数复杂度由二次形式降低为线性形式,从结构上压缩递归路径规模。实验结果表明,在相同网络维度下,相较于 LSTM 和 GRU,P-SGRU的H2H 递归参数量分别减少约 98.44% 和 97.92%。P-SGRU进一步通过解除保持系数分支与候选隐状态分支之间的串行依赖,提高了时间步内计算并行性。基于 40 nm 工艺的电路评估结果显示,其单时间步更新关键路径延时较GRU降低约66.1%,降低了边缘时序推理中的时间步内延时开销。为进一步提升P-SGRU在边缘硬件中的实现效率,本文设计了基于忆阻器的存内计算电路,以协同降低边缘时序推理中的存储、功耗和延时开销。部署后的 P-SGRU 电路在 Row-wise MNIST、IMDB和UCI HAR任务上的分类准确率分别达到 95.03%、86.76%和89.46%,相较于软件模型的最大准确率损失仅为0.02%。进一步的非理想性实验表明,在静态电导偏差和动态读噪声共同作用下,三项分类任务的准确率最大下降0.133%,所设计电路在测试范围内保持了较稳定的分类推理性能。
-
关键词:
- 忆阻器 /
- 循环神经网络(RNN) /
- 逐通道单门循环单元(P-SGRU) /
- 存内计算 /
- 边缘时序推理
Abstract:Objective With the rapid development of edge intelligence, wearable electronics, and Internet-of-Things applications, edge devices increasingly require low-latency and low-power temporal inference under limited storage and hardware resources. Gated recurrent neural networks, such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU), provide strong sequence modeling capability, but their dense hidden-to-hidden transformations introduce considerable parameter storage and vector-matrix multiplication overhead. In addition, the serial dependency between gate-related computation and candidate hidden-state computation increases the intra-step recurrent delay, which limits their efficient deployment in resource-constrained edge systems. Memristor-based in-memory computing can reduce data movement and accelerate vector-matrix operations, but directly mapping conventional gated recurrent structures onto memristor circuits still suffers from complex recurrent paths and peripheral circuit overhead. Therefore, a recurrent structure that jointly considers lightweight recurrence, intra-step parallelism, and hardware implementation efficiency is needed. To address this issue, this paper proposes a Point-Wise Single-Gate Recurrent Unit (P-SGRU) and a corresponding memristor-based in-memory computing circuit for efficient edge temporal inference. Methods P-SGRU is designed to simplify the recurrent path of conventional gated recurrent units. It replaces the fully connected hidden-to-hidden transformation with point-wise recurrent modulation, so that each hidden-state channel is recurrently modulated only by its corresponding channel at the previous time step. A single retention coefficient is introduced to control the fusion of the previous hidden state and the candidate hidden state. By removing the reset-gate-related dependency in GRU, the retention-coefficient branch and the candidate hidden-state branch can be computed in parallel within the same time step, thereby improving intra-step computational parallelism. According to the P-SGRU computation process, a memristor-based in-memory computing circuit is designed, consisting of a retention-coefficient computation unit, a candidate hidden-state computation unit, and a state update unit. Signed weights are represented by positive-negative differential memristor conductance arrays, and point-wise recurrent weights are mapped only to their corresponding channel positions. To reduce the mismatch between software training and circuit implementation, PWL activation-aware training is adopted, where PWL-Sigmoid and PWL-Tanh functions consistent with the circuit implementation are used during training. After training, the weights are quantized to 8 bits and mapped to memristor conductance states. The proposed model is evaluated on Adding Problem, Row-wise MNIST, IMDB, and UCI HAR. For UCI HAR, the original nine-channel smartphone inertial signals with 128 time steps are used to evaluate six-class human activity recognition in a realistic edge-sensing scenario. The corresponding memristor-based circuit is analyzed under a 40 nm process condition. Results and Discussions Compared with LSTM and GRU, the two-layer P-SGRU reduces the number of hidden-to-hidden recurrent parameters by 98.44% and 97.92%, respectively, and removes full hidden-to-hidden vector-matrix multiplication branches ( Table 2 ). On the tested sequence tasks, P-SGRU-2L achieves 98.21%±0.20% accuracy on Row-wise MNIST and 86.85%±0.13% accuracy on IMDB, while the single-layer P-SGRU is selected for circuit implementation considering the model scale and circuit overhead of resource-constrained edge systems (Table 2 ). On UCI HAR, P-SGRU-2L achieves 91.87%±0.94% accuracy and 91.94%±0.94% macro-F1 with 10,246 parameters (Table 2 ). After being mapped to the proposed memristor-based circuit, the single-layer P-SGRU achieves circuit-level accuracies of 95.03%±0.06% and 86.76%±0.05% on Row-wise MNIST and IMDB, respectively, with a maximum accuracy loss of only 0.02% compared with the software model. Under the 40 nm process condition, the proposed P-SGRU circuit shows lower or comparable delay under different task configurations (Table 3 ). In addition, the single-channel, single-time-step update simulation shows that the critical-path delay is reduced from 524.5 ps in GRU to 177.9 ps in P-SGRU, corresponding to a 66.1% reduction, verifying the effect of removing the serial dependency between the retention-coefficient branch and the candidate hidden-state branch.Conclusions This paper addresses efficient temporal inference in resource-constrained edge systems by proposing P-SGRU and its memristor-based in-memory computing circuit implementation. The proposed P-SGRU replaces the fully connected hidden-to-hidden transformation with point-wise recurrent modulation, thereby reducing the parameter scale and computational complexity of the recurrent path. Meanwhile, by decoupling the retention-coefficient branch from the candidate hidden-state branch, P-SGRU improves intra-step computational parallelism and shortens the recurrent update path. Experimental results on Adding Problem, Row-wise MNIST, IMDB, and UCI HAR show that P-SGRU maintains favorable sequence modeling performance while significantly simplifying the recurrent structure. In particular, the UCI HAR results demonstrate that the stacked P-SGRU can effectively model real multi-channel inertial sequences while retaining a lower parameter count than conventional gated recurrent models. Circuit-level evaluation further demonstrates that the P-SGRU circuit after hardware mapping achieves inference results close to those of the software model, and the single-channel single-time-step update critical-path delay is reduced by about 66.1% compared with GRU under the 40 nm process condition. These results indicate that P-SGRU provides a lightweight and efficient algorithm-circuit co-design solution for edge temporal inference. Future work will further extend P-SGRU to more complex edge temporal tasks and explore its integration with high-density in-memory computing arrays and edge intelligence systems for low-power and low-latency temporal inference. -
表 1 SPICE模型主要参数表
参数 数值 参数 数值 $ I_{0}^{-} $ 1.98×10–12A $ {m}^{+} $ 2.85 $ I_{0}^{+} $ 9.27×10–10A $ {A}^{-} $ 5.26×10–5 $ {I}_{0,\text{on}} $ 6.32×10–6A $ {A}^{+} $ 1.44×10–4 $ I_{\text{cc}}^{-} $ 2mA $ {k}_{\text{set}} $ 4.09 $ I_{\text{cc}}^{+} $ 2.12mA $ {k}_{\text{reset}} $ 0.55 $ {V}_{\text{set}} $ 0.86V $ {\alpha }_{\text{s}} $ 0.61 $ {V}_{\text{reset}} $ 0.5V $ {\alpha }_{\text{r}} $ 0.29 $ G_{\text{off}}^{-} $ 1.54×10–5S $ {\beta }_{\text{s}} $ 1.32 $ G_{\text{off}}^{+} $ 8.13×10–6S $ {\beta }_{\text{r}} $ 1.63 $ {G}_{\text{on}} $ 4.46×10–3S $ {x}_{0} $ 5.61×10–11 $ {m}^{-} $ 2.36 表 2 不同循环神经网络模型的复杂度与任务性能对比
模型 层数 H2H
参数量H2H VMM
分支数Adding Problem Row-wise MNIST IMDB UCI HAR 参数量 MSE (×10–4)↓ 参数量 准确率(%)↑ 参数量 准确率(%)↑ 参数量 准确率(%)↑ LSTM 1 16384 4 17473 7.53±6.01 32970 98.19±0.13 41666 86.64±0.27 19590 89.98±0.85 GRU 1 12288 3 13121 4.77±0.78 26954 98.37±0.11 33346 86.72±0.27 14790 90.04±0.49 SRU[18] 1 0 0 833 8.19±2.29 16330 94.56±0.12 20866 86.67±0.24 2886 87.97±0.32 MGU[8] 1 8192 2 8641 8.04±4.82 20810 98.38±0.14 24898 85.80±0.45 9862 89.87±0.75 IndRNN[9] 1 64 0 321 8.25±1.95 10826 91.42±0.27 12610 86.07±0.12 1094 82.90±1.52 P-SGRU 1 128 0 577 9.27±7.26 12746 95.35±0.14 16834 86.81±0.06 1798 88.92±0.55 P-SGRU 2 256 0 9025 5.42±0.48 21194 98.21±0.20 25282 86.85±0.13 10246 91.87±0.94 表 3 本文电路与代表性循环神经网络硬件实现的性能对比
指标 本文 [16] TCAS-I 2025 [17] TED2022 工艺/器件 40 nm,忆阻器 0.45 μm,忆阻器 40 nm,忆阻器 网络结构 P-SGRU GRU GRU 评估范围 P-SGRU模块、P-SGRU完整推理链路 GRU 模块 GRU 单元电路 功耗 / mW 46.51(Adding Problem)
76.54(Row-wise MNIST)
317.25(IMDB)25 173.65(MNIST) 延时/ns 39.90(Adding Problem)
5.59(Row-wise MNIST)
37.82(IMDB)— 45(MNIST) 面积/$ \mu {m}^{2} $ 234.3 302.472 6283.9 -
[1] ROCHA A, MONTEIRO M, MATTOS C, et al. Edge AI for Internet of Medical Things: A literature review[J]. Computers and Electrical Engineering, 2024, 116: 109202. doi: 10.1016/j.compeleceng.2024.109202. [2] GUO Qi, ZHAO Baolin, SONG Mingchen, et al. A survey of deep learning for time series forecasting: Taxonomy, analysis and future directions[J]. IEEE Transactions on Knowledge and Data Engineering, 2026, 38(5): 2541–2560. doi: 10.1109/TKDE.2026.3671378. [3] 周维新, 高肇岗, 肖宛昂. 面向可穿戴式的基于LSTM神经网络的智能心音异常诊断芯片[J]. 电子与信息学报, 2024, 46(2): 555–563. doi: 10.11999/JEIT230934.ZHOU Weixin, GAO Zhaogang, and XIAO Wan’ang. Intelligent heart sound abnormal diagnosis chip based on LSTM for wearable applications[J]. Journal of Electronics & Information Technology, 2024, 46(2): 555–563. doi: 10.11999/JEIT230934. [4] MEHRISH A, MAJUMDER N, BHARADWAJ R, et al. A review of deep learning techniques for speech processing[J]. Information Fusion, 2023, 99: 101869. doi: 10.1016/j.inffus.2023.101869. [5] MAO Yanying, LIU Qun, and ZHANG Yu. Sentiment analysis methods, applications, and challenges: A systematic literature review[J]. Journal of King Saud University-Computer and Information Sciences, 2024, 36(4): 102048. doi: 10.1016/j.jksuci.2024.102048. [6] 任利强, 贾舒宜, 王海鹏, 等. 基于深度学习的时间序列分类研究综述[J]. 电子与信息学报, 2024, 46(8): 3094–3116. doi: 10.11999/JEIT231222.REN Liqiang, JIA Shuyi, WANG Haipeng, et al. A review of research on time series classification based on deep learning[J]. Journal of Electronics & Information Technology, 2024, 46(8): 3094–3116. doi: 10.11999/JEIT231222. [7] GREFF K, SRIVASTAVA R K, KOUTNÍK J, et al. LSTM: A search space odyssey[J]. IEEE Transactions on Neural Networks and Learning Systems, 2017, 28(10): 2222–2232. doi: 10.1109/TNNLS.2016.2582924. [8] ZHOU Guobing, WU Jianxin, ZHANG Chenlin, et al. Minimal gated unit for recurrent neural networks[J]. International Journal of Automation and Computing, 2016, 13(3): 226–234. doi: 10.1007/s11633-016-1006-2. [9] LI Shuai, LI Wanqing, COOK C, et al. Independently recurrent neural network (IndRNN): Building a longer and deeper RNN[C]. Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 2018: 5457–5466. doi: 10.1109/CVPR.2018.00572. [10] HASSAAN Z A, YACOUB M H, and SAID L A. Gated recurrent unit accelerators for financial time series prediction on field-programmable gate array[J]. Engineering Applications of Artificial Intelligence, 2025, 162: 112534. doi: 10.1016/j.engappai.2025.112534. [11] AGUIRRE F, SEBASTIAN A, LE GALLO M, et al. Hardware implementation of memristor-based artificial neural networks[J]. Nature Communications, 2024, 15(1): 1974. doi: 10.1038/s41467-024-45670-9. [12] 谢力凡, 卫松涛, 姚鹏, 等. 基于反向编程策略的高并行高精度RRAM存算一体芯片[J]. 电子与信息学报, 2026, 48(5): 1875–1883. doi: 10.11999/JEIT251174.XIE Lifan, WEI Songtao, YAO Peng, et al. A fast and accurate programming strategy for analog in-memory computing validated with a transposable RRAM Macro and 0.64% fully-parallel RMS error[J]. Journal of Electronics & Information Technology, 2026, 48(5): 1875–1883. doi: 10.11999/JEIT251174. [13] WANG Shiqing and SUN Zhong. Dual in-memory computing of matrix-vector multiplication for accelerating neural networks[J]. Device, 2024, 2(12): 100546. doi: 10.1016/j.device.2024.100546. [14] 李源堃, 王泽, 张清天, 等. NAS4CIM: 面向忆阻器存算一体芯片的神经网络结构搜索框架[J]. 电子与信息学报, 2025, 47(12): 4948–4958. doi: 10.11999/JEIT250978.LI Yuankun, WANG Ze, ZHANG Qingtian, et al. NAS4CIM: Tailored neural network architecture search for RRAM-based compute-in-memory chips[J]. Journal of Electronics & Information Technology, 2025, 47(12): 4948–4958. doi: 10.11999/JEIT250978. [15] YANG Le, LEI Jun, CHENG Ming, et al. Memristor-based circuit design of BiLSTM network[J]. Neural Networks, 2025, 181: 106780. doi: 10.1016/j.neunet.2024.106780. [16] WANG Yanfeng, SONG Yibo, CHEN Yu, et al. Memristor-based circuit optimized gate recurrent unit for wind power prediction[J]. IEEE Transactions on Circuits and Systems I: Regular Papers, 2026, 73(3): 1828–1839. doi: 10.1109/TCSI.2025.3602022. [17] ZHANG Zhang, CHEN Qilai, HAN Tingting, et al. Memristor-based circuit demonstration of gated recurrent unit for predictable neural network[J]. IEEE Transactions on Electron Devices, 2022, 69(12): 6763–6768. doi: 10.1109/TED.2022.3217116. [18] LEI Tao, ZHANG Yu, WANG S I, et al. Simple recurrent units for highly parallelizable recurrence[C]. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 2018: 4470–4481. doi: 10.18653/v1/D18-1477. -
下载: