With the wide and deep adoption of deep learning models in real applications, there is an increasing need to model and learn the representations of the neural networks themselves. These models can be used to estimate attributes of different neural network architectures such as the accuracy and latency, without running the actual training or inference tasks. In this paper, we propose a neural architecture representation model that can be used to estimate these attributes holistically. Specifically, we first propose a simple and effective tokenizer to encode both the operation and topology information of a neural network into a single sequence. Then, we design a multi-stage fusion transformer to build a compact vector representation from the converted sequence. For efficient model training, we further propose an information flow consistency augmentation and correspondingly design an architecture consistency loss, which brings more benefits with less augmentation samples compared with previous random augmentation strategies. Experiment results on NAS-Bench-101, NAS-Bench-201, DARTS search space and NNLQP show that our proposed framework can be used to predict the aforementioned latency and accuracy attributes of both cell architectures and whole deep neural networks, and achieves promising performance.
翻译:随着深度学习模型在实际应用中的广泛深入部署,对神经网络本身进行建模和表示学习的需求日益增长。此类模型可用于估计不同神经网络架构的属性(如准确率和延迟),而无需执行实际的训练或推理任务。本文提出一种神经网络架构表示模型,能够整体估计这些属性。具体而言,我们首先设计了一种简单有效的分词器,将神经网络的操作和拓扑信息编码为单一序列;随后,构建了一个多阶段融合Transformer,从转换后的序列中生成紧凑的向量表示。为提升训练效率,我们进一步提出信息流一致性增强方法,并相应设计了架构一致性损失函数,相较以往的随机增强策略,该方法能用更少的增强样本带来更多收益。在NAS-Bench-101、NAS-Bench-201、DARTS搜索空间及NNLQP上的实验结果表明,本文提出的框架能够预测细胞架构及整个深度神经网络的延迟与准确率属性,并取得了显著性能。