图深度学习系统DGL介绍和展望

如果无法正常显示,请先停止浏览器的去广告插件。
分享至:
1. 构建高效易用的图深度学习平台 王敏捷 资深应用科学家 亚马逊云科技上海人工智能研究院 © 2021, Amazon Web Services, Inc. or its Affiliates.
2. 图数据无处不在 药物和分子结构 用户产品交互网络 © 2021, Amazon Web Services, Inc. or its Affiliates. 社交网络 知识图谱
3. 社交平台上的水军检测 • 通过用户的交互行为检测潜在的恶意评论。 帖子 • 两类节点分别代表用户和内容(帖子,博客 等)。 用户 © 2021, Amazon Web Services, Inc. or its Affiliates.
4. 药物重定位知识图谱 (DRKG) • • • • 合并了6个不同的药物信息数据集 13个类别共100K个节点; 100+类别共6M条边 药物重定位 :搜索能作用于相似的疾病蛋白的药物化合物 通过图数据分析所推荐的41种药物中,有11种已经被用于 Covid-19的临床治疗。 © 2021, Amazon Web Services, Inc. or its Affiliates. 数据和预训练模型已发布在 https://github.com/gnn4dr/DRKG
5. 图 + 深度学习 => 图神经网络 (GNN) © 2021, Amazon Web Services, Inc. or its Affiliates.
6. 什么是图神经网络? 用于学习点、边或者整张图的向量表示的一类深度神经网络 图神经网络 © 2021, Amazon Web Services, Inc. or its Affiliates. 分类器
7. 图神经网络基于消息传递 消息函数 更新函数 © 2021, Amazon Web Services, Inc. or its Affiliates. 累和函数
8. 图卷积网络 (GCN) 邻接矩阵 A + I 节点表示 度数矩阵 矩阵形式 可学习权重 消息传递形式 更新函数 © 2021, Amazon Web Services, Inc. or its Affiliates. 累和函数 消息函数
9. 为什么编写图神经网络那么难? h 5 v 5 h 2 v 2 𝑚𝑠𝑔 51 = ℎ 5 v 1 5 ℎ 1𝑛𝑒𝑤 = 𝑓(෍ 𝑚𝑠𝑔 𝑗1 ) 2 v 4 v 3 h 4 h 3 消息传递计算是一种细粒度计算 • 边: 如何计算和发送消息 • 点: 如何聚合和使用消息 © 2021, Amazon Web Services, Inc. or its Affiliates. 张量编程接口则需要定义粗粒度计算 • 如何生成、变换张量数据结构
10. Deep Graph Library (DGL) © 2021, Amazon Web Services, Inc. or its Affiliates.
11. © 2021, Amazon Web Services, Inc. or its Affiliates.
12. 以“图”为本 • 图是程序中的“一等公民” • 所有DGL的函数和NN模块都可以接受和返回图对象。 • 消息传递API © 2021, Amazon Web Services, Inc. or its Affiliates.
13. 丰富且灵活的面向图数据的接口 使用DGL提供的GNN模块快 速定义图神经网络 图与张量同为核心数据结构 DGL提供100+图API • • • • • • 构图算法 图的增删修改 子图抽取和采样 图遍历算法 图变换算法 图和各类数据格式的转换 (NetworkX, Scipy Sparse Matrix等) 支持异构图(Heterogeneous Graph) 支持GPU加速 支持多平台(PyTorch, TensorFlow, MXNet) © 2021, Amazon Web Services, Inc. or its Affiliates.
14. 灵活的消息传递函数 通过ndata, edata访问节点和边的特征数据 消息函数 © 2021, Amazon Web Services, Inc. or its Affiliates. 触发消息传递 累和函数
15. 消息传递计算是GNN的核心 • 消息传递计算可以占到整个GNN训练的 50% 以上! • 传统的基于gather/scatter原语的消息传递模式消耗大量内存带宽。 计算过程中产生大量冗余的消息 对象!占用大量内存带宽! • DGL首先提出算子融合技术对消息传递进行优化。 © 2021, Amazon Web Services, Inc. or its Affiliates.
16. 稀疏-稠密矩阵乘法算子 (SpMM) 图卷积网络 Sparse-dense Matrix Multiplication © 2021, Amazon Web Services, Inc. or its Affiliates. 避免生成中间消息结果, 更加高效!
17. 采样-稠密矩阵乘法算子 (SDDMM) 避免了将点上数据拷贝到边上 的带宽开销! 计算边上注意力权重 Sampled Dense-Dense Matrix Multiplication © 2021, Amazon Web Services, Inc. or its Affiliates.
18. DGL通过拓展SpMM和SDDMM算子支持更高效的消息传递计算 • 传统SpMM和SDDMM是 乘加操作 ,g-SpMM和g-SDDMM 更加灵活 。 • 传统SpMM和SDDMM的计算单元是 标量 ,g-SpMM和g-SDDMM则允许 张量 计算 单元。 Deep Graph Library: A Graph-Centric, Highly-Performant Package for Graph Neural Networks, https://arxiv.org/abs/1909.01315 © 2021, Amazon Web Services, Inc. or its Affiliates.
19. 性能评测 最高快64x(CPU),1.7x(GPU) GAT on synthetic dataset 并能节省6.3倍的内存 (GAT) Benchmark results v.s. PyG 1.5.0 © 2021, Amazon Web Services, Inc. or its Affiliates.
20. 真实图数据规模巨大 • 学术圈越来越关注大规模图数据 • 工业界图在百亿甚至千亿量级 © 2021, Amazon Web Services, Inc. or its Affiliates.
21. 巨图训练基于子图采样 GNN的小批次训练(mini-batch training)基于子图采样 1. 对目标节点随机选取部分邻居节点,并 迭代拓展。 2. 抽取采样的边形成子图。 3. 抽取子图特征。 4. 在子图上训练网络并更新参数。 5. 重复步骤 1直至收敛 © 2021, Amazon Web Services, Inc. or its Affiliates.
22. DGL针对巨图训练的优化 • 通过高效的图划分减少机器间通信 • 通过zero-copy等技巧优化底层数据传 输 • 灵活易用针对图节点和边特征特化 的KVStore • 针对GNN训练多环节的特点设计流水 线(pipelining),最大程度将数据传 输和计算进行并行。 © 2021, Amazon Web Services, Inc. or its Affiliates. 支持多机多GPU训练 支持多机图数据存储和划分 编程接口和单机保持高度一致 支持十亿量级图数据(更大规模数 据在内部测试中) ✓ 在ogbn-paper100M图上,使用64块 GPU,DGL分布式训练能在5-10秒完 成一个epoch,并在4分钟训练一整 个GraphSAGE模型。 ✓ ✓ ✓ ✓
23. DGL目前已开源 https://github.com/dmlc/dgl © 2021, Amazon Web Services, Inc. or its Affiliates. https://www.dgl.ai
24. DGL目前已开源 • 项目上线初就获得广泛关注和好评。 • Github Stars: 8K+, Forks: 1.7K, 贡献者: 148 • DGL论文引用数 400+ • 在学界,DGL是全球领先的图深度学习框 架之一;在业界,DGL在使用率上更是全 面领先。 © 2021, Amazon Web Services, Inc. or its Affiliates.
25. 可视化 异质图 知识图 谱嵌入 DGL GNN评 测标准 生命科学 结构化自然 语言处理 © 2021, Amazon Web Services, Inc. or its Affiliates. 推荐系统
26. GNN可视化工具GNNLens © 2021, Amazon Web Services, Inc. or its Affiliates. https://github.com/dmlc/GNNLens2
27. 异质图神经网络工具包OpenHGNN • 由北京邮电大学石川教授团队开发 • 使用命令行一键训练 • 首批发布16个SOTA异质图GNN模型 • 内置AutoML进行参数自动调优 https://github.com/BUPT-GAMMA/OpenHGNN © 2021, Amazon Web Services, Inc. or its Affiliates.
28. 开源社区建设 • 广泛的开源合作伙伴 • 每月定期组织用户群分享会。 • 邀请学界和业界的研究者分享图神经网络的 最新成果。 • 在学术顶会上举办DGL手把手教程 (GTC’19, KDD’19, WWW’20, KDD’20, GTC’20, WSDM’21) (所有材料都公开在 https://github.com/dglai/) © 2021, Amazon Web Services, Inc. or its Affiliates.
29. 欢迎使用并贡献DGL • 用户论坛,Slack,微信群,知乎专栏 • 或者加入我们!实习岗位常年开放! cn-ai-intern@amazon.com © 2021, Amazon Web Services, Inc. or its Affiliates.
30. One More Thing © 2021, Amazon Web Services, Inc. or its Affiliates.
31. 模型数学表示到模型实现之间的差距 大量细粒度计算! © 2021, Amazon Web Services, Inc. or its Affiliates.
32. 模型数学表示到模型实现之间的差距 大量细粒度计算! © 2021, Amazon Web Services, Inc. or its Affiliates. 大量Reshape/Batching代码
33. Kokoyi: “端到端”深度学习 Kokoyi provides • A new programming language resembling LaTeX syntax and appearing like math equations; • A compiler that translates the front-end language to efficient tensor programs in, e.g., PyTorch; • A developer environment integrated with Jupyter Notebook. © 2021, Amazon Web Services, Inc. or its Affiliates.
34. Demo Time © 2021, Amazon Web Services, Inc. or its Affiliates.
35. Kokoyi • 模型的数学描述既是可执行程序! • 编译器自动生成高效代码。 • Kokoyi即将开源,敬请期待! © 2021, Amazon Web Services, Inc. or its Affiliates.
36. 谢谢! © 2021, Amazon Web Services, Inc. or its Affiliates.

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.125.0. UTC+08:00, 2024-05-09 06:03
浙ICP备14020137号-1 $访客地图$