What is PyTorch Scatter?
masterPyTorch Scatter is an extension library providing highly optimized sparse update operations (scatter and segment) for PyTorch. These operations perform reductions based on a "group-index" tensor.
Core Operations
All operations support reduction types: "sum", "mean", "min", and "max".
- scatter: Based on arbitrary indices.
- segment_coo: Based on sorted indices.
- segment_csr: Based on compressed indices via pointers.
Composite Functions
The package also provides composite functions built on top of scatter_* operations:
scatter_stdscatter_logsumexpscatter_softmaxscatter_log_softmax
All operations are broadcastable, support varying data types, work on both CPU and GPU (with backward implementations), and are fully traceable.