[论文解读] COSIME: FeFET based Associative Memory for In-Memory Cosine Similarity Search
COSIME 提出了一种基于铁电场效应晶体管(FeFET)的存内关联内存,用于高效执行余弦相似度搜索(CSS),通过电流模式模拟电路与赢家通吃(WTA)逻辑,在存储的向量上实现并行、低功耗的CSS。与近似CSS设计相比,其延迟降低333倍,能耗减少90.5倍;与GPU相比,在HDC推理中实现47.1倍的加速和98.5倍的能效提升。
In a number of machine learning models, an input query is searched across the trained class vectors to find the closest feature class vector in cosine similarity metric. However, performing the cosine similarities between the vectors in Von-Neumann machines involves a large number of multiplications, Euclidean normalizations and division operations, thus incurring heavy hardware energy and latency overheads. Moreover, due to the memory wall problem that presents in the conventional architecture, frequent cosine similarity-based searches (CSSs) over the class vectors requires a lot of data movements, limiting the throughput and efficiency of the system. To overcome the aforementioned challenges, this paper introduces COSIME, an general in-memory associative memory (AM) engine based on the ferroelectric FET (FeFET) device for efficient CSS. By leveraging the one-transistor AND gate function of FeFET devices, current-based translinear analog circuit and winner-take-all (WTA) circuitry, COSIME can realize parallel in-memory CSS across all the entries in a memory block, and output the closest word to the input query in cosine similarity metric. Evaluation results at the array level suggest that the proposed COSIME design achieves 333X and 90.5X latency and energy improvements, respectively, and realizes better classification accuracy when compared with an AM design implementing approximated CSS. The proposed in-memory computing fabric is evaluated for an HDC problem, showcasing that COSIME can achieve on average 47.1X and 98.5X speedup and energy efficiency improvements compared with an GPU implementation.
研究动机与目标
- 解决冯·诺依曼架构中余弦相似度搜索(CSS)因大量乘法、归一化和除法操作导致的高能耗与高延迟问题。
- 通过减少数据移动实现传统系统中的内存墙问题突破,实现存内计算。
- 设计一种通用、高能效且高精度的CSS加速器,适用于机器学习工作负载,特别是超维计算(HDC)和深度神经网络(DNN)推理。
- 在保持硬件效率的同时,实现与全精度软件CSS相当的高精度。
- 利用非易失性存储器(NVM)技术(超越FeFET)实现可扩展且鲁棒的存内CSS,确保广泛适用性。
提出的方法
- 使用两个FeFET阵列:一个用于计算输入查询与存储类别向量之间的逐行点积,另一个用于通过位计数估算L2范数。
- 采用电流模式的对数线性模拟电路,计算平方L2范数并执行余弦相似度所需的除法运算。
- 集成赢家通吃(WTA)电路,以并行方式识别与输入查询余弦相似度最高的向量。
- 利用FeFET的单晶体管与门功能,实现非易失性存储与存内计算。
- 设计与NVM阵列无关的外围电路,只要输出电流在检测范围内,即可兼容其他NVM(如ReRAM)。
- 采用模拟计算以避免数字算术瓶颈,降低面积与能耗。
实验结果
研究问题
- RQ1基于FeFET的存内关联内存能否在低延迟与低能耗下实现高精度余弦相似度搜索?
- RQ2与现有基于汉明距离或近似余弦度量的近似CSS加速器相比,所提出的COSIME设计在性能与精度方面表现如何?
- RQ3COSIME在内存受限工作负载(如HDC推理)中,能在多大程度上减少数据移动并提升吞吐量?
- RQ4在真实部署中,COSIME对器件失配与模拟电路误差的鲁棒性如何?
- RQ5COSIME架构能否推广至FeFET以外的其他NVM技术?
主要发现
- 与采用相同FeFET技术的现有近似CSS设计相比,COSIME实现333倍加速与90.5倍能耗降低。
- 在HDC分类任务中,COSIME在1,000维超向量下,相比NVIDIA 1080 GPU实现47.1倍更高的吞吐量与98.5倍更好的能效。
- 通过实现精确的余弦相似度计算,COSIME保持了高分类准确率——平均比基于汉明距离的方法高出7%。
- 系统对器件失配具有鲁棒性,HDC分类在AM中容忍高达10%的误差率,该误差范围在HDC固有的容错能力范围内。
- 该设计可推广至其他具备访问晶体管的NVM,因外围电路与存储阵列技术无关。
- 在高维与大类别数的数据集(如含26个类别的ISOLET)中,COSIME受益最大,展现出最显著的加速与能效提升。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。