HoTS: Homophily-Aware Temperature Scaling for Graph Neural Network Calibration

Inwoo Tae, Yoontae Hwang, Yongjae LeeNeurIPS 2026

TL;DR

When a Graph Neural Network (GNN) tells you it is 90% confident in a prediction, whether you should actually believe it depends heavily on who that node’s neighbors are. Standard calibration fixes model overconfidence using a single global dial, ignoring the local graph structure entirely. HoTS introduces a lightweight, mathematically grounded 3-parameter rule that adjusts each node's confidence based on its local neighborhood similarity—giving you trustworthy probabilities without changing a single predicted class.

What Problem Does This Paper Address?

In machine learning, calibration means making a model’s confidence match reality: if it predicts a class with 80% probability across 100 items, about 80 should be right. The standard fix is Temperature Scaling, a post-processing step that divides a model's raw output scores (logits) by a single positive number $T$ before turning them into probabilities.

On graphs, this uniform assumption breaks down. Because GNNs pass messages between connected nodes, two nodes can end up with the exact same logits for completely different reasons. One might sit in a homophilic neighborhood (surrounded by peers of the same class, reinforcing the signal), while another sits in a mixed or heterophilic neighborhood (surrounded by different classes, muddying the waters). A single global temperature has to compromise between them. Existing graph-aware calibrators try to fix this by throwing heavy neural architectures, attention mechanisms, or ensembles at the problem—knowing that structure matters, without establishing what mathematical form that structural correction should actually take.

Methods

Instead of guessing an architecture, the authors derive a theoretical calibration law from first principles using a Contextual Stochastic Block Model (CSBM)—a mathematical sandbox for graphs with Gaussian node features—paired with a one-layer linear GCN.

They find that in homophilic regimes with positive signal, the optimal temperature decreases approximately inversely with normalized local homophily. In plain English: well-supported nodes need smaller temperature adjustments than structurally ambiguous ones.

Translating this theory into practice yields Homophily-aware Temperature Scaling (HoTS). Without retraining the base GNN, HoTS assigns each node $i$ its own positive scalar temperature $T_i$:

$$T_i = T_{\text{base}} + \frac{\beta \sqrt{2K \log K(1 - e_i)}}{(|\hat{\tilde{h}}_i| + \varepsilon)^\alpha}$$

Here is how the pieces fit together:

  • Uncertainty numerator: Uses the node's normalized predictive entropy ($e_i$) to measure how concentrated the raw logits are.
  • Homophily denominator: Because true test labels are unknown, a tiny, fixed auxiliary GCN estimates each node’s local homophily ($\hat{\tilde{h}}_i$) using only training and validation labels (preventing data leakage).
  • Three learnable parameters: Fitted on a validation set, $T_{\text{base}} > 0$ sets a global baseline, $\beta > 0$ scales the correction, and $\alpha > 0$ tunes how sensitive the temperature is to the noisy homophily estimate. Because $T_i$ is always positive, HoTS strictly preserves the base model's top class prediction.

Datasets

The authors evaluate HoTS across 18 public node-classification benchmarks (plus synthetic CSBM graphs for theory validation), grouped into three regimes:

  • Homophilic: Citation networks (Cora, CiteSeer, PubMed) and Amazon/Coauthor graphs (Computers, Photo, CS, Physics, CoraFull).
  • Heterophilic: WebKB and Wikipedia graphs (Texas, Cornell, Wisconsin, Chameleon, Squirrel, Actor), plus Roman-Empire and tolokers.
  • Large-scale: ogbn-arxiv and Reddit.

No new datasets are introduced; rather, this serves as a sweeping testbed across diverse graph topologies.

Key Insights and Ideas

  • Logits alone leave an unavoidable gap: The authors prove mathematically that if optimal temperatures vary with local homophily among nodes with identical logits, any calibrator that ignores homophily suffers a strict calibration penalty.
  • Noise flattens the theoretical curve: Theory says the exponent $\alpha$ in the denominator should be $1$. However, because real-world homophily has to be estimated (introducing noise), an "errors-in-variables" effect attenuates the relationship, pushing the optimal $\alpha$ below $1$. Making $\alpha$ learnable rather than fixed at $1$ improves real-world calibration error by 1.10 percentage points.
