Hi Neo4j Community,
I'm interested in using link prediction in GDS to power real-time product recommendations. Can link prediction in GDS be used for real-time recommendations? Or is executing it too slow? What kind of computational complexity is link prediction?
The link prediction API as it currently stands is not really designed for real-time inferences. Every time you call `gds.beta.pipeline.linkPrediction.predict.*` it does predictions of new possible neighbors for all nodes in the graph. Further, it runs the computation of all node property steps that was also used when training the pipelines (like node embedding algorithms if you're using that) on the entire input graph.
The complexity will depend on the node property steps, the machine learning method you use in your pipeline, and which search strategy you use for predictions (approximate or exhaustive).
If what you want to do in real-time is in fact to run predictions for all nodes in the graph, then the current API will probably do you quite well with the caveat that node property steps may be expensive to compute as I mentioned.
In general we are interested in improving this aspect of our API, mainly in two particular ways:
With these two improvements the LP pipeline API could work quite well for real-time node specific recommendations.
Would you be interested in such features?
Another concern is that if you want make predictions on nodes that are incrementally added to your database, you may need to make a new projection into GDS that includes them, since the GDS in-memory graph does not support you adding new nodes to it. But not sure what your use-case is