TECHNOLOGY

PNA degree scalers need the training histogram and current graph degrees

In this article
THE QUICK TAKE

A training degree histogram describes a reference distribution, while current graph degrees describe the neighborhood being processed.

A degree vector is not a degree histogram

A graph model loader may pass each node’s degree into a constructor expecting a histogram. Both objects can be integer tensors, yet their indices mean different things. In a histogram, a position identifies a degree value and its entry counts nodes, rather than identifying a node directly.

The PNAConv API specifies deg as a training-set in-degree histogram used by scalers. Preserve that contract when assembling an inference-compatible layer.

Several aggregators retain complementary neighborhood information

The PNA paper motivates combining multiple aggregation operations with degree-dependent scalers. This is not merely a wider mean aggregation: different summaries retain different aspects of the supplied message distribution.

Record the configured aggregator and scaler lists with their ordering. Rebuilding the architecture with a similar number of outputs but different summaries changes the interpretation expected by learned transformations. Output width alone does not prove compatibility.

Reference statistics and runtime topology have different roles

The reference histogram initializes normalization related to the training degree distribution. The current graph still supplies the actual neighborhood and node degrees for the forward computation. Replacing the reference with each incoming batch’s histogram changes the reference convention.

A deployment should restore the trained model state and associated configuration rather than silently recalibrating it from evaluation data. If a deliberate recalibration is studied, label it as a changed procedure and assess its effects separately.

Graph construction determines what was counted

The implementation helper computes incoming degrees from the target side of edge indices and accumulates a histogram over loader data. Duplicated edges, self-loop insertion, and direction conventions can therefore change the counted distribution.

Preserve the same graph preparation semantics used for training. The data identity guide offers related guidance on keeping transformed records linked to their meaning. A histogram without its graph construction provenance is incomplete.

Inspect counts before interpreting generalization

For a small collection, compare manually counted degrees with histogram bins and total node counts. Then verify restored scaler-related state and the configured runtime graph. Keep isolated nodes visible rather than losing them by inferring node count only from present edges.

The artifact validation guide motivates preserving these resources with weights. Correct reconstruction establishes computational consistency; it does not demonstrate robustness to an arbitrary degree distribution shift or measured accuracy on new graph domains.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles