Skip to content

Commit 91e0142

Browse files
authored
Merge pull request #6579 from adamnsch/hashgnn-dimension-docs
Clarify the need for higher dimension in HashGNN docs
2 parents d3b3c47 + cd57650 commit 91e0142

File tree

1 file changed

+7
-0
lines changed
  • doc/modules/ROOT/pages/machine-learning/node-embeddings

1 file changed

+7
-0
lines changed

doc/modules/ROOT/pages/machine-learning/node-embeddings/hashgnn.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ As a loose guideline, one may try to set `embeddingDensity` to 128, 256, 512, or
197197
The `dimension` parameter determines the number of binary features when feature generation is applied.
198198
A high dimension increases expressiveness but requires more data in order to be useful and can lead to the curse of high dimensionality for downstream machine learning tasks.
199199
Additionally, more computation resources will be required.
200+
However, binary embeddings only have a single bit of information per dimension.
201+
In contrast, dense `Float` embeddings have 64 bits of information per dimension.
202+
Consequently, in order to obtain similarly good embeddings with HashGNN as with an algorithm that produces dense embeddings (e.g. FastRP or GraphSAGE) one typically needs a significantly higher dimension.
200203
Some values to consider trying for `densityLevel` are very low values such as `1` or `2`, or increase as appropriate.
201204

202205

@@ -208,6 +211,10 @@ Therefore, a higher dimension should also be coupled with higher `embeddingDensi
208211
Higher dimension also leads to longer training times of downstream models and higher memory footprint.
209212
Increasing the threshold leads to sparser feature vectors.
210213

214+
However, binary embeddings only have a single bit of information per dimension.
215+
In contrast, dense `Float` embeddings have 64 bits of information per dimension.
216+
Consequently, in order to obtain similarly good embeddings with HashGNN as with an algorithm that produces dense embeddings (e.g. FastRP or GraphSAGE) one typically needs a significantly higher dimension.
217+
211218
The default threshold of `0` leads to fairly many features being active for each node.
212219
Often sparse feature vectors are better, and it may therefore be useful to increase the threshold beyond the default.
213220
One heuristic for choosing a good threshold is based on using the average and standard deviation of the hyperplane dot products plus with the node feature vectors.

0 commit comments

Comments
 (0)