Quantification Learning (QL) is the task of estimating the overall prevalence of labels in a dataset rather than predicting labels for individual instances. While well-studied in tabular data, QL faces unique challenges when applied to graph-structured data, such as social networks or citation graphs. This paper introduces the first methods designed to handle the structural sampling biases and complex edge relationships inherent in real-world networks.
The Challenge of Graph Quantification
Standard QL methods, such as Adjusted Classify & Count (ACC), typically rely on the assumption of Prior Probability Shift (PPS). This assumes that while the overall label distribution might change between training and testing, the features associated with a specific class remain constant.
However, in graph data, this assumption is often violated by structural covariate shift. When a test set is gathered by crawling a specific local neighborhood or community within a graph, the distribution of instances (nodes and their local structures) changes significantly. Furthermore, standard ACC relies on an invertible confusion matrix. In graphs with "non-homophilic" edges—where nodes of different classes frequently connect—classifiers may equally confuse two classes, making the matrix non-invertible and the method unusable.
Proposed Methods: SIS and NACC
To address these issues, the authors propose two novel extensions to the ACC framework:
1. Structural Importance Sampling (SIS)
SIS generalizes ACC to handle structural covariate shift. Since training and test nodes are often sampled from different structural distributions, SIS employs Kernel Density Estimation (KDE) to reweight training instances. By using a Personalized PageRank (PPR) kernel, the method identifies training nodes that are structurally "closer" to the test distribution and assigns them higher weights. This allows the model to focus on regions of the training data that best mimic the test set's structural properties.
2. Neighborhood-aware ACC (NACC)
NACC addresses the issue of class identifiability. To break the mathematical symmetries caused by non-homophilic edges, NACC incorporates local context. Instead of adjusting based solely on a node's predicted label, NACC uses a tuple: the node's predicted label and the majority predicted label of its neighbors. This extra structural information allows the algorithm to distinguish between classes that might otherwise appear identical in a standard confusion matrix.
Experimental Evaluation
The authors evaluated their methods using both synthetic and real-world distribution shifts.
- Synthetic Shifts: Five standard node classification datasets (CoraML, CiteSeer, PubMed, Amazon Photos, Amazon Computers) were used. Distribution shifts were artificially induced using PPS, Breadth-First Search (BFS), and Random Walk (RW) sampling to simulate local neighborhood crawling.
- Real-World Shift: The Twitch Gamers social network dataset provided a natural test case. Here, nodes represent users and edges represent follower relationships. The network was partitioned by the user's primary language (e.g., EN, DE, FR), creating a structural covariate shift. The task was to quantify the prevalence of explicit content streamers across different language communities.
Key Results and Insights
The experiments yielded several critical insights:
- Superior Performance: Across various classifiers (MLP, GCN, GAT, APPNP) and shift types, the combination of SIS and NACC consistently outperformed standard Classify & Count (CC) and ACC baselines.
- Optimal Configuration: The best results were achieved using an APPNP classifier—a model that inherently accounts for graph structure—paired with both SIS and NACC adjustments. This configuration yielded the lowest Absolute Error (AE) and Relative Absolute Error (RAE).
- Real-World Robustness: On the Twitch Gamers dataset, SIS significantly improved quantification accuracy for minority language communities, which experienced the most severe distribution shifts relative to the English-dominated training data.
Conclusion and Future Work
This research establishes a foundation for quantification learning on graphs. By leveraging structural context through SIS and NACC, the authors demonstrate that it is possible to accurately estimate population-level statistics even under significant sampling bias.
Future work includes the development of native benchmark datasets specifically for graph quantification, as current research relies heavily on synthetic adaptations of classification tasks. Additionally, the authors suggest exploring how other quantification families, such as distribution matching approaches, might be adapted for the graph domain.
Summary updated