Fast Graph Classification with LightOn Optical Processing Units

3 min readMar 19, 2021


At the 12th LightOn AI Meetup, we hosted Hashem Ghanem, a Ph.D. student at GIPSA-Lab, Grenoble, and IMB, Dijon, who presented his work on🕸️ Fast Graph Kernel with Optical Random Features ⚡ to appear at ICASSP 2021.

The 📺 recording of the meetup is on LightOn’s Youtube channel. Subscribe to the channel and subscribe to our Meetup to get notified of the next videos and events!

Hashem has been one of the first users of our technology on the LightOn Cloud, and we are particularly proud of his work using Optical Processing Units being accepted to a prestigious conference.

Graph structures are ubiquitous in the real world, and a problem of interest with applications in 🏦 banking, 🧬 biology, and 📣 marketing is graph classification: given a training set of labeled graphs, once presented with a new graph, predict to which class it belongs.

State-of-the-art methods for this problem include subgraph-based algorithms, graph convolutional networks, and graph kernels. This last approach is particularly effective, however, it incurs an exponential computational cost 📈, even after acceleration strategies have been applied.

Random features are an efficient approximation method for kernels, and we just happen to know a way to compute them at the speed of light ⚡🙃 with Optical Processing Units!

In the paper, they have the proper time complexities with O-notation but a plot is worth a thousand equations:

Computation time with increasing graphlet size. A larger graphlet size translates to better performance. The cost of using random features on the OPU does not change with graphlet size!

And the speedup does not come at a cost, the results on graph classification tasks look pretty good too 🚀

Test accuracy with an increasing number of random features (at no cost with OPUs!), and test accuracy with respect to inter-class similarity.

The code used for this work is publicly available. If you want to reproduce these results, expand them or try out your latest idea, you can register to the LightOn Cloud for a Free Trial or apply to the LightOn Cloud for Research Program!

About Us

LightOn is a hardware company that develops new optical processors that considerably speed up Machine Learning computation. LightOn’s processors open new horizons in computing and engineering fields that are facing computational limits. Interested in speeding your computations up? Try out our solution on LightOn Cloud! 🌈

Follow us on Twitter at @LightOnIO, subscribe to our newsletter, and/or register for our workshop series. We live stream, so you can join from anywhere. 🌍

The author

Iacopo Poli, Lead Machine Learning Engineer at LightOn AI Research.




We are a technology company developing Optical Computing for Machine Learning. Our tech harvests Computation from Nature, We are at