Skip to main content
QUICK REVIEW

[论文解读] TensorNetwork for Machine Learning

Stavros Efthymiou, Jack D. Hidary|arXiv (Cornell University)|Jun 7, 2019
Quantum many-body systems参考文献 31被引用 62
一句话总结

本文展示了通过 TensorNetwork 库使用矩阵积态张量网络进行图像分类,在 GPU 加速的自动梯度训练下,在 MNIST 的测试准确率达到 98%,在 Fashion-MNIST 的测试准确率达到 88%。

ABSTRACT

We demonstrate the use of tensor networks for image classification with the TensorNetwork open source library. We explain in detail the encoding of image data into a matrix product state form, and describe how to contract the network in a way that is parallelizable and well-suited to automatic gradients for optimization. Applying the technique to the MNIST and Fashion-MNIST datasets we find out-of-the-box performance of 98% and 88% accuracy, respectively, using the same tensor network architecture. The TensorNetwork library allows us to seamlessly move from CPU to GPU hardware, and we see a factor of more than 10 improvement in computational speed using a GPU.

研究动机与目标

  • 展示张量网络如何应用于图像分类。
  • 将图像数据编码为矩阵积态形式并使用自动梯度进行训练。
  • 展示在 MNIST 和 Fashion-MNIST 数据集上的性能与加速效果。
  • 提供开源代码以及 TensorNetwork 与 TensorFlow 的集成,供从业者使用。

提出的方法

  • 将每个图像像素编码为一个二维局部特征映射,以形成数据张量。
  • 将分类器表示为带标签索引的 MPS 张量,并与编码数据计算内积以得到 f^(l)(x)。
  • 使用带标签的多类交叉熵和 softmax 进行训练,并通过自动微分进行反向传播。
  • 讨论收缩顺序和计算成本,偏向可并行化的收缩策略。
  • 利用 TensorFlow 后端来启用自动梯度和 Adam 优化用于训练。
  • 比较 CPU 与 GPU 的性能,并评估对结合维度 chi 的依赖(chi ≳ 10)。

实验结果

研究问题

  • RQ1一个矩阵积态张量网络能否在 MNIST 和 Fashion-MNIST 上有效地进行图像分类?
  • RQ2结合维度 chi 对准确率和训练成本有何影响?
  • RQ3TensorNetwork 与 TensorFlow 如何实现基于梯度的张量网络优化?
  • RQ4将该方法从 CPU 提升到 GPU 的实际加速有多大?
  • RQ5收缩顺序如何影响计算效率与并行性?

主要发现

  • 在完整的 60k 训练集、10k 测试集分割上,使用 MPS 网络的 MNIST 测试准确率约 98%。
  • 在同一架构和设置下,Fashion-MNIST 的测试准确率约 88%。
  • 对于相同代码基,GPU 训练的每轮墙钟时间约比 CPU 快 10 倍。
  • 在 chi ≳ 10 时,最终准确率对结合维度 chi 的依赖很小。
  • 带 softmax 的交叉熵损失在最终准确度方面与均方误差相当。
  • 使用自动梯度(TensorFlow)的训练对于基于 MPS 的分类是可行且有效的。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。