Support neighbor sampling without neighbor deduplication (e.g. TGATSampler and KGCNSampler)
- Dominant language
- Python
- Stars
- 14.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
## 🚀 Feature
Support neighbor sampling without neighbor deduplication, examples including TGATSampler and KGCNSampler.
## Motivation
The current neighbor sampling implementation by default will deduplicate the neighbors after sampling to save computation space. This is not always necessary since in some cases we would want to keep the duplicate seed nodes if each seed node requires its own computation dependency. For instance, TGAT samples neighbors according to temporal causality, meaning that the same neighbor node may have different timestamps for different seed nodes. Also, one would sometimes like to know which seed node a K-hop neighbor node belongs to, and assign different features to the neighbor nodes accordingly (e.g. KGCN), which is also hard to do within our current pipeline.
## Alternatives
Users can write their own sampler I guess? But it's not easy to do so with our current `sample_neighbors` and `to_block` interface since `sample_neighbors` do not accept duplicated seed nodes, which will be common if we do not deduplicate them.
## Pitch
Provide at least a `NeighborSamplerWithoutDeduplication` class (the name can change, but the functionality needs to be supported), as well as either TGATSampler or KGCNSampler as an extension.
## Additional context
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.