高级搜索

留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

面向中文文本分类的高效超维计算加速器设计

余天洋 吴比 刘伟强

余天洋, 吴比, 刘伟强. 面向中文文本分类的高效超维计算加速器设计[J]. 电子与信息学报. doi: 10.11999/JEIT260556
引用本文: 余天洋, 吴比, 刘伟强. 面向中文文本分类的高效超维计算加速器设计[J]. 电子与信息学报. doi: 10.11999/JEIT260556
YU Tianyang, WU Bi, LIU Weiqiang. Efficient Hyperdimensional Computing Accelerator Design for Chinese Text Classification Task[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260556
Citation: YU Tianyang, WU Bi, LIU Weiqiang. Efficient Hyperdimensional Computing Accelerator Design for Chinese Text Classification Task[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260556

面向中文文本分类的高效超维计算加速器设计

doi: 10.11999/JEIT260556 cstr: 32379.14.JEIT260556
基金项目: 国家自然科学基金(62425404, 92364201, 62522406),江苏省基础研究重点项目(BK20253023)
详细信息
    作者简介:

    余天洋:男,博士研究生,研究方向为新兴计算范式与架构

    吴比:男,副研究员,研究方向为磁存储器、存内计算等

    刘伟强:男,教授,研究方向为高能效、高安全新兴计算芯片

    通讯作者:

    刘伟强 liuweiqiang@nuaa.edu.cn

  • 中图分类号: TN4; TP391

Efficient Hyperdimensional Computing Accelerator Design for Chinese Text Classification Task

Funds: The National Natural Science Foundation of China (62425404, 92364201, 62522406), Basic Research Program of Jiangsu (BK20253023)
  • 摘要: 随着物联网、智能穿戴及离线终端等边缘计算场景的蓬勃发展,在本地设备上进行低延迟、高隐私的中文文本分析已成为智能交互与数据处理的核心需求。尽管基于神经网络、Transformer的语言模型展现出卓越的准确率,但其庞大的参数规模与计算开销,使其难以在功耗与存储极度受限的边缘设备上落地。超维计算(HDC)作为一种新兴的类脑计算范式,通过2K-10K维度的超向量表征文本,以轻量级的“编码-查询”机制替代了复杂的多层网络结构,为边缘侧文本任务提供了硬件友好型的技术路径。然而,现有HDC研究主要面向由少量字母构成的拼音文字系统如英文。对于拥有庞大字符集的中文,现有方法会因基超向量数量的剧增而导致存储开销显著上升,这直接破坏了其在边缘侧部署的轻量化优势。为突破中文文本在边缘侧的高效表征瓶颈,该文基于汉字独特的书写与结构特征,提出了一种高效的汉字超维编码方法,并构建了专为边缘侧中文文本分类设计的超维计算框架HDChinese。此外,为进一步适配边缘硬件环境,该文还设计了与HDChinese适配的加速器架构。实验结果表明,在维持分类准确率相当的前提下,HDChinese及其硬件加速器能够将模型复杂度大幅缩减99%以上,同时实现4.91%-77.36%的训练时间缩短以及6.67%-47.25%的推理延迟降低。该研究有效兼顾了准确性与极低开销,为边缘设备上的中文文本分析任务提供了理想的硬件解决方案。
  • 图  1  受英文键盘汉字输入法启发的汉字超维编码方法

    图  2  超维计算加速器架构示意图

    图  3  随超向量维度变化的分类准确率曲线

    图  4  分类准确率对比

    表  1  汉字超维编码方法对比

    编码方法 检索库空间占用(拼音+顺序;五笔) 基超向量空间占用 总空间占用
    超向量直接表征的方法 0 3500×2000 bit=7 Mbit 7Mbit
    基于拼音的方法 3500×(6×5 bit)+3500×6 bit=126 Kbit 26×2000 bit=52 Kbit 178 Kbit
    基于五笔的方法 3500×(4×5 bit)=70 Kbit 26×2000 bit=52 Kbit 122 Kbit
    下载: 导出CSV

    表  2  评估所用数据集

    数据集名称 类别数 内容简介
    waimai_10k* 2 某外卖平台收集的用户评价,正向4000条,负向8000
    weibo_100k* 2 带情感标注新浪微博评论文本,正负向评论约各5万条
    online_shopping* 2 共6万余条电商评论数据,正、负向评论各约3万条
    TelecomFraud[22] 5 包含4种电信诈骗类型的文本,各约1000条,以及1类非诈骗的文本约8000
    *开源地址:https://github.com/SophonPlus/ChineseNlpCorpus
    下载: 导出CSV

    表  3  硬件参数

    硬件描述主频LUTFlipFlopBRAMDSP功耗
    CPU4核Cortex-A53 CPU1.2GHz----1.71W
    FPGAUltrascale+ FPGA100MHz250602787756.500.278W
    下载: 导出CSV

    表  4  不同超维编码方法准确率对比

    waimai_10kweibo_100konline_shoppingTelecomFraud
    基于拼音的方法83.82%90.27%80.1%93.5%
    基于五笔的方法84.86%91.4%80.2%94.18%
    基于五笔的方法*84.73%
    (0.38%)
    90.76%
    (1.12%)
    79.92%
    (0.21%)
    94.14%
    (0.2%)
    *保留对生僻字(3500个常用汉字以外的字)的超维表征,括号中是生僻字在数据集中出现的频率
    下载: 导出CSV

    表  5  跨域泛化准确率对比

    waimai_10kweibo_100konline_shopping
    在waimai_10k上训练84.86%64.91%71.67%
    在weibo_100k上训练65.01%91.4%58.63%
    在online_shopping
    上训练
    71.35%59.58%80.2%
    下载: 导出CSV

    表  6  加速器在不同主频下的实测性能

    主频 waimai_10k weibo_100k online_shopping TelecomFraud
    训练
    吞吐率*
    推理
    吞吐率*
    功率 训练
    吞吐率*
    推理
    吞吐率*
    功率 训练
    吞吐率*
    推理
    吞吐率*
    功率 训练
    吞吐率*
    推理
    吞吐率*
    功率
    50 MHz 2350.24 2321.39 0.191 W 1370.3 1374.63 0.21 W 1221.13 1196.27 0.219 W 639.87 627.74 0.219 W
    100 MHz 2523.42 2497.62 0.25 W 1991.08 1975.14 0.278 W 1835.72 1827.66 0.289 W 1212.1 1201.53 0.294 W
    150 MHz 2497.14 2462.01 0.35 W 1993.73 1972.71 0.381 W 1897.14 1832.58 0.385 W 1389.09 1394.07 0.393 W
    *吞吐率指标SPS:Samples Per Second,每秒处理样本数量
    下载: 导出CSV

    表  7  性能对比

    waimai_10kweibo_100konline_shoppingTelecomFraud
    训练
    时间
    推理
    时间
    模型
    大小
    训练
    时间
    推理
    时间
    模型
    大小
    训练
    时间
    推理
    时间
    模型
    大小
    训练
    时间
    推理
    时间
    模型
    大小
    kNN1.52 s24 s43.97 MB内存溢出内存溢出3.93 s24.27 s43.18 MB
    SVM184.71 s69.05 s19.4 MB运行时间超过1小时运行时间超过1小时75.55 s34.56 s9.5 MB
    Random Forest68.29 s1.82 s28.96 MB1284.28 s19.96 s102.3M B583.52 s10.94 s118.2 MB59.44 s2.1s11.96 MB
    HDChinese3.8 s0.96 s15.38 KB48.21 s12.15 s15.38 KB27.35 s6.87 s15.38 KB7.77 s1.96 s16.11 KB
    HDChinese*22.8 s0.96 s15.38 KB290.71 s12.15 s15.38 KB164.1 s6.87 s15.38 KB46.52 s1.96 s16.11 KB
    *在训练完成后加入了5轮的重训练,因此总训练时间(包括1轮训练和5轮重训练)更长,但不影响其他性能
    下载: 导出CSV
  • [1] ZHAO Jinghua, SHU Xi, ZHAO Xiaohua, et al. Online opinion trend prediction for public health events based on time series transformer[J]. IEEE Transactions on Computational Social Systems, 2026, 13(1): 1159–1168. doi: 10.1109/TCSS.2025.3617491.
    [2] 朱振方, 李嘉欣, 徐富永, 等. 一种融合情感和策略信息的共情对话生成方法[J]. 电子与信息学报, 2024, 46(8): 3382–3389. doi: 10.11999/JEIT231417.

    ZHU Zhenfang, LI Jiaxin, XU Fuyong, et al. Empathetic dialogue generation via sentiment and support strategy[J]. Journal of Electronics & Information Technology, 2024, 46(8): 3382–3389. doi: 10.11999/JEIT231417.
    [3] LIU Fengyu. Research on user dynamic preference modeling and recommendation system based on text sentiment transfer[C]. 2025 2nd International Conference on Intelligent Computing and Robotics (ICICR), Dalian, China, 2025: 1088–1092. doi: 10.1109/ICICR65456.2025.00192.
    [4] LIU Pengfei, QIU Xipeng, and HUANG Xuanjing. Recurrent neural network for text classification with multi-task learning[C]. Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, New York, USA, 2016: 2873–2879.
    [5] ZHENG Yafeng, GAO Zhanghao, SHEN Jun, et al. Optimizing automatic text classification approach in adaptive online collaborative discussion-a perspective of attention mechanism-based bi-LSTM[J]. IEEE Transactions on Learning Technologies, 2023, 16(5): 591–602. doi: 10.1109/tlt.2022.3192116.
    [6] JIANG Ting, WANG Deqing, SUN Leilei, et al. LightXML: Transformer with dynamic negative sampling for high-performance extreme multi-label text classification[C]. Proceedings of the 35th AAAI Conference on Artificial Intelligence, 2021: 7987–7994. doi: 10.1609/aaai.v35i9.16974.(查阅网上资料,未找到本条文献出版地信息,请确认).
    [7] 王泽昊, 朱振华, 谢童欣, 等. 混合专家大语言模型的系统与架构优化技术综述[J]. 电子与信息学报, 2025, 47(11): 4055–4078. doi: 10.11999/JEIT250407.

    WANG Zehao, ZHU Zhenhua, XIE Tongxin, et al. A survey on system and architecture optimization techniques for mixture-of-experts large language models[J]. Journal of Electronics & Information Technology, 2025, 47(11): 4055–4078. doi: 10.11999/JEIT250407.
    [8] 刘文波, 姚翼荣, 张弓, 等. 超维计算概念、应用及研究进展[J]. 系统工程与电子技术, 2023, 45(7): 1938–1956. doi: 10.12305/j.issn.1001-506X.2023.07.04.

    LIU Wenbo, YAO Yirong, ZHANG Gong, et al. Concept, application, and research progress of hyperdimensional computing[J]. Systems Engineering and Electronics, 2023, 45(7): 1938–1956. doi: 10.12305/j.issn.1001-506X.2023.07.04.
    [9] 余天洋, 吴比, 陈珂, 等. 超维计算硬件设计: 进展、趋势和展望[J]. 集成电路与嵌入式系统, 2025, 25(8): 1–9. doi: 10.20193/j.ices2097-4191.2025.0047.

    YU Tianyang, WU Bi, CHEN Ke, et al. Hyperdimensional computing hardware: Progress, trends and prospects[J]. Integrated Circuits and Embedded Systems, 2025, 25(8): 1–9. doi: 10.20193/j.ices2097-4191.2025.0047.
    [10] RAHIMI A, KANERVA P, and RABAEY J M. A robust and energy-efficient classifier using brain-inspired hyperdimensional computing[C]. Proceedings of the 2016 International Symposium on Low Power Electronics and Design, San Francisco Airport, USA, 2016: 64–69. doi: 10.1145/2934583.2934624.
    [11] THAPA R, LAMICHHANE B, MA Dongning, et al. SpamHD: Memory-efficient text spam detection using brain-inspired hyperdimensional computing[C]. 2021 IEEE Computer Society Annual Symposium on VLSI (ISVLSI), Tampa, USA, 2021: 84–89. doi: 10.1109/isvlsi51109.2021.00026.
    [12] ALONSO P, SHRIDHAR K, KLEYKO D, et al. HyperEmbed: Tradeoffs between resources and performance in NLP tasks with hyperdimensional computing enabled embedding of n-gram statistics[C]. 2021 International Joint Conference on Neural Networks (IJCNN), Shenzhen, China, 2021: 1–9. doi: 10.1109/IJCNN52387.2021.9534359.
    [13] PARK S, KIM K, SEO J, et al. Unsupervised extractive dialogue summarization in hyperdimensional space[C]. ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, Korea, 2024: 12411–12415. doi: 10.1109/ICASSP48485.2024.10446698.
    [14] MIKOLOV T, CHEN Kai, CORRADO G, et al. Efficient estimation of word representations in vector space[C]. 1st International Conference on Learning Representations, Scottsdale, USA, 2013.
    [15] PENNINGTON J, SOCHER R, and MANNING C D. GloVe: Global vectors for word representation[C]. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 2014: 1532–1543. doi: 10.3115/v1/D14-1162.
    [16] DEVLIN J, CHANG Mingwei, LEE K, et al. BERT: Pre-training of deep bidirectional transformers for language understanding[C]. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (long and short papers), Minneapolis, USA, 2019: 4171–4186. doi: 10.18653/v1/N19-1423.
    [17] LIU Caizhi, SEHNG Yanxiu, WEI Zhiqiang, et al. Research of text classification based on improved TF-IDF algorithm[C]. IEEE International Conference of Intelligent Robotic and Control Engineering (IRCE), Lanzhou, China, 2018: 218–222. doi: 10.1109/IRCE.2018.8492945.
    [18] YU Tianyang, WU Bi, CHEN Ke, et al. Fully learnable hyperdimensional computing framework with ultratiny accelerator for edge-side applications[J]. IEEE Transactions on Computers, 2024, 73(2): 574–585. doi: 10.1109/tc.2023.3337316.
    [19] GE Lulu and PARHI K K. Classification using hyperdimensional computing: A review[J]. IEEE Circuits and Systems Magazine, 2020, 20(2): 30–47. doi: 10.1109/mcas.2020.2988388.
    [20] GORBAN A N and TYUKIN I Y. Blessing of dimensionality: Mathematical foundations of the statistical physics of data[J]. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 2018, 376(2118): 20170237. doi: 10.1098/rsta.2017.0237.
    [21] SHIN S H, YOO Y, MOON Y, et al. STAR-PIM: Self-test and repair structure for processing-in-memory with adder tree-based MAC[J]. IEEE Transactions on Circuits and Systems I: Regular Papers, 2026, 73(3): 1990–2003. doi: 10.1109/tcsi.2025.3615631.
    [22] LI Jun, ZHANG Cheng, and JIANG Lanlan. Innovative telecom fraud detection: A new dataset and an advanced model with RoBERTa and dual loss functions[J]. Applied Sciences, 2024, 14(24): 11628. doi: 10.3390/app142411628.
    [23] 王杰, 王鹃. 面向RISC-V平台的安全高效固件可信平台模块设计与实现[J]. 电子与信息学报, 2025, 47(7): 2385–2395. doi: 10.11999/JEIT241112.

    WANG Jie and WANG Juan. The design and implementation of a secure and efficient firmware trusted platform module for RISC-V platforms[J]. Journal of Electronics & Information Technology, 2025, 47(7): 2385–2395. doi: 10.11999/JEIT241112.
  • 加载中
图(4) / 表(7)
计量
  • 文章访问数:  72
  • HTML全文浏览量:  20
  • PDF下载量:  4
  • 被引次数: 0
出版历程
  • 修回日期:  2026-07-28
  • 录用日期:  2026-07-28
  • 网络出版日期:  2026-08-07

目录

    /

    返回文章
    返回