GSQ: A Graph Node Symmetric Quantification Framework for Dataset Shift Adaptation Without Node Classifiers

GSQ abandons node-level classifiers and directly predicts the class distribution of node samples, achieving symmetric quantification.
The article introduces graph node quantification and its challenges: due to dataset shift, aggregating node classifier predictions is unreliable. Existing aggregate methods rely on node-level labels and prediction, are costly, and are asymmetric. The proposed GSQ framework—comprising a node encoder, embedding pooler, prevalence predictor, and optional post-hoc scaling—directly learns a mapping from node samples to class distributions using only sample-level distribution labels, achieving symmetric quantification. Experiments verify adaptability to prior probability shift and structural covariate shift, but detailed comparisons with existing methods are lacking.
Graph node quantification is a practical but relatively underexplored task in graph machine learning: given a set of labeled nodes in a graph, estimate the proportion of each class in another sample of unlabeled nodes. In real-world scenarios, dataset shift between training and test sets—caused by sampling bias or distribution change—often makes the approach of directly aggregating classifier predictions unreliable. Existing methods typically follow an "aggregate" paradigm: first train a node-level classifier, then aggregate the predictions and correct for shift through an adjustment strategy. However, this paradigm relies on node-level supervision and node-level prediction; it is not only costly to train, but also constitutes "asymmetric" quantification, because the training samples (nodes) and the prediction target (a sample of nodes) are of different types.
A recent paper proposes a framework called GSQ (Graph Node Symmetric Quantification) that attempts to fundamentally change this paradigm. GSQ abandons the node-level classifier, directly estimates class prevalence, and allows training and prediction to use the same type of sample (i.e., a sample of nodes), thereby achieving "symmetric" quantification.

