text
stringlengths
0
89.3k
dant text in that neighborhood since LLMs are originally designed
for onedimensional sequential data only and have a limited input
length that is often much shorter than the total amount of neigh
borhood context Therefore integrating LLMs for textrich graphs
necessitates a method that can effectively compress neighborhood
text while still preserving structural information HiCom achieves
the goal by compressing the neighborhood in a structured manner
We construct a hierarchy of feature aggregation that corresponds to
different hops from the center node especially building the iterative
process of aggregating textual features from a nodes immediate
neighbors to capture local graph structures and then progressively
expanding this aggregation to include distant neighbors Such de
sign enables efficient usage of the graph structure and avoids input
explosion that would occur if one were to simply concatenating
all node attributes in sequence for encoding a large neighborhood
HiCom adapts a pretrained LLM as the backbone and adds ad
ditional learnable vocabularies and prediction layers to make the
model work as a graph compressor and a predictor All modules
are jointly finetuned with parameterefficient finetuning PEFT
to solve graph tasks eg node classification
In the following paragraphs we begin by demonstrating the
workflow of the HiCom framework with an illustrative exampleand then provide details about the compressor the predictor and
the computational complexity associated with HiCom Furthermore
we discuss techniques to improve the efficiency and effectiveness
of HiCom and examine its relationship with GNN message passing
41 The HiCom Framework
The Workflow We illustrate how HiCom works through a node
classification example shown in Figure 2 This illustration is for clas
sifying the target node 𝑣0 Initially HiCom constructs a hierarchy
with𝐿levels for gathering context information in the neighborhood
of𝑣0 with𝑣0in the last 𝐿th level left figure The hierarchy is
formed by sampling multihop neighbors of 𝑣0 and the size of each
level is specified by the fanouts parameters with the 𝑙th entry for
level𝑙 For instance this example illustrates the construction of a
twolevel hierarchy with fanouts set to 32 which means two one
hop neighbors eg 𝑣1and𝑣2 of𝑣0and three twohop neighbors
for each onehop neighbor eg 𝑣4𝑣8 and𝑣9for𝑣1𝑣5and𝑣6for𝑣2
are sampled Note that while three neighbors were intended for 𝑣2
following the fanouts only two are included as those are all 𝑣2has
This aspect introduces an implementation challenge that will be
elaborated in Section 42 The constructed hierarchy is represented
as a tree structure Considering the potentially extensive context
within this hierarchy the compression phase is the next step as
shown in the bottom right figure The compressor concatenates
the text tokens in each local neighborhood and compresses them
into summary vectors The summary vectors capture essential con
textual information while significantly reducing the input length
In this example an input in the lower hierarchy green tokens is
compressed from length nine into length two Note that dummy
tokens might be needed as placeholders for parallelization a topic
will be elaborated in Section 42 After two sets of summary vectors
𝒔1and𝒔2 have been produced they are further compressed along
with the text on 𝑣1and𝑣2to produce a comprehensive summary
of𝑣0s neighborhood The final summary vectors for 𝑣0become𝑠0
Lastly the predictor combines 𝑠0with the raw text of the target
node denoted as π‘₯0 to predict the label 𝑦0 as illustrated in the
upper right figure
The Compressor The compressor processes the text from neigh
boring nodes in a levelbylevel manner For the text data in the
β„“th level the compressor employs soft prompting as in AutoCom
pressor reviewed in Section 3 to instruct LLMs to compress the
input text into summary vectors π‘˜soft prompt tokens are added
to LLMs existing vocabulary to compress inputs with length 𝑑to
summary vectors with length π‘˜ We denote this compression oper
ation as π’”πΆπ‘œπ‘šπ‘π‘₯ omitting the tokenlevel detail An example
is depicted in Figure 2 with π‘˜equals 2 for visualization purposes
and we setπ‘˜to be 50 in our experiments To compress input from
different levels hierarchically the summary vectors from β„“th level
nodes in the computation graph are consumed by the β„“1th level
being prepended to their embedding inputs Thus the summary
from levelβ„“can be carried to level β„“1for further compression
For example the compression of 𝑣0s neighborhood in Figure 2
is𝒔0πΆπ‘œπ‘šπ‘π’”1𝒔2π‘₯1π‘₯2𝒔0will thus contain not only infor
mation from π‘₯1π‘₯2 but also information from π‘₯4π‘₯8π‘₯9π‘₯5 andπ‘₯6
through hierarchical compressionHierarchical Compression of TextRich Graphs via Large Language Models Conference acronym XX June 0305 2018 Woodstock NY
The Predictor When using the LLM as a predictor we append
and tune an extra prediction layer at the end of the model The
parameters in this layer are randomly initialized and tuned together
with the LLM backbone Similarly to the compressor operation the
predictor can also take in the combined summary vectors and text
tokens and therefore make predictions with both the node text and
the contextual information For example to make a prediction of 𝑣0
in the illustration example 𝒔0π‘₯0is fed to the predictor as input
which concatenates the neighborhood summary vectors and the
feature information of node 𝑣0
Computational Complexity One of the advantages of HiCom is
its efficiency for processing rich neighborhoods compared to the
LLM backbone This efficiency stems from the fact that the com
putational complexity of LLM forward passes grows quadratically
with the input length Specifically if we were to concatenate sam
pled neighbors directly to the target to form an input of length
𝑛 the resulting time complexity would be 𝑂𝑛2 However by di
viding the input into smaller segments of lengths 𝑛1𝑛2𝑛𝑑st
𝑛Í𝑑
𝑖1𝑛𝑖 and compressing them hierarchically the overall time
complexity is reduced to 𝑂Í𝑑
𝑖1𝑛2
𝑖 HiCom results in a lower
computational cost for processing long inputs and its advantage is
more prominent for longer inputs