C&S: Use the graph structure in your data with prediction post-processing

Graph learning techniques are hard to add to existing ML pipelines. Using Correct&Smooth to refine your existing predictions by “smoothing” them over the graph structure

pip install https://github.com/andrewk1/correctandsmooth/archive/refs/tags/v0.0.2.zip

Introducing our dataset and Transductive Node Classification

Fig 1. Each color represent one of 18 home countries for each user (node)
Fig 2. 80% / 10% / 10% split for train/val/test sampled randomly across nodes

Implementing C&S in PyTorch and PyG

Fig 3. Full C&S Pipeline — Graphic adapted from [1]
Fig 4. Visualizing of predictions against the ground truth
Eq 1. Residual Error Equation credits
Eq 2. Error smoothing equation
Fig 5. Magintudes of errors before and after propagation
Eq 3. Correction smoothing
Fig 6. Watching the predictions converge over smoothing iterations — Notice how most nodes change prediction at cluster edges

Measuring performance

Table 1. Comparing models on 80/10/10% train/val/test split run

Understanding C&S

Table 2. 80/10/10% train/val/test with smoothing training node labels over neighbors “Smooth Training”
Table 3. Rerun Table 2 in low data regime 50/25/25% train/val/test
Fig 8. 50/25/25% train/val/test splits Dense graphs lend well to classic label smoothing techniques
Table 4. 0.8/0.1/0.1 split with 70% of edges removed

Conclusion

--

--

Tutorials of machine learning on graphs using PyG. Edited by Federico Reyes Gomez

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store