Limitations of Existing Graph Node Quantification Methods
Traditional graph node quantification follows an aggregate pipeline: train a node classifier using labeled nodes in the graph, then predict each unlabeled node in the target sample, and finally aggregate the predictions and apply a shift adjustment strategy (such as confusion-matrix-based correction). The advantage of this approach is that it can reuse mature node classification models, but it has two obvious problems.
First, the training phase requires node-level labels, which may be difficult to obtain in practice—we often only know the proportion of each class in a subset of nodes, not the specific class of each node. Second, the prediction phase requires obtaining node-level predictions before aggregating, which introduces additional error, and the design of the adjustment strategy depends on assumptions about the type of shift. Moreover, because the training samples are individual nodes while the prediction target is a sample of nodes (a set of nodes), the two are of inconsistent types, making the quantification process "asymmetric" and limiting the method's adaptability under sample-level distribution shift.
The GSQ framework is designed precisely to address these pain points.
Dataset shift is a common distribution inconsistency phenomenon in machine learning deployment. It can be subdivided by cause into several categories: prior probability shift refers to a change in class proportions while the class-conditional distribution remains unchanged—for example, a certain class of nodes is the majority in the training set but becomes the minority in the target set; covariate shift refers to a change in the input feature distribution while the conditional distribution remains unchanged; structural covariate shift is a situation specific to graph data, namely a change in graph structure (such as node degree distribution or adjacency patterns). Graph node quantification is difficult precisely because changes in the class proportions of the target sample are often intertwined with structural changes, causing the classifier's predictions on that sample to be systematically biased, so that directly aggregating the predicted proportions deviates from the true prevalence.
Quantification and classification are related but distinct tasks. A classifier pursues prediction accuracy for each sample, whereas quantification aims to estimate the proportion of each class in a set of samples, and the evaluation metrics differ as well—commonly Absolute Error (AE) or normalized absolute error is used to measure the deviation between the estimated proportions and the true proportions. In quantification tasks, even if a classifier's individual accuracy is moderate, if its errors roughly cancel out across classes, the aggregated proportion estimate may still be fairly accurate; conversely, a classifier with high accuracy but systematically consistent error direction can instead cause severely shifted quantification results. This is also why aggregate methods require an additional shift adjustment step, and why the adjustment strategy is highly dependent on assumptions about the type of shift.
Core Design of the GSQ Framework
The core idea of GSQ is to directly learn a mapping from a sample of nodes to a class distribution, bypassing the node-level classifier. The entire framework can be constructed as a pipeline containing four components: a node encoder, an embedding pooler, a prevalence predictor, and an optional post-hoc scaling step.
The node encoder is responsible for mapping each node to an embedding vector; it can be a trainable graph neural network (such as a GNN) or a fixed encoder based on reservoir computing. The embedding pooler aggregates the embeddings of a set of nodes into a sample-level representation; common pooling operations such as average pooling and max pooling can all be used. The prevalence predictor takes the sample-level representation as input and directly outputs a class proportion vector, and its training objective can be various prediction losses (such as cross-entropy, mean squared error, etc.). The post-hoc scaling step is optional and is used to further correct distribution shift after prediction.
The key to this design is that the training phase only requires class distribution labels for node samples (i.e., the proportion of each class in each sample), not the class label of any individual node. The prediction phase also directly outputs the class distribution of the sample, without an intermediate node classifier. Therefore, training and prediction use the same type of sample (a sample of nodes), achieving symmetric quantification.
Reservoir computing is a class of sequence/graph representation methods with extremely low training cost. Its core is to construct a fixed, random dynamical system (the "reservoir") that does not participate in training, mapping inputs into a high-dimensional state space, with only the output layer trained via linear regression or a simple classifier. In graph machine learning, the reservoir computing idea is often embodied in randomly initialized graph propagation layers with frozen weights, where node representations are obtained iteratively through fixed adjacency propagation rules. Compared with end-to-end trained GNNs, it requires no backpropagation, has few parameters, and is highly scalable, but its expressive power is limited by the quality of the random features. GSQ lists the reservoir encoder as an optional component, meaning the framework can perform encoding at nearly zero training cost in scenarios with very few labels and limited compute—a practically meaningful feature for a symmetric quantification paradigm that emphasizes low labeling dependence.
Advantages of Symmetric Quantification and Experimental Evaluation
The advantage of symmetric quantification is that it better fits real-world application scenarios. In many domains, obtaining node-level labels is costly, whereas obtaining sample-level distribution labels is relatively easy (for example, by manually labeling the proportion of each class in a subset). At the same time, directly predicting the distribution avoids the accumulation of node-level prediction error and may improve quantification accuracy.
The paper evaluates the GSQ framework on binary and multi-class datasets, covering datasets with different levels of homophily, and tests two types of shift: prior probability shift and structural covariate shift. Experimental results show that GSQ can effectively adapt to these shifts and performs well under different configurations (different encoders, poolers, and prediction objectives). However, the paper does not provide detailed comparison data with existing methods, so the extent of GSQ's advantage over traditional aggregate methods still requires further verification.
Implications for Graph Quantification Research
The GSQ framework offers a new approach to graph node quantification: moving away from reliance on node-level classifiers and directly learning sample-level distributions. This symmetric quantification paradigm is complementary to existing asymmetric quantification methods and is especially suitable for scenarios where node labels are scarce but sample distribution labels are obtainable. In addition, the modular design of the framework allows flexible replacement of components, making it convenient for researchers to explore the effects of different encoders and pooling strategies.
Future work can further explore GSQ's performance under more types of shift and conduct systematic comparisons with existing methods. At the same time, how to extend GSQ to dynamic graphs or heterogeneous graphs is also a direction worth attention.
In summary, the GSQ framework provides a concise and effective alternative for graph node quantification, and its symmetric quantification concept may push the field toward a more practical and more robust direction.
One-line Summary
GSQ abandons the node-level classifier and directly predicts the class distribution of node samples, achieving symmetric quantification.
Paragraph Summary
The article introduces the graph node quantification task and its challenges: due to dataset shift, directly using a node classifier to predict and then aggregating proportions is unreliable. Existing aggregate methods rely on node-level labels and node-level prediction, incur high training costs, and use training samples and prediction targets of inconsistent types, making them asymmetric quantification. To this end, the paper proposes the GSQ framework, composed of a node encoder, an embedding pooler, a prevalence predictor, and optional post-hoc scaling, which directly learns a mapping from node samples to class distributions; training requires only sample-level distribution labels, thus achieving symmetric quantification. Experiments on binary and multi-class datasets with different homophily levels verify its adaptability to prior probability shift and structural covariate shift, but detailed comparisons with existing methods are lacking, and the extent of its advantage still needs further testing.
Related articles

Michael Nielsen Takes Down His Classic Neural Network Textbook, Sparking Community Discussion
Michael Nielsen's classic free textbook Neural Networks and Deep Learning has been taken offline, sparking discussion on Hacker News about the reasons and impact.

Inside the AI Training Data Market: The Trade-off Between Exclusivity and Discounts
G2i founder Gabe Greenberg reveals the dual-track pricing of the AI training data market: labs pay a premium for exclusive data or accept discounts that allow others to buy it.

SessionGraph: Unifying All Coding Agent Sessions in One Interactive Graph
SessionGraph aggregates coding agent sessions into an interactive graph, helping developers review, debug, and manage AI coding workflows across sessions. This article examines its positioning, value, and open questions.