🚀 Tempest
A high-performance temporal random walk sampler for dynamic networks with GPU acceleration. Built for scale.
🔥 Why Tempest?
✅ Performance First – GPU-accelerated sampling for massive networks
✅ Memory Efficient – Smart memory management for large graphs
✅ Flexible Integration – Easy Python bindings with NumPy/NetworkX support
✅ Production Ready – Tested with hundreds of extensive unit tests.
✅ Multi Platform Builds and runs seamlessly on devices with or without CUDA.
⚡ Quick Start
from tempest import Tempest
# Create a directed temporal graph
walker = Tempest(is_directed=True, use_gpu=True, max_time_capacity=-1)
# Add edges - can be numpy arrays or python lists
sources = [3, 2, 0, 3, 3, 1]
targets = [4, 4, 2, 1, 2, 4]
timestamps = [71, 82, 19, 34, 79, 19]
walker.add_multiple_edges(sources, targets, timestamps)
# Sample walks with exponential time bias
walk_nodes, walk_timestamps, walk_lens, edge_features = walker.get_random_walks_and_times_for_all_nodes(
max_walk_len=5,
walk_bias="ExponentialIndex",
num_walks_per_node=10,
initial_edge_bias="Uniform"
)
# edge_features is None when no edge features were added (feature_dim=0)
✨ Key Features
- ⚡ GPU acceleration for large graphs
- 🎯 Multiple sampling strategies – Uniform, Linear, Exponential
- 🧠 Advanced temporal biases – ExponentialWeight (CTDNE-style) and TemporalNode2Vec
- 🔄 Forward & backward temporal walks
- 📡 Rolling window support for streaming data
- 🏷️ Optional edge feature propagation from input edges to sampled walks
- 🔗 NetworkX integration
- 🛠️ Efficient memory management
- ⚙️ Uses C++ std libraries or Thrust API selectively based on hardware availability and configuration.
🏷️ Edge Features (Optional)
If your edges carry attributes (weights, embeddings, types, etc.), you can pass them to
add_multiple_edges(...) and receive aligned edge features for each sampled transition.
import numpy as np
from tempest import Tempest
walker = Tempest(is_directed=True, use_gpu=False)
sources = np.array([0, 0, 1], dtype=np.int32)
targets = np.array([1, 2, 2], dtype=np.int32)
timestamps = np.array([10, 20, 30], dtype=np.int64)
# shape: [num_edges, feature_dim]
edge_features = np.array([
[0.1, 1.0],
[0.2, 0.5],
[0.9, 0.3],
], dtype=np.float32)
walker.add_multiple_edges(sources, targets, timestamps, edge_features=edge_features)
walk_nodes, walk_timestamps, walk_lens, walk_edge_features = walker.get_random_walks_and_times(
max_walk_len=4,
walk_bias="Uniform",
num_walks_total=5,
)
# walk_edge_features.shape == [num_walks, max_walk_len - 1, feature_dim]
walk_edge_features is None when no edge features are provided.
🏷️ Node Features
The library can also store dense node features. Use set_node_features(node_ids, node_features)
to populate features for specific nodes, then get_node_features() to retrieve the dense matrix.
🧭 Bias Selection Notes
- Use
ExponentialIndexorLinearfor recency-aware sampling with no extra setup. - Use
ExponentialWeightwhen you want CTDNE-style weight computation (enable_weight_computation=True, optionally tunetimescale_bound). - Use
TemporalNode2Vecwhen you need return/in-out control viatemporal_node2vec_pandtemporal_node2vec_q.
📦 Dependencies
| Dependency | Purpose |
|---|---|
| pybind11 | Python-C++ bindings |
| python3 | Required for building the python interfaces |
| gtest | Unit testing framework |
💡 Tip: Use vcpkg to easily install and link the C++ dependencies.
📦 Installation
GPU (default) — Linux with NVIDIA driver
pip install tempest-rw
This pulls the manylinux wheel plus the two NVIDIA CUDA runtime libraries that the wheel links against:
nvidia-cuda-runtime-cu12— provideslibcudart.so.12nvidia-curand-cu12— provideslibcurand.so.10
CPU-only — source build
Machines without a GPU (or without a driver) should build from
source; the CMake config detects the absence of nvcc and compiles
a CPU-only extension:
pip install --no-binary tempest-rw tempest-rw
You'll need a C++17 compiler, CMake, and OpenMP/TBB installed
(via vcpkg — see the Dependencies section above).
📖 Documentation
📌 C++ Documentation →
📌 Python Interface Documentation →
📚 Citation
If you use Tempest in your research, please cite:
Md Ashfaq Salehin, George Parisis, and Luc Berthouze. 2026. Tempest: A GPU-Accelerated Engine for Streaming Temporal Random Walks. In Proceedings of the 55th International Conference on Parallel Processing (ICPP '26), Singapore.
@inproceedings{salehin2026tempest,
title = {Tempest: A GPU-Accelerated Engine for Streaming Temporal Random Walks},
author = {Salehin, Md Ashfaq and Parisis, George and Berthouze, Luc},
booktitle = {Proceedings of the 55th International Conference on Parallel Processing (ICPP '26)},
address = {Singapore},
year = {2026},
publisher = {Association for Computing Machinery},
doi = {10.1145/3832810.3832885}
}
🚀 Contributions welcome! Open a PR or issue if you have suggestions.
Metadata
Release files for tempest-rw 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tempest_rw-1.0.7-cp311-cp311-manylinux_2_34_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.34+ x86-64 | Details for tempest_rw-1.0.7-cp311-cp311-manylinux_2_34_x86_64.whl |
| tempest_rw-1.0.7-cp310-cp310-manylinux_2_34_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.34+ x86-64 | Details for tempest_rw-1.0.7-cp310-cp310-manylinux_2_34_x86_64.whl |
| tempest_rw-1.0.7-cp39-cp39-manylinux_2_34_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.34+ x86-64 | Details for tempest_rw-1.0.7-cp39-cp39-manylinux_2_34_x86_64.whl |
Total release size: 21.5 MB
Release files / tempest_rw-1.0.7-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | tempest_rw-1.0.7-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
df94c74542843169872eaf8ae172ffbf21a4cbc673e8bede71b530d43c4d4c47
|
|
BLAKE2b-256 checksum How to use checksums |
d5392513bd7df2a5c0dd2903838dfb175eeefd4f08f0d0340097dc90e21e374a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / tempest_rw-1.0.7-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | tempest_rw-1.0.7-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
b0db844a6fedcc9059fa4ca3c51203f305c7aaaa6fcb90f1fd2c4cee13022a1c
|
|
BLAKE2b-256 checksum How to use checksums |
e7edcbfc2c126fe08c73e1e8503d8ab5d3524c4834937ad181054d3d1f6127ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / tempest_rw-1.0.7-cp39-cp39-manylinux_2_34_x86_64.whl
| Download URL | tempest_rw-1.0.7-cp39-cp39-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
6a45d8d80764cc6457c1f45590789259cf2c59e806dca14aff1c727e269b4483
|
|
BLAKE2b-256 checksum How to use checksums |
6d304076f401a19bc519f0c7fbd852597cc1d9c1f6728f15a3e5fc08de33e322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for tempest-rw 1.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.