Deep neural networks (DNNs) have proven to be effective models for accurate Memory Access Prediction (MAP), a critical task in mitigating memory latency through data prefetching. However, existing DNN-based MAP models suffer from the challenges such as significant physical storage space and poor inference latency, primarily due to their large number of parameters. These limitations render them impractical for deployment in real-world scenarios. In this paper, we propose PaCKD, a Pattern-Clustered Knowledge Distillation approach to compress MAP models while maintaining the prediction performance. The PaCKD approach encompasses three steps: clustering memory access sequences into distinct partitions involving similar patterns, training large pattern-specific teacher models for memory access prediction for each partition, and training a single lightweight student model by distilling the knowledge from the trained pattern-specific teachers. We evaluate our approach on LSTM, MLP-Mixer, and ResNet models, as they exhibit diverse structures and are widely used for image classification tasks in order to test their effectiveness in four widely used graph applications. Compared to the teacher models with 5.406M parameters and an F1-score of 0.4626, our student models achieve a 552$\times$ model size compression while maintaining an F1-score of 0.4538 (with a 1.92% performance drop). Our approach yields an 8.70% higher result compared to student models trained with standard knowledge distillation and an 8.88% higher result compared to student models trained without any form of knowledge distillation.
翻译:深度神经网络(DNN)已被证明是精确内存访问预测(MAP)的有效模型,该任务通过数据预取缓解内存延迟。然而,现有基于DNN的MAP模型面临显著物理存储空间和推理延迟较高的挑战,这主要源于其庞大的参数量。这些局限性使其难以在真实场景中部署。本文提出PaCKD——一种模式聚类知识蒸馏方法,在保持预测性能的同时压缩MAP模型。PaCKD方法包含三个步骤:将内存访问序列聚类为具有相似模式的独立分区;针对每个分区训练大规模模式专用教师模型进行内存访问预测;通过从训练好的模式专用教师模型中蒸馏知识,训练单个轻量级学生模型。我们在LSTM、MLP-Mixer和ResNet模型上评估该方法,这些模型结构多样且广泛用于图像分类任务,以检验其在四个常用图应用中的有效性。与具有540.6万参数和0.4626 F1分数的教师模型相比,我们的学生模型实现了552倍模型尺寸压缩,同时保持0.4538的F1分数(性能下降1.92%)。与标准知识蒸馏训练的学生模型相比,我们的方法结果高出8.70%;与无任何知识蒸馏训练的学生模型相比,结果高出8.88%。