Graph Enrichment is an elegant way to use Foundation Models and Graph Neural Networks together.
are a very powerful tool for general statistical prediction. Presently, a primary challenge in the field of natural language is to find the optimal ways of using Foundation Models beyond the task of faking understanding of language (“dreaming”).
This short note is about utilizing Foundation Models
to generate initial node feature vectors in Graph Neural Networks. After such a Network is trained, the resulting node vectors are used to add additional edges which were not present in the original graph — then retrain the entire network for the "enriched" graph.
For example, if we consider a naturally occurring graph which consists of authors, tweets, and hashtags, it is particularly easy to understand the meaning of connections between the nodes.
This website has several such simple author-tweet-hashtag graph networks (“channels”)
demonstrating how Graph Enrichment works.
Original Edges in the graph are based directly on data arriving from the Twitter API and reflecting the natural Twitter activity of people using Twitter to share links to articles.
As a starting point, each tweet’s node receives a vector representation from a large language model that serves as a feature vector for that node. This reflects the meaning of each given tweet taken separately from all other tweets in the network.
Now we apply a Graph Neural Network algorithm (like message passing
) and obtain new vector representation that by now reflects, to some extent, content of other tweets by the same author as well as hashtags which may appear in them. This sets the stage for Graph Enrichment. In this case, it is achieved by simply adding new links between tweet nodes which are similar to each other. Then the Graph Network algorithm is applied again to the newly formed enriched graph.
Of course, the area of application of Graph Enrichment is not limited to social networks which have been chosen here to serve as an example due to their relative simplicity and clarity.
One interesting field in which Graph Enrichment can be applied is text processing where linguistic parsing itself can be construed as an application of Graph Enrichment to a sequential representation of text. What starts as a trivial linear graph, gradually evolves and morphs into an elaborate hierarchical structure — a Syntactic Graph.