Abstract
Quantification learning (QL) aims to estimate class prevalence in unlabeled datasets, a task often complicated by distribution shifts between training and test sets. While standard QL methods rely on the Prior Probability Shift (PPS) assumption, graph data frequently exhibits structural covariate shift, where training and test nodes are sampled from disparate network regions. This paper introduces a robust framework that combines the state-of-the-art KDEy distribution matching approach with Structural Importance Sampling (SIS). By reweighting training nodes based on their graph proximity to test nodes using graph kernels, the proposed method significantly improves label distribution estimates under severe structural shifts without compromising performance on standard tasks.
The Challenge of Structural Covariate Shift
In many real-world applications, such as estimating political sentiment across a social network, the aggregate distribution of labels is more critical than individual node predictions. This task, known as Quantification Learning, typically assumes that while class balances might change (Prior Probability Shift), the features associated with those classes remain stable.
However, in graph-structured data, this assumption often fails. If a model is trained on one cluster of a network but deployed on a distant, structurally distinct cluster, it encounters structural covariate shift. Standard QL methods produce biased estimates in these scenarios because they rely on global classifier confidence scores that do not reflect the local characteristics of the test region.
Methodology: KDEy with Structural Importance Sampling
The authors address this by enhancing the Distribution Matching (DM) framework. Specifically, they utilize KDEy, which employs Kernel Density Estimation to model the probability density functions (PDFs) of predicted probabilities. To handle structural shifts, they introduce Structural Importance Sampling (SIS):
- Graph-Aware Reweighting: Training nodes are assigned weights based on their proximity to unlabeled test nodes, calculated via graph kernels like Personalized PageRank (PPR) or Shortest Path (SP).
- Integration: These weights are integrated into the KDEy density estimators. This ensures the model matches the test distribution using only training nodes that are structurally similar to the test set, effectively filtering out irrelevant data from distant graph regions.
Experimental Evaluation
The method was evaluated on five node classification benchmarks (CoraML, CiteSeer, PubMed, Amazon Photos, and Amazon Computers) under three induced shift types:
- Prior Probability Shift (PPS): Skewed label distributions.
- Random Walk (RW) Shift: Test nodes sampled via localized random walks.
- Breadth-First Search (BFS) Shift: Test nodes sampled based on strict distance from seeds.
Key Insights and Results
- Superiority Under Shift: KDEy + SIS consistently outperformed standard methods across all datasets and shift types. In cases of severe Random Walk shift on the CoraML dataset, the method reduced Relative Absolute Error (RAE) from ~0.517 to ~0.405.
- Robustness: The approach proved "safe" to use; even under standard PPS conditions where SIS is not theoretically required, performance did not degrade.
- Kernel Flexibility: Surprisingly, the Personalized PageRank (PPR) kernel performed well even on BFS-induced shifts, suggesting the method is robust to the specific definition of "closeness."
- Classifier Synergy: The quality of the underlying classifier remains vital. Graph-aware models like APPNP and GAT provided significantly better quantification foundations than structure-unaware models like MLPs.
Conclusion
By localizing distribution matching to relevant graph neighborhoods, KDEy + SIS provides a powerful solution for quantification in networked data. Future work may involve automating kernel selection and extending these importance sampling principles to other domains with spatial or temporal shifts, such as geospatial analysis or time-series forecasting.
Summary updated