Figure 1: Controlled CSBM validation. (a) Fitted temperature over the full homophily range; the blue curve and shaded band show the mean and one standard deviation across 20 seeds. The dashed curve shows the inverse-homophily trend. Pearson correlation is computed over the eight sweep points in 0.25 ≤h ≤0.95. We mark h0 and 1/K and shade Γ(h) < 0; the displayed vertical range is truncated. (b) The fitted exponent α is near the oracle value under noiseless homophily and decreases as estimation noise increases, matching Proposition 2’s attenuation.
  • Simplicity beats parameter-heavy calibrators: A compact, 3-parameter formula guided by graph theory outperforms complex auxiliary GNN and mixture-of-experts calibrators, avoiding memory bottlenecks on massive graphs like Reddit.

Key Results

Evaluated across all 18 benchmarks using GCN and GAT backbones against eight calibration baselines:

  • Best Overall Calibration: HoTS achieves the lowest mean Expected Calibration Error (ECE) at 4.79% (down from 11.43% uncalibrated and 6.04% for standard Temperature Scaling) and the best average rank (3.33).
  • Strong Heterophilic Gains: Where neighborhood signals are messiest, HoTS shines—dropping ECE on Texas from 21.64% (TS) to 15.37%, and Wisconsin from 19.06% to 14.67%.
Table 1: Calibration ECE (%, mean±std over 10 seeds per backbone, pooled across GCN and GAT). Best per row in red, second in bold, third underlined (excluding Uncal).
  • Better Triage (Selective Classification): When rejecting the least confident nodes to simulate deferring to human review, HoTS yields the highest accuracy on retained nodes across nearly all coverage levels (e.g., reaching 73.81% accuracy at 70% coverage), proving its confidence rankings are genuinely more trustworthy.

Limitations and Future Work

The authors are refreshingly upfront about where the exact math ends and engineering begins:

  • Idealized theoretical assumptions: The exact inverse-homophily Bayes law relies on Gaussian features, equidistant class means, uniform class priors, a one-layer linear GCN, and population-level neighborhood averages. Real graphs feature class imbalance, multi-layer nonlinearities, and low-degree noise—making the formula a strong structural prior rather than an exact law everywhere.
  • Negative-signal regimes: When signal strength turns negative (extreme heterophily where neighbor classes actively invert logits), positive temperature scaling cannot reverse logit ordering. HoTS uses an absolute-value denominator as a stable heuristic here rather than an exact posterior match.

Future work is not explicitly detailed by the authors, though relaxing these CSBM assumptions (e.g., accounting for class imbalance or low-degree fluctuations) stands out from their discussion of the theory's boundaries.

Summary updated

Abstract

For graph node classification, calibrated class probabilities are needed when confidence scores, usually the maximum predicted class probability, are used to rank predictions, defer uncertain nodes to human review, or control risk. Existing post-hoc calibrators either apply one global temperature or use graph-aware modules without a principled structural form. We study how local graph structure should enter node-level calibration. Our first results show that a logit-only temperature rule is insufficient when nodes with identical logits but different local homophily require different optimal temperatures. We then analyze a population-concentration contextual stochastic block model with Gaussian features and a one-layer linear GCN. Under equidistant class means, the Bayes posterior over class-template scores is a temperature-scaled softmax whose inverse-temperature is governed by a homophily-dependent signal strength. In the positive-signal homophilic regime, the resulting temperature decreases approximately inversely with normalized local homophily. This law motivates Homophily-aware Temperature Scaling (HoTS), a simple post-hoc calibrator that assigns each node a positive scalar temperature from entropy-based logit concentration and estimated local homophily. HoTS has three temperature parameters, preserves the predicted class, and learns the strength of the structural correction from calibration data. Across 18 node-classification benchmarks, two GNN backbones, and eight calibration baselines, HoTS achieves the best mean Expected Calibration Error (ECE) of 4.79%, the best average rank, and the most reliable confidence ranking in selective classification. Code is available at https://github.com/inu0104/HoTS.
BibTeX
@inproceedings{tae2026hots,
  author = {Inwoo Tae and Yoontae Hwang and Yongjae Lee},
  title = {{HoTS: Homophily-Aware Temperature Scaling for Graph Neural Network Calibration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=woxrGUwgJ3},
}
Figure