All Projects → PaddlePaddle → Pgl

PaddlePaddle / Pgl

Licence: apache-2.0
Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pgl

Fxgraphalgorithmsimulator
Visualizes specific Graph Algorithms like BFS, DFS, MST etc. on interactive user input graphs.
Stars: ✭ 22 (-97.69%)
Mutual labels:  graph
Facepy
Facepy makes it really easy to use Facebook's Graph API with Python
Stars: ✭ 845 (-11.33%)
Mutual labels:  graph
Panther
Discover artists through an infinite node graph
Stars: ✭ 878 (-7.87%)
Mutual labels:  graph
Flutter graphite
Flutter widget to draw interactive direct graphs (flowcharts) of any complexity in a tile rectangular manner.
Stars: ✭ 23 (-97.59%)
Mutual labels:  graph
Gridiron
Feature-Packed React Grid Framework
Stars: ✭ 8 (-99.16%)
Mutual labels:  graph
Graph
Graph is a semantic database that is used to create data-driven applications.
Stars: ✭ 855 (-10.28%)
Mutual labels:  graph
Github Spray
Draw on your GitHub contribution graph ░▒▓█
Stars: ✭ 908 (-4.72%)
Mutual labels:  graph
Mpandroidchart
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Stars: ✭ 34,377 (+3507.24%)
Mutual labels:  graph
Stabping
Continuously monitor your connection/ISP's latency & speed and view them in interactive charts
Stars: ✭ 8 (-99.16%)
Mutual labels:  graph
Leaderboardx
A tool for building graphs quickly
Stars: ✭ 13 (-98.64%)
Mutual labels:  graph
Multi charts
A flutter package which makes it easier to plot different types of charts with lots of customization, made purely in dart
Stars: ✭ 23 (-97.59%)
Mutual labels:  graph
Prettyping
`prettyping` is a wrapper around the standard `ping` tool, making the output prettier, more colorful, more compact, and easier to read.
Stars: ✭ 922 (-3.25%)
Mutual labels:  graph
Prince
Implementing PopRouting
Stars: ✭ 11 (-98.85%)
Mutual labels:  graph
Vl Jung
NetBeans Visual Library integration with JUNG (Java Universal Graph Library) for rich, animated visualizations of graphs using real components
Stars: ✭ 22 (-97.69%)
Mutual labels:  graph
Subdue
The Subdue graph miner discovers highly-compressing patterns in an input graph.
Stars: ✭ 20 (-97.9%)
Mutual labels:  graph
Amcharts4
The most advanced amCharts charting library for JavaScript and TypeScript apps.
Stars: ✭ 907 (-4.83%)
Mutual labels:  graph
Chart.xkcd
Chart.xkcd is a chart library that plots “sketchy”, “cartoony” or “hand-drawn” styled charts.
Stars: ✭ 6,982 (+632.63%)
Mutual labels:  graph
React Native Touchable Graph
React Native component for simply creating a graph 📱 , without any iOS or Android issue of touch.
Stars: ✭ 29 (-96.96%)
Mutual labels:  graph
Dotnet Assembly Grapher
Reverse engineering and software quality assurance tool for .NET assemblies
Stars: ✭ 21 (-97.8%)
Mutual labels:  graph
Ilg
because the world needs another iOS chart library.
Stars: ✭ 13 (-98.64%)
Mutual labels:  graph
The logo of Paddle Graph Learning (PGL)

PyPi Latest Release License

DOC | Quick Start | 中文

Breaking News !!

PGL v2.1 20210202

  • We are now support dygraph version of PaddlePaddle 2.0, and release PGL v2.1.
  • You can find the stable staic version of PGL in the branch "static_stable"

PGL v1.2 2020.11.20

  • The PGL team proposed a new Unified Message Passing Model (UniMP), and achieved the State of the Art on three tasks on the OGB leaderboards. You can find the code here.

  • The PGL team proposed a two-stage recall and ranking model based on ERNIEsage, and won the first place in the TextGraphs-2020 competition co-organized by COLING.

  • The PGL team worked hard to develop an open course of Graph Neural Network (GNN), which will help you getting started with Graph Neural Network in seven days. Details can be found in course.

PGL v1.1 2020.4.29

  • You can find ERNIESage, a novel model for modeling text and graph structures, and its introduction here.

  • PGL for Open Graph Benchmark examples can be found here.

  • We add newly graph level operators like GraphPooling and GraphNormalization for graph level predictions.

  • We relase a PGL-KE toolkit here including classical knowledge graph embedding t algorithms like TransE, TransR, RotatE.


Paddle Graph Learning (PGL) is an efficient and flexible graph learning framework based on PaddlePaddle.

The Framework of Paddle Graph Learning (PGL)

The newly released PGL supports heterogeneous graph learning on both walk based paradigm and message-passing based paradigm by providing MetaPath sampling and Message Passing mechanism on heterogeneous graph. Furthermor, The newly released PGL also support distributed graph storage and some distributed training algorithms, such as distributed deep walk and distributed graphsage. Combined with the PaddlePaddle deep learning framework, we are able to support both graph representation learning models and graph neural networks, and thus our framework has a wide range of graph-based applications.

One of the most important benefits of graph neural networks compared to other models is the ability to use node-to-node connectivity information, but coding the communication between nodes is very cumbersome. At PGL we adopt Message Passing Paradigm similar to DGL to help to build a customize graph neural network easily. Users only need to write send and recv functions to easily implement a simple GCN. As shown in the following figure, for the first step the send function is defined on the edges of the graph, and the user can customize the send function to send the message from the source to the target node. For the second step, the recv function is responsible for aggregating messages together from different sources.

The basic idea of message passing paradigm

To write a sum aggregator, users only need to write the following codes.

    import pgl
    import paddle
    import numpy as np

    
    num_nodes = 5
    edges = [(0, 1), (1, 2), (3, 4)]
    feature = np.random.randn(5, 100).astype(np.float32)

    g = pgl.Graph(num_nodes=num_nodes,
        edges=edges,
        node_feat={
            "h": feature
        })
    g.tensor()

    def send_func(src_feat, dst_feat, edge_feat):
        return src_feat

    def recv_func(msg):
        return msg.reduce_sum(msg["h"]) 
     
    msg = g.send(send_func, src_feat=g.node_feat)

    ret = g.recv(recv_func, msg)

Highlight: Flexibility - Natively Support Heterogeneous Graph Learning

Graph can conveniently represent the relation between things in the real world, but the categories of things and the relation between things are various. Therefore, in the heterogeneous graph, we need to distinguish the node types and edge types in the graph network. PGL models heterogeneous graphs that contain multiple node types and multiple edge types, and can describe complex connections between different types.

Support meta path walk sampling on heterogeneous graph

The metapath sampling in heterogeneous graph The left side of the figure above describes a shopping social network. The nodes above have two categories of users and goods, and the relations between users and users, users and goods, and goods and goods. The right of the above figure is a simple sampling process of MetaPath. When you input any MetaPath as UPU (user-product-user), you will find the following results The metapath result Then on this basis, and introducing word2vec and other methods to support learning metapath2vec and other algorithms of heterogeneous graph representation.

Support Message Passing mechanism on heterogeneous graph

The message passing mechanism on heterogeneous graph Because of the different node types on the heterogeneous graph, the message delivery is also different. As shown on the left, it has five neighbors, belonging to two different node types. As shown on the right of the figure above, nodes belonging to different types need to be aggregated separately during message delivery, and then merged into the final message to update the target node. On this basis, PGL supports heterogeneous graph algorithms based on message passing, such as GATNE and other algorithms.

Large-Scale: Support distributed graph storage and distributed training algorithms

In most cases of large-scale graph learning, we need distributed graph storage and distributed training support. As shown in the following figure, PGL provided a general solution of large-scale training, we adopted PaddleFleet as our distributed parameter servers, which supports large scale distributed embeddings and a lightweighted distributed storage engine so it can easily set up a large scale distributed training algorithm with MPI clusters.

The distributed frame of PGL

Model Zoo

The following graph learning models have been implemented in the framework. You can find more examples and the details here.

Model feature
ERNIESage ERNIE SAmple aggreGatE for Text and Graph
GCN Graph Convolutional Neural Networks
GAT Graph Attention Network
GraphSage Large-scale graph convolution network based on neighborhood sampling
unSup-GraphSage Unsupervised GraphSAGE
LINE Representation learning based on first-order and second-order neighbors
DeepWalk Representation learning by DFS random walk
MetaPath2Vec Representation learning based on metapath
Node2Vec The representation learning Combined with DFS and BFS
Struct2Vec Representation learning based on structural similarity
SGC Simplified graph convolution neural network
GES The graph represents learning method with node features
DGI Unsupervised representation learning based on graph convolution network
GATNE Representation Learning of Heterogeneous Graph based on MessagePassing

The above models consists of three parts, namely, graph representation learning, graph neural network and heterogeneous graph learning, which are also divided into graph representation learning and graph neural network.

System requirements

PGL requires:

  • paddle >= 2.0.0
  • cython

PGL only supports Python 3

Installation

You can simply install it via pip.

pip install pgl

The Team

PGL is developed and maintained by NLP and Paddle Teams at Baidu

E-mail: nlp-gnn[at]baidu.com

License

PGL uses Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].