Active Corpus Selection for Training Subgraph Retrievers Using OOD Queries
Pritish Chakraborty, Aditya Singh, Indradyumna Roy, Lokesh Nagalapatti, Himanshu Dutta, Arun Iyer, Yashoteja Prabhu, Gaurav Sinha, Manik Varma, Soumen Chakrabarti, Abir De
NeurIPS 2026
TL;DR. ACROSS actively selects a small, label-efficient corpus subset per OOD query to train distribution-shift-tolerant neural subgraph retrieval models, using an index built via suitably augmented and transformed corpus embeddings.
Abstract. Neural subgraph retrieval (NSR) models degrade under query distribution shifts, and retraining for each new distribution requires collecting fresh ground-truth labels, each of which entails an NP-hard subgraph-matching instance across a large corpus—making repeated label collection computationally prohibitive. We introduce ACROSS, an active corpus selection framework that, under a fixed solver budget, selects a small corpus subset per out-of-distribution query whose labels suffice for effective NSR training. We prove that allocating the entire budget to retrieving positives is optimal given extreme class imbalance. To enable efficient positive retrieval across arbitrary query distributions, we linearize corpus embeddings around a base model, apply randomized projections to eliminate hinge nonlinearities, and train distribution-shift-tolerant representations via adversarial parameter perturbation. The resulting corpus index is built once and reused across all distributions. Experiments on four molecular graph datasets show ACROSS consistently outperforms six baselines in downstream retrieval accuracy.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:45 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper proposes ACROSS, an active corpus selection framework that, under a fixed solver budget, identifies positive query-corpus pairs across shifted distributions to efficiently retrain neural subgraph retrievers. Reviewers praise the problem’s practical relevance and the clever technical pipeline that combines corpus linearization, randomized projections, and perturbation-tolerant training into a reusable index. As for the weakness, one reviewer raises a fundamental concern that the entire problem formulation is unrealistic and the authors provide response to address the concerns.
Final justification
The authors have provided a rebuttal and onr reviewer acknowledged that the rebuttal helped clarifying some issues and raised the score. Therefore, I maintain my original accept decision.
Read meta-review
Meta-review
This paper proposes ACROSS, an active corpus selection framework that, under a fixed solver budget, identifies positive query-corpus pairs across shifted distributions to efficiently retrain neural subgraph retrievers. Reviewers praise the problem’s practical relevance and the clever technical pipeline that combines corpus linearization, randomized projections, and perturbation-tolerant training into a reusable index. As for the weakness, one reviewer raises a fundamental concern that the entire problem formulation is unrealistic and the authors provide response to address the concerns.
Final justification
The authors have provided a rebuttal and onr reviewer acknowledged that the rebuttal helped clarifying some issues and raised the score. Therefore, I maintain my original accept decision.
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 1/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper offers a method to efficiently collect useful labels to adapt a neural subgraph retriever (NSR) model to shifted distributions. It reduces the problem to retrieving graphs from the database which are likely to be labeled positive. The core technical challenge is that the index used to retrieve such graphs is not suitable for the shifted distribution naively. The proposed solution leverages a Taylor series expansion of the adapted model around the base model, random projections to eliminate non-linearities and perturbation based training to make the retriever robust to the shifted distribution. Results show that using examples retrieved by the method (called ACROSS) are better at adapting the NSR model to the shifted distribution than baselines. Ablations show effect of various components of ACROSS.
Strengths and weaknesses
Strengths
The method is clever. It requires many non-trivial logical steps to go from the chicken-and-egg problem of requiring adapted NSR model to build the new index and requiring a new index to build the adapted NSR model. Results are good compared to the considered baselines, which cover at least some naive methods and variants possible under this problem framing.
Weaknesses
My big concern with this paper is its entire premise. This paper proposes a new problem statement: adapt an NSR model to a shifted distribution. However this problem statement is unrealistic and no attempt is made at convincing the reader otherwise. The experimental setup devised to test this problem setup is highly artificial. Practically, the simplest approach would be to simply train the NSR model on a large enough dataset representative of the downstream distributions, and in a robust enough manner to generalize to somewhat dissimilar distributions.
Adding on the above concern, the second premise here is that generating training data for subgraph classification is hard. While checking subgraph containment is indeed NP-hard, training data generation for NSR can easily bypass this by simply constructing positive pairs by generating subgraphs from the target graphs. It is also possible to generate hard negatives by minimally perturbing subgraphs extracted from the target graphs. All this makes is easy to cover distributions arising from the same database of target graphs.
Another thing that works against the problem framing is that only the query distribution shifts, not the target graph distribution. Query graph generalizability is usually less of a concern in NSR models (e.g. see Sections 4.6 and 4.7 in [1]).
Further, the method seems to be designed with the assumption that only symmetric indexes exist. However, prior work (e.g., appendix D in [1] has a detailed discussion) has shown that hinge-distance embeddings can be readily indexed too.
To demonstrate the actual utility of the proposal, a more convincing experiment would be to compare with an NSR model trained on the entire distribution beforehand or on higher-quality naively generated data and showing how close ACROSS comes to the ceiling and how the data generation + training times compare. However, this experiment is unlikely to change my view of the paper given the concerns above.
[1] GREED: A Neural Framework for Learning Graph Distance Functions, NeurIPS 2022.
Questions
What are some realistic settings which fall under this paper's problem formulation?
What are more realistic experimental setups that can be used to evaluate the problem formulation?
Limitations
Yes.
Final justification
I thank the authors for the rebuttal.
My major concerns have been addressed, at least to some extent. I have raised my score.
I encourage the authors to incorporate some of these clarifications / discussions / motivating examples in future revisions for the benefit of readers.
Formatting concerns
None.
3 comments
Details of Underlying Premise
We thank the reviewer for their suggestions. While we had provided a rebuttal, we believe that we can elaborate more clearly on the most important concerns raised by the reviewer.
- Underlying premise
We would like to highlight that the downstream distribution, i.e., the OOD distribution, is unknown at the time of the original stage of training, which is the underlying assumption across the OOD literature (See [1,2] below). At that stage, the OOD distribution can be any distribution shifted from the original training distribution , and is entirely unknown to the training procedure. Now, the user who holds a sample from the OOD distribution is interested in high accuracy on alone. This implies that a model which is robust across many distributions would, to this user, be less preferable than a model that is specifically tuned to , even if it fails on every other distribution. Therefore, right at the outset, our task is not to obtain a model that generalizes across distributions other than the OOD distributions, but to build a setup that a user can employ to train a model on a specific yet unknown OOD distribution with minimal solver invocations. We re-emphasize that at the time of original training on , we have access neither to samples from nor to the distribution itself.
The above is the underlying premise. We now explain the use cases that motivate it. Note that we consider a retrieval setting in which the corpus remains fixed, which is quite realistic. In molecular retrieval, the corpus consists of known molecular compounds, collected and curated from large repositories such as PubChem, ChEMBL, and ZINC, repositories that are built up over many years. Different groups and organizations, or even different subgroups within the same organization, may search this same repository, but each with its own distinct query workload. A group X is interested in obtaining a custom model tailored solely to its own query workload, even if that model performs poorly on all other distributions. Accordingly, in line 14 of Algorithm 2, we build a fresh model, trained on a minimal set of actively collected labelled data, that is specific to the distribution at hand. For a different , we will have to train a different model.
[1] Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation. ICML 2020.
[2] Fully Test-Time Adaptation by Entropy Minimization. ICLR 2021.
More formally, we define the corpus as , which remains fixed throughout. We elaborate on our setup in two stages.
- Pretraining: during the training of the GNN-based index, we use the training data .
- Finetuning: An external user (e.g., the group X as described above) has access to . It also holds a sample from its OOD query distribution . The trainer at stage (1) has no access to . Moreover, this user is interested to train a model only on and to them, it is absolutely OK if this model shows poor accuracy on any other query distribution, but provides accurate predictions on .
- Practically, the simplest approach would be to simply train the NSR model on a large enough dataset representative of the downstream distributions, and in a robust enough manner to generalize to somewhat dissimilar distributions.
In many scenarios, the query samples available from out-of-distribution are limited, but let’s ignore that for the time being. Even if we have a “large enough” OOD query sample, we do not have relevance supervision on corpus items. We shall show below that obtaining relevance labels is not cheap and cannot avoid expensive solver calls. A key contribution of our work is an index built upon the representation learnt from pre-training data , which can be used to retrieve a few OOD instances for which it is maximally worthwhile to invest solver time. This reduces solver calls while maintaining learning pace over , resulting in rapid reduction of error of a held-out set from .
Details of Underlying Premise (contd)
- (contd) the second premise here is that generating training data for subgraph classification is hard. While checking subgraph containment is indeed NP-hard, training data generation for NSR can easily bypass this by simply constructing positive pairs by generating subgraphs from the target graphs. It is also possible to generate hard negatives by minimally perturbing subgraphs extracted from the target graphs. All this makes is easy to cover distributions arising from the same database of target graphs.
Let us first dispense with the question: can the pretraining stage use a suitably enhanced or expanded , such that the pretrained model itself gives predictions for any new distribution , which are as accurate as a model trained on Q’ itself? We argue this is not possible. At the pretraining stage, we neither have access to the distribution nor the samples corresponding to . Blindly sampling subgraphs of from the corpus will not be faithful to a specific OOD distribution .
Consider a simplified illustrative scenario where we don’t even have graphs. Instead, we have random variables generated from an -faced die with the faces denoted . The training distribution is and the generated data is where and . The (unknown) OOD distribution is and the OOD sample drawn from it is written as . Neither nor is known during training. But they are the only quantities of interest to the finetuner X (user X does not care if the performance is poor in any other distribution).
Observe that generating more and more samples from does not help: while the resulting samples may include all instances in the yet-to-materialize , i.e., , it will generally also include samples from low-probability regions of , distorting the pretraining loss and moving the pretrained model away from the model that is optimal for .
As reviewer LMV5 has suggested, suppose the pretrainer samples a corpus graph and samples a subgraph , this gives a positive instance with . The pretrainer now perturbs to with the aim of obtaining . (Obviously, this cannot be done by removing edges, only adding them. But even then, a solver check is generally needed, see our first round of rebuttal.)
Furthermore, it is entirely possible that for some other corpus graph for . If we ignore this danger of corrupted labels, and assume , as reviewer LMV5 presumably suggests, we get the following results (test MAP; bold is best).
| Dataset | ACROSS | Suggested method |
|---|---|---|
| PTC-FR | 0.244 | 0.10 |
| PTC-FM | 0.233 | 0.174 |
| PTC-MR | 0.245 | 0.130 |
| COX2 | 0.195 | 0.159 |
Clearly, ACROSS is the best performer across all datasets. We conclude that the perturbation strategy suggested by the reviewer is not a feasible data generation strategy for our proposed setup.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors propose a novel approach to handling OOD scenarios for neural subgraph retrieval. They propose ACROSS, an active corpus selection framework that uses a fixed solver budget to identify likely positive query-corpus pairs for OOD query distributions, while treating randomly sampled corpus items as likely negatives under extreme class imbalance. The method builds a reusable corpus index from a base retriever, uses linearization and randomized projections to make the asymmetric hinge-style relevance score compatible with ANN search, and trains perturbation-tolerant representations to improve robustness across query distributions. Experiments on four molecular graph datasets suggest that ACROSS improves MAP over several active selection and retrieval baselines.
Strengths and weaknesses
Strengths:
- The problem is well motivated and practically relevant
Reducing solver calls for subgraph retrieval under distribution shift is a meaningful setting, especially because exact subgraph matching is NP-complete and repeated retraining for new query distributions can be costly.
- The method combines several technically interesting components
The positive-enrichment argument, static corpus indexing, randomized projection step, and perturbation-tolerant training form a coherent pipeline. The theorem supporting allocation of solver budget to positives is a useful formal addition.
- The empirical results are fairly broad within the proposed setup
The paper evaluates four molecular datasets, several baselines, ablations, budget/noise sweeps, and appendix results across all OOD query clusters.
Weaknesses:
- Clarity is a significant weakness
The page limit seems to hurt readability: some components are introduced quite densely, and several implementation/motivation details are only vaguely described or pushed to the appendix. A diagram of the full ACROSS pipeline would make the method much easier to follow.
- The notion of OOD/workload shift could be explained more concretely
The introduction mentions private/base workloads or vertical distributions, but the paper would benefit from clearer examples of what these workflows/workloads mean in real applications.
- The theoretical insight is useful but not entirely surprising
The theorem is sound-looking and appropriate for this setting, but the high-level message that positives are more valuable under extreme imbalance resembles known lessons from contrastive/self-supervised learning, including NCE/InfoNCE-style observations about negative sampling and tolerable false negatives.
- The computational trade-offs could be clearer
The paper is motivated by reducing expensive solver calls, but ACROSS introduces several additional components, including augmented representations, randomized projections, perturbation-tolerant training, ANN indexing, and reranking. A runtime or cost breakdown would help clarify how much overhead is introduced and when this overhead is amortized across OOD query distributions.
Questions
-
Could the authors add a schematic figure of ACROSS, from base GNN/index construction through OOD query active selection and downstream retraining? This would substantially improve readability.
-
Could the authors clarify what concrete "workloads" or "vertical distributions" correspond to in real deployments? A short motivating example would help connect the formal OOD query split to practice.
-
Could the authors discuss whether stronger OOD settings, such as cross-dataset query shifts while keeping the corpus fixed or using a shared multi-dataset corpus, are feasible under their assumptions? Such an experiment or discussion would clarify how far the method extends beyond within-dataset structural splits.
Limitations
The authors discuss several limitations, including locality of linearization, one-round active selection, lack of node/edge feature awareness, and broader evaluation. The empirical OOD definition could be better justified, especially regarding whether stronger cross-dataset/domain shifts are feasible under the fixed-corpus assumptions.
Final justification
The justification was provided in the comment.
Formatting concerns
None
3 comments
Rebuttal
We are grateful to the reviewer for their comments. We address each of their comments below.
"Clarity is a significant weakness...Could the authors add a schematic figure of ACROSS?..."
We will provide a clear and comprehensive schematic diagram for the ACROSS pipeline in the paper. Each component of the pipeline will be thoroughly discussed.
"The introduction mentions private/base workloads or vertical distributions...examples of what these workflows/workloads mean in real applications."
We describe two real-world deployment scenarios consistent with the three properties of our setup: corpus fixed and fully available, queries observed but not synthesizable ahead of time, and solver calls being required to obtain labels.
(1) Molecular database search as a service. A substructure-search provider trains its base retriever on generic scaffolds drawn from public databases such as ChEMBL and PubChem. Chemical space is conventionally partitioned by scaffold identity [1], and evaluation on structurally distinct held-out scaffolds is standard precisely as random splits overstate real-world generalization [2] — a concern serious enough to have motivated dedicated scaffold-hopping distribution-shift benchmarks [3]. Here is the generic scaffold distribution.
A pharma partner's deployed queries, by contrast, are drawn from their proprietary compound series: scaffold families narrowed by the partner's own synthesis and ADMET considerations, built on the same generic collections but concentrated in a region the base retriever was never trained to specialize in. The query stream is therefore OOD relative to as they occupy a narrow slice of a space the base model was trained to cover broadly. The corpus (the public database) is fixed and fully available; queries are observed as they arrive but cannot be anticipated, being proprietary; and establishing ground truth still requires a per-candidate VF call [4], the cost our active selection procedure is designed to amortize.
(2) Cross-team enterprise code search. Multiple teams within a single organization each maintain their own fork or private extension of a shared internal codebase, diverging in control-flow and dependency structure in ways that, for internal IP or security reasons, are never merged back or exposed across teams. The premise of siloed code motivating de-centralized training, is the subject of a recent line of work inspired by federated learning [5, 6, 7]. Each team trains and retrieves against its own private fork.
As each fork accumulates its own idioms and design patterns on top of a common base, that particular team's query stream is shifted relative to any shared base model. This reflects team-specific usage rather than any exotic property of the underlying graphs; by construction this distribution is unobservable to other teams. No team can access the others' forks, and so, none can train a single retriever over the pooled distribution — each must adapt its own model to its own idioms. As in (1), the corpus (shared codebase) is fixed and locally available, queries are observed only within the team's own traffic, and VF-verified labels remain the expensive step our method targets.
"The theoretical insight is useful but not entirely surprising."
We appreciate the reviewer for pointing this out and will include the connection to NCE/InfoNCE style analyses in Appendix D. However, we would like to clarify a few ways our analysis is different from the typical NCE style analysis.
Debiased contrastive analyses in the literature [8, 9] are primarily concerned with sampling bias. In this NCE setup, true labels are unavailable and negatives are sampled uniformly from the data. As a result, a negative may be similar to an anchor item. To correct this bias, the objective is reweighted to approximate the unbiased loss without labels. Two aspects in this setup differ from ours. First, positives are provided by construction (augmentation) -- a known similar pair can be manufactured from a given anchor point. Secondly, no oracle exists: labels are assumed permanently unavailable, which is what the loss reweighting compensates for.
In our case, positives are the minority class, and an oracle exists (i.e. an exact subgraph isomorphism solver), capped by a budget on the number of oracle calls. The question we attempt to answer is not "how do we correct a biased loss subject to the unavailability of labels", but "given a budget B of oracle calls, which items should we spend this budget on". This is a resource allocation problem over an oracle, and not a bias-correction problem over a label-free sampler.
"A runtime or cost breakdown would help clarify...amortized across OOD query distributions"
We compare ACROSS with a naive exhaustive labeling strategy. We separate runtime into a one-time setup cost and a marginal per-distribution cost.
One-time cost . Training the base retriever (30 epochs) and the learned model (200 epochs), together constitute on a single 45,GB GPU. Building the corpus index adds a calibration and construction cost (of which construction is under a second). Both and are incurred once and reused across every OOD distribution at no re-indexing cost.
Marginal cost per OOD distribution . This is the labeling cost of serving one new distribution. ACROSS spends solver calls per query, giving ; exhaustive labeling of the full corpus per query instead costs . We exclude the downstream retriever training time , as downstream training is common to ACROSS and to any baseline labeling strategy.
Amortization. The total cost of serving OOD distributions is
Against re-indexing per distribution, the one-time cost is recovered once is large enough that reuse outweighs rebuilding. We compute the ratio
Amortization becomes meaningful from onwards, as the ratio drops below . This is the expected regime in the vertical-adaptation settings we target.
"Could the authors discuss whether stronger OOD settings, such as cross-dataset query shifts while keeping the corpus fixed..."
We report the absolute deviation of ACROSS test MAP from the in-dataset values at budget , across all four clusters. The source dataset is named in the header and the target datasets are each named in the columns.
In this cross-dataset setup, during the active selection stage, queries are provided from the target dataset. This tests the index's robustness to foreign queries.
PTC-FR
| Q (in-dist) | PTC-FM | PTC-MR | COX2 |
|---|---|---|---|
| Q1 (0.252) | 0.035 | 0.030 | 0.026 |
| Q2 (0.161) | 0.005 | 0.003 | 0.009 |
| Q3 (0.281) | 0.021 | 0.026 | 0.051 |
| Q4 (0.282) | 0.000 | 0.002 | 0.030 |
| Avg (0.244) | 0.015 | 0.015 | 0.029 |
PTC-FM
| Q (in-dist) | PTC-FR | PTC-MR | COX2 |
|---|---|---|---|
| Q1 (0.262) | 0.011 | 0.039 | 0.007 |
| Q2 (0.241) | 0.015 | 0.030 | 0.005 |
| Q3 (0.179) | 0.006 | 0.013 | 0.011 |
| Q4 (0.250) | 0.015 | 0.021 | 0.009 |
| Avg (0.233) | 0.012 | 0.026 | 0.008 |
The maximum deviation is 0.051. Thus the performance of the downstream retrievers when the ACROSS index is presented with out of dataset queries remains relatively stable.
References
[1] Bemis, G.W. & Murcko, M.A. (1996). The properties of known drugs. 1. Molecular frameworks. J. Med. Chem.
[2] Wu, Z., Ramsundar, B., Feinberg, E.N., Gomes, J., Geniesse, C., Pappu, A.S., Leswing, K. & Pande, V. (2018). MoleculeNet: a benchmark for molecular machine learning. Chem. Sci.
[3] WelQrate: Defining the Gold Standard in Small Molecule Drug Discovery Benchmarking (2024) arXiv:2411.09820.
[4] Carletti, V. et al. "Introducing VF3: A New Algorithm for Subgraph Isomorphism." In Graph-Based Representations in Pattern Recognition (GbRPR 2017).
[5] Kumar, J. & Chimalakonda, S. (2024). Code Summarization without Direct Access to Code — Towards Exploring Federated LLMs for Software Engineering. EASE '24.
[6] Kumar, J. et al. (2025). I Can't Share Code, but I need Translation — An Empirical Study on Code Translation through Federated LLM. arXiv:2501.05724.
[7] Luo, W. et al. (2024). When Fine-Tuning LLMs Meets Data Privacy: An Empirical Study of Federated Learning in LLM-Based Program Repair. arXiv:2412.01072.
[8] Chuang, Robinson et al. Debiased Contrastive Learning. NeurIPS 2020
[9] Chuang, Robinson et al. Contrastive Learning with Hard Negative Samples. ICLR 2021
Further explanation
The notion of OOD/workload shift could be explained more concretely
We would like to once again thank the reviewer for their comments. While we have provided a rebuttal to you earlier, we take the opportunity to explain our proposal better.
We would like to highlight that the downstream distribution, i.e., the OOD distribution, is unknown at the time of the original training, which is the underlying assumption across the OOD literature (See [1,2]). At that stage, the OOD distribution can be any distribution shifted from the original training distribution , and is entirely unknown to the training procedure. Now, the user who holds a sample from the OOD distribution is interested in high accuracy on alone. This implies that a model which is robust across many distributions would, to this user, be less preferable than a model that is specifically tuned to , even if it fails on every other distribution. Therefore, right at the outset, our task is not to obtain a model that generalizes across distributions other than the OOD distributions, but to build a setup that a user can employ to train a model on a specific yet unknown OOD distribution with minimal solver invocations. We re-emphasize that at the time of original training on , we have access neither to samples from nor to the distribution itself. The above is the underlying premise. We now explain the use cases that motivate it. Note that we consider a retrieval setting in which the corpus remains fixed, which is quite realistic. In molecular retrieval, the corpus consists of known molecular compounds, collected and curated from large repositories such as PubChem, ChEMBL, and ZINC, repositories that are built up over many years. Different groups and organizations, or even different subgroups within the same organization, may search this same repository, but each with its own distinct query workload. A group X is interested in obtaining a custom model tailored solely to its own query workload, even if that model performs poorly on all other distributions. Accordingly, in line 14 of Algorithm 2, we build a fresh model, trained on a minimal set of actively collected labelled data, that is specific to the distribution at hand. For a different , we will have to train a different model.
[1] Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation. ICML 2020 [2] Fully Test-Time Adaptation by Entropy Minimization. ICLR 2021. More formally, we define the corpus as , which remains fixed throughout. We elaborate on our setup in two stages.
Pretraining: during the training of the GNN-based index, we use the training data .
Finetuning: An external user (e.g., the group X as described above) has access to . It also holds a sample from its OOD query distribution . The trainer at stage (1) has no access to . Moreover, this user is interested to train a model only on and to it, it is absolutely OK if this model shows poor accuracy on any other query distribution, but provides accurate predictions on .
Even if we have a “large enough” OOD query sample, we do not have relevance supervision on corpus items. We shall show below that obtaining relevance labels is not cheap and cannot avoid expensive solver calls. A key contribution of our work is an index built upon the representation learnt from pre-training data , which can be used to retrieve a few OOD instances for which it is maximally worthwhile to invest solver time. This reduces solver calls while maintaining learning pace over , resulting in rapid reduction of error of a held-out set from .
To elaborate more, suppose the pretrainer samples a corpus graph and samples a subgraph , this gives a positive instance with . The pretrainer now perturbs to with the aim of obtaining . (Obviously, this cannot be done by removing edges, only adding them. But even then, a solver check is generally needed, see our first round of rebuttal.)
Furthermore, it is entirely possible that for some other corpus graph for . If we ignore this danger of corrupted labels, and assume , as reviewer LMV5 presumably suggests, we get the following results (test MAP; bold is best).
| Dataset | ACROSS | Suggested method |
|---|---|---|
| PTC-FR | 0.244 | 0.10 |
| PTC-FM | 0.233 | 0.174 |
| PTC-MR | 0.245 | 0.130 |
| COX2 | 0.195 | 0.159 |
Clearly, ACROSS is the best performer across all datasets.
We appreciate your recognition of the motivation, technical merit and experimental thoroughness of our paper. During rebuttal, we trust we have responded to the questions and concerns you raised:
- Clarity: We have provided clarification that will go into the extra page on acceptance, plus appendices. Unlike ICLR, we have no way of showing you the draft system diagram, but it will go into the main paper in the camera ready.
- OOD/workload shift examples: We provided clear examples and scenarios where the corpus is shared, but the "pre"training query distribution is different from the distribution of interest to the downstream "fine-tuner".
- Theoretical insight: We discussed the relationship with and differences from NCE/InfoNCE style analysis. We will add further in-depth discussion to the manuscript during the camera ready period.
- Breakup of losses and gains in running time: We have given clear expressions for the total time in the form of an amortization analysis, which highlights the broad regimes in which our system should shine.
We believe the additional material, already in OpenReview, can be quickly integrated into the manuscript. In view of the imminent conclusion to the fruitful rebuttal session, we request you to consider revisiting your scores, if you so choose.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 4/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies how to train neural subgraph retrieval models when the query distribution changes and labeled data for the new queries is not available. In this paper, the authors propose ACROSS, a method that uses a limited labeling budget to find useful positive examples for each new query distribution. Instead of checking many random graph pairs with an expensive subgraph-matching solver, ACROSS tries to select corpus graphs that are likely to be positives, asks the solver to verify them, and then uses randomly sampled corpus graphs as mostly reliable negatives. The method also builds a reusable corpus index so that the corpus does not need to be re-indexed for every new query distribution. Experiments on molecular graph datasets show that ACROSS usually improves retrieval performance compared with several active selection baselines.
Strengths and weaknesses
Strengths: This paper studies an important problem. Neural subgraph retrieval models may not work well when the types of queries change. Getting new labels for every new query type can be expensive, because checking whether one graph contains another graph requires a costly subgraph-matching solver. The proposed method, ACROSS, tries to reduce this labeling cost by carefully choosing which corpus graphs should be checked by the solver.
In my opinion, the method in this paper is well motivated. Instead of using the solver on random graph pairs, ACROSS tries to find graph pairs that are likely to be positive examples. This is useful because random pairs are usually negative and are less informative for training. This paper also proposes a reusable corpus index, so the corpus does not need to be fully re-indexed for every new query distribution. This is a practical idea for large graph collections.
The experiments are also fairly complete, as the authors compare ACROSS with several baselines, including random selection, clustering methods, GNN-distance methods, WL kernel selection, Infomax, and Fourier-map variants. The ablation studies are helpful because they show which parts of the method matter, such as base model training, the augmented representation, and adversarial perturbation training. The appendix gives many implementation details, which help with understanding and reproducibility.
Weaknesses: For the weakness, the experiments in this paper are not as broad as the motivation. This paper discusses many possible applications, such as knowledge graphs, code graphs, and molecular search, but the experiments use only molecular graph datasets. The OOD query distributions are also created by splitting queries within the same datasets. This makes it hard to know whether the method will still work under stronger or more realistic distribution shifts.
Another concern is the connection between the theory and the experiments. The theory is motivated by extreme class imbalance, where positive examples are very rare. However, the positive rates reported in the paper are around 10-13%, which is not extremely rare. The authors should explain whether their theory is still a good match for this experimental setting or include experiments with much rarer positives.
Finally, ACROSS is a complex method. This paper would be stronger if it gives a clearer cost analysis, including runtime, memory use, index size, and comparison with simpler alternatives.
Questions
-
The experiments create OOD query groups by splitting queries from the same molecular datasets. Can the authors explain how strong this distribution shift is? It would help to know whether ACROSS also works for larger shifts, such as different graph domains or typed node/edge graphs.
-
How stable are the results across different random seeds? Since the method uses model training, random projections, LSH, and active selection, it would be helpful to report variation across multiple runs.
-
How expensive is ACROSS compared with simpler approaches? Please provide more information about runtime, memory use, index size, and whether the extra complexity is justified by the performance gains.
Limitations
Yes
Formatting concerns
For the formatting, the spacing between the main text and some tables/figures should be improved. In a few places, the tables or figures appear too close to surrounding text, which affects readability.
1 comment
Rebuttal
We thank the reviewer for their insightful suggestions. We address each of their comments and questions below.
The experiments create OOD query groups by splitting queries...Can the authors explain how strong this distribution shift is?
To test whether the OOD query clusters constitute a genuine distribution shift, we apply a kernel two-sample test in the base retriever model's embedding space. Given a query , we take its base GNN embedding , and compare the set of embeddings from the base distribution test set against those from each OOD cluster test set. This is done using the maximum mean discrepancy [1, 2]. The square of the MMD is given below. Note that the GNN is initialized randomly.
Here, and are the and embeddings, and is an RBF kernel. is zero when the two samples share a distribution and grows as they separate.
In addition, we assess the significance of the results with a permutation test. Under the null hypothesis, the two distributions are identical, so we pool the embeddings together and randomly re-partition them back into groups of and . We recompute on these two sets, and then repeat the computation times. This gives us the p-value.
| Dataset | Cluster | MMD² | -value (perm test) | |
|---|---|---|---|---|
| PTC-FR | 17 | 0.5421 | <0.001 | |
| 17 | 0.8376 | <0.001 | ||
| 16 | 1.4284 | <0.001 | ||
| 17 | 1.0907 | <0.001 | ||
| PTC-FM | 16 | 1.2488 | <0.001 | |
| 17 | 0.9748 | <0.001 | ||
| 17 | 0.3655 | <0.001 | ||
| 17 | 1.0504 | <0.001 | ||
| PTC-MR | 17 | 1.0519 | <0.001 | |
| 17 | 0.9993 | <0.001 | ||
| 17 | 0.3434 | <0.001 | ||
| 16 | 1.2301 | <0.001 | ||
| COX2 | 17 | 0.8150 | <0.001 | |
| 17 | 0.6464 | <0.001 | ||
| 16 | 1.1620 | <0.001 | ||
| 17 | 1.2202 | <0.001 |
We observe that – differ significantly from in all cluster–dataset pairs (), confirming that the OOD splits induce a genuine query-distribution shift.
It would help to know whether ACROSS also works for larger shifts...
While out-of-domain shifts are not in the scope of our paper, we experiment with cross-dataset shifts on two source datasets below. We report the absolute deviation of ACROSS test MAP from the in-dataset values at budget , across all four clusters. The source dataset is named in the header and the target datasets are each named in the columns.
In this cross-dataset setup, during the active selection stage, queries are provided from the target dataset. This tests the index's robustness to foreign queries.
PTC-FR
| Q (in-dist) | PTC-FM | PTC-MR | COX2 |
|---|---|---|---|
| Q1 (0.252) | 0.035 | 0.030 | 0.026 |
| Q2 (0.161) | 0.005 | 0.003 | 0.009 |
| Q3 (0.281) | 0.021 | 0.026 | 0.051 |
| Q4 (0.282) | 0.000 | 0.002 | 0.030 |
| Avg (0.244) | 0.015 | 0.015 | 0.029 |
PTC-FM
| Q (in-dist) | PTC-FR | PTC-MR | COX2 |
|---|---|---|---|
| Q1 (0.262) | 0.011 | 0.039 | 0.007 |
| Q2 (0.241) | 0.015 | 0.030 | 0.005 |
| Q3 (0.179) | 0.006 | 0.013 | 0.011 |
| Q4 (0.250) | 0.015 | 0.021 | 0.009 |
| Avg (0.233) | 0.012 | 0.026 | 0.008 |
The maximum deviation is 0.051. Thus the performance of the downstream retrievers when the ACROSS index is presented with out of dataset queries remains relatively stable.
How stable are the results across different random seeds? ...model training, random projections, LSH, and active selection...
We vary the model training seed and obtain test MAP at budget across all four clusters. Each cell shows mean std across 3 random seeds. Each table consists of the results for a given method - ACROSS, random and Infomax.
ACROSS
| Dataset | ||||
|---|---|---|---|---|
| PTC-FR | 0.249 ± 0.003 | 0.161 ± 0.001 | 0.256 ± 0.026 | 0.278 ± 0.011 |
| PTC-FM | 0.233 ± 0.027 | 0.235 ± 0.006 | 0.180 ± 0.005 | 0.268 ± 0.015 |
| PTC-MR | 0.200 ± 0.005 | 0.263 ± 0.008 | 0.237 ± 0.005 | 0.282 ± 0.026 |
| COX2 | 0.191 ± 0.003 | 0.229 ± 0.003 | 0.183 ± 0.017 | 0.174 ± 0.003 |
Random
| Dataset | ||||
|---|---|---|---|---|
| PTC-FR | 0.190 ± 0.014 | 0.138 ± 0.016 | 0.260 ± 0.004 | 0.225 ± 0.012 |
| PTC-FM | 0.192 ± 0.030 | 0.209 ± 0.030 | 0.118 ± 0.007 | 0.214 ± 0.017 |
| PTC-MR | 0.192 ± 0.004 | 0.211 ± 0.004 | 0.183 ± 0.004 | 0.238 ± 0.005 |
| COX2 | 0.167 ± 0.013 | 0.181 ± 0.013 | 0.321 ± 0.029 | 0.169 ± 0.017 |
Infomax
| Dataset | ||||
|---|---|---|---|---|
| PTC-FR | 0.201 ± 0.003 | 0.143 ± 0.003 | 0.288 ± 0.022 | 0.251 ± 0.004 |
| PTC-FM | 0.250 ± 0.015 | 0.224 ± 0.009 | 0.154 ± 0.011 | 0.210 ± 0.004 |
| PTC-MR | 0.187 ± 0.004 | 0.201 ± 0.010 | 0.206 ± 0.007 | 0.262 ± 0.001 |
| COX2 | 0.164 ± 0.008 | 0.207 ± 0.003 | 0.181 ± 0.011 | 0.187 ± 0.005 |
ACROSS wins on 12 cells out of 16, whereas Infomax wins on three and random on one.
We would like to clarify that the randomness in our LSH index is not left to a single arbitrary draw. It is explicitly controlled through a validation-based selection procedure (see Appendix F3, F5). We run a sweep over multiple seeded independent random Gaussian hyperplane configurations. We measure set recall and the retrieval cost on the held-out validation set, and we select the configuration that maximizes retrieval efficiency within the operating window .
This paper would be stronger if it gives a clearer cost analysis, including runtime, memory use, index size, and comparison with simpler alternatives.
On index size: The LSH index that ACROSS builds is lightweight and CPU-resident. For a 100K sized corpus, it occupies ~3.5MB on the PTC datasets. It is built once using the base workload and reused across all OOD query distributions at zero re-indexing cost.
On memory use: The base NSR model consists of 1750 parameters and consumes 7KB of GPU memory. The neural transformation consists of 6346 parameters, taking about 25KB of GPU memory.
All baselines share the base NSR model, but none of them have any learned models of their own. However, Infomax is the most memory consuming method out of the baselines: it materializes an dense similarity matrix in CPU memory before sparsifying to the top-5 entries per row. For , this yields a ~40GB cost.
On runtime costs: We separate runtime costs into one-time and marginal per-distribution. The base retriever (trained 30 epochs) and the learned model (trained 200 epochs) together take ~23 hours on a single 45 GB GPU, and count as one-time. Subsequently, LSH index calibration adds on ~7 minutes, of which construction time is under a second (marginal, per-distribution). This investment is amortized over every subsequent OOD cluster. Once built, each new distribution costs ACROSS only ~2.4 minutes (B=40 solver calls), against ~3-4 hours for labeling the entire corpus per query.
Thus, by these measurements, ACROSS's investment is justified when the number of downstream OOD partitions is 5 or greater, which is the expected regime in the vertical-adaptation settings we target.
The theory is motivated by extreme class imbalance...which is not extremely rare.
While the motivation pertains to extreme class imbalance, we show that the theory holds even under our current operating conditions. Theorem 1 only requires that , which follows from the conditions imposed: and , combined give us .
Let and . For these values, we obtain . Our experiments set to the upper bound to maintain , and so the theory holds. Finally, the mismatch budget condition is given by . At , this gives the LHS of the inequality to be roughly and the RHS to be roughly . Thus the constraint region is non-empty.
While is fixed at the dataset level, we experiment by varying the positive-negative ratio of the downstream partitions - as a secondary test of robustness. Concretely, we experiment with ratio values and , on two datasets across all four downstream partitions. We compare ACROSS to the random and Infomax baselines, and report mean std values for MAP across the four partitions.
bold = best method per ratio block | italic = second | 0.13★ = standard setting
PTC-FR
| Method | ⍴ = 0.0325 | ⍴ = 0.065 | ⍴ = 0.13★ | ⍴ = 0.26 |
|---|---|---|---|---|
| ACROSS | 0.235 ± 0.064 | 0.230 ± 0.054 | 0.244 ± 0.057 | 0.229 ± 0.049 |
| Random | 0.174 ± 0.038 | 0.185 ± 0.055 | 0.207 ± 0.042 | 0.212 ± 0.043 |
| Infomax | 0.223 ± 0.050 | 0.223 ± 0.069 | 0.226 ± 0.067 | 0.214 ± 0.056 |
PTC-FM
| Method | ⍴ = 0.0325 | ⍴ = 0.065 | ⍴ = 0.13★ | ⍴ = 0.26 |
|---|---|---|---|---|
| ACROSS | 0.229 ± 0.034 | 0.233 ± 0.038 | 0.233 ± 0.037 | 0.229 ± 0.037 |
| Random | 0.167 ± 0.046 | 0.188 ± 0.044 | 0.188 ± 0.055 | 0.195 ± 0.045 |
| Infomax | 0.226 ± 0.048 | 0.212 ± 0.035 | 0.213 ± 0.034 | 0.199 ± 0.049 |
We observe that ACROSS outperforms the selected baselines across all chosen ratios.
References
[1] A. Gretton et al., A Kernel Two-Sample Test, JMLR 2012;
[2] S. Rabanser et al., Failing Loudly: An Empirical Study of Methods for Detecting Dataset Shift, NeurIPS 2019
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
About "unrealistic" or "poorly motivated" problem setup
We expand on some realistic use-cases for our setup below.
Molecular database search as a service
A substructure-search provider trains its base retriever on generic scaffolds from public databases such as ChEMBL and PubChem. Because chemical space is commonly partitioned by scaffold identity [1], evaluation on held-out scaffolds is standard: random splits overestimate real-world generalization [2], motivating dedicated scaffold-hopping distribution-shift benchmarks [3]. Thus, Qbase denotes the generic scaffold distribution.
A pharma partner’s queries instead come from proprietary compound series shaped by its synthesis and ADMET constraints. Although derived from the same broad chemical space, they occupy a narrow region on which the base retriever was not trained to specialize, making the query stream OOD relative to Qbase. The public corpus is fixed and fully available, but proprietary queries cannot be anticipated and are observed only at deployment. Moreover, obtaining ground truth requires a per-candidate VF call [4], whose cost our active-selection procedure is designed to amortize.
Cross-team enterprise code search
Multiple teams maintain private forks or extensions of a shared internal codebase, with control-flow and dependency structures that cannot be merged or exposed for IP or security reasons. Such siloed code has motivated recent federated and decentralized training approaches [5,6,7]. Each team trains and retrieves only on its own fork, whose evolving idioms and design patterns shift its query distribution relative to any shared base model. Because these distributions and forks are inaccessible across teams, pooled retriever training is impossible; each team must adapt locally. As in (1), the shared corpus is fixed and locally available, queries are observed only through team-specific traffic, and VF-verified labels remain the costly step targeted by our method.
[1] The properties of known drugs. 1. Molecular frameworks. J. Med. Chem., 1996.
[2] MoleculeNet: a benchmark for molecular machine learning. Chem. Sci., 2018.
[3] WelQrate: Defining the Gold Standard in Small Molecule Drug Discovery Benchmarking. arXiv:2411.09820.
[4] Introducing VF3: A New Algorithm for Subgraph Isomorphism. In Graph-Based Representations in Pattern Recognition (GbRPR 2017).
[5] Code Summarization without Direct Access to Code — Towards Exploring Federated LLMs for Software Engineering. EASE '24.
[6] I Can't Share Code, but I need Translation — An Empirical Study on Code Translation through Federated LLM. arXiv:2501.05724.
[7] When Fine-Tuning LLMs Meets Data Privacy: An Empirical Study of Federated Learning in LLM-Based Program Repair. arXiv:2412.01072.
About "ease" of generating labeled instances
Consider Gc as the triangle K3 on nodes {a,b,c}, with E(Gc)={(a,b),(b,c),(a,c)}. Now let Gq be a 3-node path on {u,v,w}, with E(Gq)={(u,v),(v,w)}. Under the map ϕ:u↦,v↦b,w↦c, it is clear that y(Gq,Gc)=1. In an attempt to form a hard negative instance, one might add the edge (u,w) to Gq, forming a triangle Gq′ with edges E(Gq′)={(u,v),(v,w),(u,w)}. However, it is clear that y(Gq′,Gc)=1=−1. Less trivial examples are easily constructed, that need a change in ϕ, but preserve y(Gq,Gc)=y(Gq′,Gc)=1. In general, the only way to ensure that a search for hard negatives succeed is to calculate y(Gq′,Gc) using a solver (which can be expensive).
To quantify the expense of the solver, we utilize the standard VF2 program from the
networkxpackage. We measure the per-pair cost across all four datasets, by calling thesubgraph_is_isomorphicfunction on query-corpus pairs taken from the train split (300 queries total, 100K corpus items). Additionally, we test the idea that simple edge perturbations provide a cheap, foolproof way to obtain negatives. For each dataset, we sample 200 verified positive query-corpus pairs, insert an edge between a randomly chosen non-adjacent pair of query nodes per pair and re-run the solver. We average over five random seeds.It is clear that executing the solver on all possible training pairs is prohibitively expensive. Note that these timing experiments were conducted on a standalone machine without multi-user contention, and the times should be interpreted as a lower bound. Further, the mean mislabel rate is non-trivial for all datasets, indicating that obtaining negatives by edge perturbation is not foolproof, and requires expensive re-verification.
About multiple aspects of graph distributions
A graph has myriad properties, of which only a few prominent ones (e.g. number of nodes, edges, degrees, diameter, eigenvalues, number and size of complete subgraphs, etc.) have been formally characterized. When we sample graphs from some unknown distribution, we sample the joint space of all these properties, usually without any estimate of most of them.
As an interesting ancient modeling tale, many social networks are known to degree distributions that follow a power law. An early graph sampler that satisfies power law degrees is preferential attachment (PA) [8]. However, PA-generated graphs do not have anywhere near the number of small complete bipartite subgraphs as seen in natural social networks. A different graph sampler, called the copying model, satisfies both power law degrees and emergence of complete bipartite subgraphs [9]. Yet other samplers like R-MAT [10] produce self-similar graphs, another property evinced "in the wild", but distort degree distributions away from strict power law.
[8] "Statistical mechanics of complex networks". Reviews of Modern Physics, 2002.
[9] “Stochastic models for the Web graph.” Proceedings 41st Annual Symposium on Foundations of Computer Science, 2000.
[10] "A Mathematical Analysis of the R-MAT Random Graph Generator". Networks, 2011.
As a toy example, suppose we want to sample graphs with N=60 nodes and all node degrees equal to d=4. Here are two samplers:
networkx.random_regular_graph).networkx.watts_strogatz_graph(n, d, p=0)). (This is a degenerate deterministic "sampler", but the argument can be extended.)Here are some properties of the graphs sampled from these two samplers.
As we can see, building graph samplers from a limited number of observed instances and an arbitrary set of graph features (without clairvoyant knowledge of their full generative process) is a very difficult task ― we may never know which property we have failed to enforce on the generative distribution we have fitted. In fact, random erasure or insertion of edges may themselves distort the "natural" query graph distribution.
About domain generalization in subgraph isomorphism search
Given the above discussion, "domain generalization" must be holistically judged across both sections 4.6 (query distribution given a fixed ∣Vq∣) and 4.7 (distribution of ∣Vq∣). In 4.7, [GREED] notes:
Section 4.6 uses Random Walks (RW), Random Walks with Restarts (RWR), and SHADOW [11]. These are closely related sampling schemes based on local message passing, which is related to both GNNs and random walks [12,13,14,15].
[11] Deep Graph Neural Networks with Shallow Subgraph Samplers, arXiv 2012.01380v2
[12] The Graph Neural Network Model, IEEE TNN, 2009.
[13] How Powerful are Graph Neural Networks?, ICLR 2019.
[14] Bookmark-Coloring Algorithm for Personalized PageRank Computing, Internet Mathematics, 2006.
[15] Predict then Propagate: Graph Neural Networks meet Personalized PageRank, ICLR 2019.
Therefore, the samplers used are not all that diverse.
Regarding "symmetric indexes"
We do not claim that the only indexes that exist are symmetric ones. We claim that standard indexing and retrieval systems support symmetric relevance scores (dot product, cosine sim, L2) out of the box. Moreover, we experiment by ablating against FourierHashNet, which internally builds an index on asymmetric relevance score.