Skip to main content

FROST

A multi-GPU framework for temporal graph neural networks in recommendation systems.

Learn from user–item interaction histories and score candidate items at a chosen time. Start from an event CSV, train a model, and reuse it for new queries.

  • Score candidate items: follow this README; a TGN starter configuration is included.
  • Tune or develop models: use the model and training guide (docs/model_training.md in the source distribution) for hyperparameters, model/sampler support and multi-GPU training.

📦 Install

On Linux x86-64 (glibc 2.31+) with Python 3.12:

python -m pip install frost_gnn

The Python import is frost; the command is frost. The CSV trainer runs on CPU unless you select a GPU. To use CPU-only PyTorch, install torch==2.9.0 from https://download.pytorch.org/whl/cpu before installing FROST. CUDA execution requires a compatible NVIDIA driver.

If upgrading from the old FROST 0.1.0 distribution, first run python -m pip uninstall frost to avoid overlapping package files.

🚀 Score candidate items

Each row in events.csv records an observed interaction, such as a click or purchase. Use src for the user ID and dst for the item ID; time is optional:

src,dst,time
42,121,1
7,12312,2
42,31231,3
7,12331,4

Train with the bundled TGN configuration and score candidate items for user 42:

frost train events.csv --src 42 --candidates 121,12312,31231,12331

This saves frost-model.pt and prints CSV columns src,dst,time,score in candidate order. Training progress goes to stderr. Each score is in [0, 1]; it is a ranking score, not a calibrated probability or a probability over a specified future time window. The four rows above illustrate the format; useful predictions require representative training data and evaluation on held-out events.

Reuse the checkpoint without retraining, choose a query time, or score a test CSV:

frost predict frost-model.pt --src 42 --candidates 121,12312 --time 10
frost predict frost-model.pt --test test.csv --predictions scores.csv
frost train events.csv --output model.pt --test test.csv --predictions scores.csv

🗂️ Data and query rules

  • Use src,dst with optional time. Aliases src_id,dst_id,timestamp and u,i,ts are recognized; override names with --src-col, --dst-col, --time-col. These column settings also apply to test CSVs.
  • IDs are strings, including leading zeros. Source and destination share one namespace; use prefixes such as user:42 and item:42 when users and items reuse the same numbers. Query users and items must have appeared in training.
  • Times can be numeric (use a consistent unit) or ISO-8601 dates (converted to UTC seconds). Events are sorted by time. Without timestamps, rows become time 1, 2, …, representing sequence order rather than measured elapsed time.
  • Queries use the latest training time unless a test row supplies a time or you pass --time. That flag overrides every test row. Test rows never update the saved graph or memory, so query order does not change subsequent answers.
  • Queries before the training cutoff are rejected. To backtest, train only on earlier events; predictions at the cutoff are not held-out accuracy.
  • Existing output files are protected. Use --output another-model.pt or a new --predictions path for another run.

The starter runs TGN on CPU with four threads. Select a GPU with --device cuda:0. Use frost train --show-config to inspect settings, or see the configuration guide (docs/model_training.md in the source distribution) to adjust them. For all command options, run frost train --help or frost predict --help.

🧩 Node features

frost train events.csv --node-features nodes.npy --output featured-model.pt

A numeric NPY matrix has shape [nodes, feature_dim]; row n corresponds to nonnegative integer node ID n. For string IDs or compactly stored sparse IDs, pass --feature-ids ids.json, a JSON list in NPY row order. An adjacent nodes.npy.ids.json is detected automatically. Every training node needs a row; features and the ID mapping are saved in the model checkpoint.

For tabular attributes, use the included converter:

# nodes.csv: n_id,age,category,... (one row per node)
frost features nodes.csv --id-col n_id --output nodes.npy

Numeric columns are standardized, with missing values filled by the observed mean. Categorical values are hashed into 64 columns (--categorical-dim adjusts this); collisions are possible. The converter writes the NPY, ID list and a schema recording column types and numeric statistics. Use attributes available at the training cutoff. Text and images need semantic embeddings from a suitable encoder; this converter treats nonnumeric strings as categories, not language meaning.

📚 Citation

If you use FROST, please cite our paper:

@article{zhao2026frost,
  author    = {Zhao, Lei and Nke, Joseph and Kim, Jongryool and Lee, Chul-Ho},
  title     = {{FROST}: Accelerating Temporal Graph Neural Network Training via a Unified {Multi-GPU} Framework},
  journal   = {Proceedings of the ACM on Management of Data},
  volume    = {4},
  number    = {6},
  articleno = {350},
  year      = {2026},
  month     = dec,
  publisher = {Association for Computing Machinery},
  doi       = {10.1145/3856345},
  url       = {https://doi.org/10.1145/3856345}
}

Citation metadata: CITATION.cff (CITATION.cff in the source distribution). Code is licensed under MIT (LICENSE in the source distribution); TPNet retains its upstream notices (src/frost/tpnet/NOTICE.md in the source distribution). The paper is licensed under CC BY 4.0.

Metadata

Release files for frost-gnn 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frost-gnn 0.3.1
File Size Uploaded Provenance Actions
frost_gnn-0.3.1.tar.gz 1.7 MB With provenance Details for frost_gnn-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for frost-gnn 0.3.1
File Interpreter ABI Platform Actions
frost_gnn-0.3.1-cp312-cp312-manylinux_2_31_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.31+ x86-64 Details for frost_gnn-0.3.1-cp312-cp312-manylinux_2_31_x86_64.whl

Total release size: 4.5 MB

Release files / frost_gnn-0.3.1.tar.gz

Download URL frost_gnn-0.3.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
98eb2c91e8c7111a50c05eb51e8cd572098b9c2001dae44511fbc84663b6d816
BLAKE2b-256 checksum
How to use checksums
a5ede9441b092d5f15f5856375f3890e6945ec4cc316ec0cb8ada8ecf6a66beb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / frost_gnn-0.3.1-cp312-cp312-manylinux_2_31_x86_64.whl

Download URL frost_gnn-0.3.1-cp312-cp312-manylinux_2_31_x86_64.whl
Size 2.8 MB
Tags CPython 3.12 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
6204050c46db0e4fca55e2f360df3b3d3713d5796ab89cd7198d41d9f4dc00e1
BLAKE2b-256 checksum
How to use checksums
b55fd3f9e4ca5e0c79ec49b39b6483e4b7dec021bdbadcdbbcbd1b83332049d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for frost-gnn 0.3.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for frost_gnn-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page