H EBBIAN G RAPH E MBEDDINGS
Anonymous authors
Paper under double-blind review
A BSTRACT
Representation learning has recently been successfully used to create vector representations of entities in language learning, recommender systems and in similarity learning.
Graph embeddings exploit the locality structure of a graph and generate embeddings for nodes which could be words in a language, products of a retail website; and the nodes are connected based on a context window.
In this paper, we consider graph embeddings with an error-free associative learning update rule, which models the embedding vector of node as a non-convex Gaussian mixture of the embeddings of the nodes in its immediate vicinity with some constant variance that is reduced as iterations progress.
It is very easy to parallelize our algorithm without any form of shared memory, which makes it possible to use it on very large graphs with a much higher dimensionality of the embeddings.
We study the efﬁcacy of proposed method on several benchmark data sets in Goyal & Ferrara (2018b) and favourably compare with state of the art methods.
Further, proposed method is applied to generate relevant recommendations for a large retailer.
I NTRODUCTION
Graph embeddings learn vector representations of nodes in a graph.
[Cai et al.
and [Goyal &
Ferrara (2018b)] give a comprehensive survey of graph embedding methods like node2vec [Grover & Leskovec (2016)] and also deep convolutional embeddings.
The advantage of learning low dimensional embeddings is that they induce an order on the nodes of a graph which could be authors in a citation network, products in a recommender system, or words in an text corpus.
The order could be established using an inner product or using another machine learning algorithm like a neural network or a random forest.
Our method uses error-free associative learning to learn the embeddings on graphs.
The algorithm is quite simple, but very effective.
We apply the learnt embeddings to the task of recommending items to users and to the task of link prediction and reconstruction.
Label propagation and message passing have been applied to many tasks like feature propagation [Heaukulani & Ghahramani (2013)], interest propagation, propagation of information in a population [Rapoport (1953)] and other network models of behavior like PageRank [Page et al.
(1999)] and models of text like TextRank [Mihalcea & Tarau (2004)].
Instead of propagating a single unit of information, we propagate entire embeddings across the network.
By propagating information on a graph iteratively, long distance similarities can also be learnt.
For link prediction and reconstruction, our results are directly comparable to [Goyal & Ferrara (2018b)].
We compare our results from the state of the art results in [Goyal & Ferrara (2018b)] in tables 1 and 5 and ﬁnd that our result has signiﬁcantly better results as compared to the techniques implemented in [Goyal & Ferrara (2018b)] like node2vec [Grover & Leskovec (2016)], GF (graph factorization) [Ahmed et al. (2013)], SDNE [Wang et al.
(2016)], HOPE [Ou et al. (2016)], and LE [Belkin & Niyogi (2002)].
Our method is similar to LLE [Roweis & Saul (2000)] (we compare with algorithms that were developed after LLE) and our algorithm takes inspiration from simulated annealing which is theoretically sound and it iteratively reduces the global variance, and thus is able to outperform all of these algorithms. Note that LLE uses a loss function while our method is an instance of errorless learning which, as the results show, is more effective and embarrassingly parallelizable. Annealing is a process that takes steel in a furnace from a very high temperature to gradu- ally cooling to lower temperatures.
This creates a self-organizing process that improves the ductility properties of steel.
A high temperature implies higher variance.
We take inspiration from this process in this paper in which initially, the variance is very high and is gradually reduced with the goal that the network gains more structure and ﬁnds a stable state after the iterations complete [Kirkpatrick et al.
Hebbian learning is the simplest form of learning invented by Donald Hebb in 1949 in his book
The organization of behavior [Hebb (1949)].
It is inspired by dynamics of biological systems.
A synapse between two neurons is strengthened when the neurons on either side of the synapse (input and output) have highly correlated outputs.
In essence, when an input neuron ﬁres, if it frequently leads to the ﬁring of the output neuron, the synapse is strengthened.
In simple terms: ”neurons that ﬁre together wire together”
[Hebb (1949)].
Recently, there’s renewed interest in Hebbian learning.
[Keysers & Gazzola (2014)] postulates that Hebbian learning predicts mirror-like neurons for sensations and emotions.
[Treur (2016)] applies Hebbian learning in modelling of temporal-causal network.
Hebbian learning consists of a parameter update rule which is based on the strength of connection between two nodes, as applied to neural networks (based on ﬁring tendencies of neurons on the opposite ends of a synapse).
We extend the idea to graphs.
Based on a pre-computed transition probability between two nodes, we update the parameters (the embeddings of a node) iteratively based on an error-free associative learning rule (nodes that are contextually connected should have similar embeddings, like word2vec for words [Mikolov et al.
For a discussion on errorless learning, please see [McClelland (2006)].
We ﬁrst initialize all embeddings to a multivariate normal distribution with mean 0 and variance σ 2 .
[Equation]
We model the embedding at a node as a non-convex Gaussian mixture of the embeddings of the connected nodes.
If there is an edge from node i to node j, the embedding of node j is modeled as follows:
[Equation]
The variance σ 2 starts off at a value of 10 and is divided by 1.1 every iteration in the spirit of simulated annealing [Kirkpatrick et al.
The embedding of node j is updated as follows:
[Equation]
The δ j are then simply added to the embedding at node j (where there is an edge from node i to node j).
p ij is the transition probability and η is the learning rate.
The graph is weighted, asymmetric and undirected.
Also, a random negative edge is selected at each node and the negative of the embeddings is propagated to both selected nodes with a ﬁxed transition probability (we use 0.5).
This iterative procedure learns the embeddings of all nodes in the graph and is able to generate very effective embeddings, as the next section shows.
As shown in ﬁgure 1, the embeddings get propagated across the Gaussian graph iteratively. [Equation]
1: procedure F IND E MBEDDINGS ( G ) 2:
Inputs: Weighted, asymmetric and undirected graph with nodes as nodes (1 , 2 . . .
, P ) and edge weights as transition probabilities between nodes p ij 3:
Hyper-parameters: 4: σ 2 Variance of normal distribution (initial value = 10) 5:
N Number of iterations of Hebbian learning 6:
K Dimensionality of node representation 7: τ Variance reduction factor (value = 1.1) 8:
Initialization: Initialize the nodes representation w i by sampling from a zero mean multivariate normal distribution N (0 , σ 2 I ) of dimensionality K 9: for each integer m in N do 10: for each node i in P do 11: for each node j in Adj ( i ) do
[Equation]
[Equation]
7) 12: end for 13: end for
[Equation]
8) 14: end for 15: end procedure
E XPERIMENTS AND R ESULTS
We run our algorithm on three of the data sets used in [Goyal & Ferrara (2018b)] namely AstroPh,
BlogCatalog and HepTh for both link prediction and reconstruction.
Our algorithm outperforms several other algorithms that are implemented in [Goyal & Ferrara (2018b)] and [Goyal & Ferrara (2018a)].
We start with an initial variance σ 2 of 10 and use the variance reduction factor τ of 1.1.
We run the algorithm for 10 iterations.
The algorithm is shown in Algorithm 1 .
Link Prediction is the task of trying to predict a link between two nodes that were not part of the training data.
[-[Table] [Table] BlogCatalog 88, 4,186,
 [Table]-]Reconstruction tries to reconstruct the entire graph which is used entirely in the training set (i.e. there is no train/test separation).
We also run our algorithm on our recommender system and ﬁnd that it is able to achieve a very high hit rate. Future work will focus more on the recommender system.
[Table] [Table]
R ESULTS ON R ECONSTRUCTION
We ran our algorithm for reconstruction on publicly available data sets.
Reconstruction tries to reconstruct the entire original graph (without splitting into train/test).
As in [Goyal & Ferrara (2018b)], we sample 1024 nodes for calculation of the MAP.
We run the algorithm for 10 iterations with a learning rate 1.0.
The results in table 1, table 2 and ﬁgure 2 show that our algorithm is able to achieve good results on reconstruction when the dimensionality is large.
As benchmarks, we use three data sets that [Goyal & Ferrara (2018b)] uses for reconstruction.
Our results are favorably comparable on those three data sets.
The other data sets are not used by [Goyal & Ferrara (2018b)] but the supporting code base as in [Goyal & Ferrara (2018a)] can be used to compare.
3. R ESULTS ON THE R ECOMMENDER S YSTEM OF A LARGE RETAILER
Also, in the recommender system at a large retailer, we used a sample of 200 thousand items as our population for training and measurement.
10% of the users are held out as the test set.
The number of nodes in the graph is 200,000 and the number of edges is about 13.1 billion (note that the weight of an incoming edge might be different from an outgoing edge between any two nodes).
We measure the performance of our algorithm on the hit rate.
Top 10 recommendations are generated per item based on the nearest neighbors of the generated embeddings based on an inner product (using all 200,000 items).
Then, one random item from the users entire interaction history is chosen.
Recommendations for this random item are computed.
If any of the top 10 recommended items (other than the seed item) also occurs in the users interaction history, it is considered a hit.
Otherwise a fail.
The average hit rate is then the number of successes divided by the number of users in the test set.
Results are shown in table 4.
We use 10 iterations and a learning rate of 1.0.
The edges are determined using the induced graph from the consumer-product bipartite graph based on the co-viewing of the products.
So, if two products were viewed by the same consumer, then we create an edge between them based on the same p ij weight between them (as described in section 2).
[Table]
3. R ESULTS ON L INK P REDICTION
For link prediction, we use some of the data sets used in [Nickel & Kiela (2017)] and [Goyal &
Ferrara (2018b)].
As in [Goyal & Ferrara (2018b)], we sample 1024 nodes for calculation of the
MAP.
We keep 10% of the edges as a held out test set.
We run the algorithm for 10 iterations with a learning rate 1.0.
The results in table 5, table 6 and ﬁgure 3 show that our algorithm is able to achieve good results on link prediction when the dimensionality is large.
(It is not completely clear on how [Nickel & Kiela (2017)] samples the test and validation sets).
As benchmarks, we use three data sets that [Goyal & Ferrara (2018b)] uses for link prediction.
Our results are favorably comparable on those three data sets for link prediction.
[Goyal & Ferrara (2018b)] also has a supporting code base [Goyal & Ferrara (2018a)] which can be used to compare on other data sets.
It is quite easy to parallelize the algorithm, and we implement it on Apache Spark.
We run the algorithm for 10 iterations (which takes about 3 hours on the parallel implementation on recommender system data and from 5 minutes to 2 hours (depending on the dimensionality) on the publicly available data).
We found that the learning rate does not affect the results in any signiﬁcant way (we use [Table] [Table]
C ONCLUSION
In this paper [Table] we described a simple, but very effective algorithm to learn the embeddings on a graph.
The results show that the algorithm, as applied to the tasks of link prediction and reconstruction, is able to perform well when the dimensionality of the embeddings is large.
This shows the effectiveness of learning on graphs using iterative methods.
Its a useful experiment of error-free (errorless) learning on graphs.
Our method can learn long distance similarities because of the iterative nature of the algorithm which percolates the embeddings on the weighted graph.
A distinctive advantage of our approach is that it is very easy to parallelize the algorithm without any need for shared memory.
It is quite easy to implement the algorithm on platforms like Apache
Spark, which makes the algorithm amenable to very large graphs which cannot be processed on one machine.
Our recommender system work was tested live and it did very well.
But because our item graph has a very large number of nodes and edges, we omit the implementation of [Nickel & Kiela (2017)] and [Goyal & Ferrara (2018b)] for our recommender system.
Other algorithms like in [Vinh et al.
(2018)] and [Chamberlain et al.
(2019)] could be compared with our work.
There is still an opportunity to improve the algorithm through hyperparameter tuning.
It might be interesting to measure the algorithm with a much higher dimensionality of the embeddings