图智能 101

2022-11-03  本文已影响0人  MatrixOnEarth

Why

Graph无处不在

graph is everywhere

Graph Intelligence helps

graph intelligence helps

It's the right time now!

Gartner预测,graph技术在数据和分析创新中的使用率从2021年的10%,到2025年会增长到80%。我们目前正在经历从early adoption到early mainstream的穿越大峡谷的时期,既不太早也不太晚,时间刚刚好。


now is the right time

What

如何建模图

A graph 𝒢 is an ordered pair 𝒢 = (𝑉, 𝐸) comprising:

  • 𝑉, a set of vertices (or nodes)
  • 𝐸⊆{(𝑥,𝑦)|𝑥,𝑦∈𝑉}, a set of edges (or links), which are pairs of nodes
    Example:


    directed graph

Different Types of Graph

如何表示图

不同的表示方式会指向不同的计算模式。


graph的两种计算模式

如何计算图

如下图所示,图的计算步骤如下:

那么,这些embedding是如何计算和更新的呢?主要是使用Message Passing的计算方法。Message Passing有一些计算范式如GAS(Gather-ApplyEdge-Scatter), SAGA(Scatter-ApplyEdge-Gather-ApplyVertex)等。我们这里介绍归纳得比较全面的SAGA计算范式。假设需要计算和更新下图中的\vec{x_1}:

graph

公式如下:


Formula

分析一下,会发现,SAGA模式中ApplyEdge和ApplyVertex是传统deep learning中的NN(Neural Network)操作,我们可以复用;而Scatter和Gather是GNN新引入的操作。即,Graph Computing = Graph Ops + NN Ops

operation characteristics

不同的图数据集规模

不同的图任务

How

Workflow

general workflow

以fraud detection为例:

  • Tabformer数据集


    Tabformer data
  • workflow


    fraud detection workflow

软件栈

software stack

SW Challenges

Graph Sampler

For many small graphs datasets, full batch training works most time. Full batch training means we can do training on whole graph;
When it comes to one large graph datasets, in many real scenarios, we meet Neighbor Explosion problem;

Neighbor Explosion:


neighboe explosion

Graph sampler comes to rescue. Only sample a fraction of target nodes, and furthermore, for each target node, we sample a sub-graph of its ego-network for training. This is called mini-batch training.
Graph sampling is triggered for each data loading. And the hops of the sampled graph equals the GNN layer number 𝐿. Which means graph sampler in data loader is important in GNN training.

sampling take a lot of time

Challenge: How to optimize sampler both as standalone and in training pipe?

When graph comes to huge(billions of nodes, tens of billions of edges), we meet new at-scale challenges:

A possible GNN distributed training architecture:


GNN distributed training

Scatter-Gather

One common fuse pattern for GCN & GraphSAGE:


Aggregate

Challenge:
How to fuse more GNN patterns on different ApplyEdge and ApplyVertex,automatically?

Challenge:
- Different graph data structures lead to different implementations in same logic operations;
- Different graph characteristics favors different data structures;(like low-degree graphs favor COO, high-degree graphs favor CSR)
- **How to find the applicable zone for each and hide such complexity to data scientists? **

More

Finishing words

"There is plenty of room at the top" 对技术人员很重要。但为避免入宝山而空返,我们更需要建立起技术架构,这就像是地图一样,只有按图索骥才能更好地探索和利用好top里的plenty of room。


There is plenty of room at the top

References

  1. Graph + AI: What’s Next? Progress in Democratizing Graph for All
  2. Recent Advances in Efficient and Scalable Graph Neural Networks
  3. Crossing the Chasm – Technology adoption lifecycle
  4. Understanding and Bridging the Gaps in Current GNN Performance Optimizations
  5. Automatic Generation of High-Performance Inference Kernels for Graph Neural Networks on Multi-Core Systems
  6. Understanding GNN Computational Graph: A Coordinated Computation, IO, And Memory Perspective
  7. Graphiler: A Compiler For Graph Neural Networks
  8. Scatter-Add in Data Parallel Architectures
  9. fuseGNN: Accelerating Graph Convolutional Neural Network Training on GPGPU
  10. VQ-GNN: A Universal Framework to Scale up Graph Neural Networks using Vector Quantization
  11. NeuGraph: Parallel Deep Neural Network Computation on Large Graphs
  12. Completing a member knowledge graph with Graph Neural Networks
  13. PinnerFormer: Sequence Modeling for User Representation at Pinterest
  14. Gartner and Graph Analytics
上一篇下一篇

猜你喜欢

热点阅读