WorksComputer Science
Defending FCG-Based Malware Detectors Against Metamorphic Android Variants via LLM-Powered Code Refactoring
Abstract
LLM-generated malwares pose a mounting threat to automated detection systems, as rewritten malicious code shifts beyond what classifiers learned from static corpora. While graph-based Android malware classifiers operating on function call graphs, especially when enriched with LLM features, have established strong detection accuracy; they remain brittle against this emerging attack surface, dropping up to over 60% in accuracy. Standard graph augmentation strategies fail to address this gap: they are context-agnostic, producing graphs that are incoherent as programs and bear no resemblance to these LLM-rewrite attacks. To counter this threat, we propose leveraging LLMs to synthesize code augmentations for diverse, realistic training variants. We introduce FCGA, a framework operating at two complementary levels: rewriting individual functions into equivalent yet distinct implementations, and jointly refactoring clusters of functions via summarization-guided prompting, concentrating on the most important graph components. Across a controlled real-world OOD benchmark and a supporting direct LLM-rewrite stress test, FCGA enhances robustness by up to 10% over augmentation baselines. Our analysis further reveals a fidelity-diversity tradeoff that determines which augmentation strategies are most effective during pretraining and adaptation. The source code is available at https://github.com/ngoctnq/fcga.
Introduction
Android malware is a persistent and escalating security threat, with millions of malicious applications discovered each year [17]. The problem has been exacerbated by the rapid advancement of large language models (LLM): attackers can now prompt LLMs to rewrite malicious code into functionally equivalent yet structurally distinct implementations at scale, generating diverse evasive variants that are difficult for automated detectors to catch [2, 15]. In response, significant research effort has gone into building robust malware detectors, with graph classifiers operating on Function Call Graphs (FCGs) have emerged as the leading approach [8, 21] as they faithfully models how malwares operate while remaining tractable even with large real-world applications [25].
Recent work has further shown that enriching FCG nodes with LLM-generated code embeddings, which inject semantic information into this structural-only representation, improves both detection accuracy and generalization to unseen malwares [36]. Yet even with these advances, we discover that classifiers still struggle against LLM-rewritten variants not represented during training, suffering significant performance degradation of over 60% in some cases.
A central practical challenge is limited labeled coverage of emerging malware variants, i.e., a major cause of brittleness is distributional, stemming from a lack of both data and diversity [11]. Classifiers rely on fixed, manually annotated corpora that cannot capture rapidly evolving implementations. When an attacker uses an LLM to rewrite a malware sample, the resulting representation can shift sufficiently far from the training distribution to evade detection, even though the underlying malicious behavior is preserved. We therefore first consider standard, problem-agnostic graph augmentations to address data scarcity; however, their semantic-agnostic operations do not reflect the implementation changes produced by LLM-based attackers. These augmented graphs occupy a distribution entirely different from LLM-rewritten malwares, which are semantically-shifted from the training distribution, and fail to prepare for this threat practitioners face.
To address this problem, we seek to investigate the extent of our ability to defend against LLM-generated malware by proactively utilizing the same tool that attackers use for a principled response to this attack surface. Our core thesis is that the same LLM-driven refactoring capability used to create evasive variants can be repurposed to strengthen the defender’s training distribution. Concretely, we explore generating LLM variants as training augmentations, resolving data scarcity at its source by directly expanding the training corpus to cover LLM-rewritten distributions. Given the effectiveness of LLM-augmented FCG classification, we further leverage the power of LLMs to generate new meaningful labeled examples without the need for human annotation. Figure 1 illustrates the problem, and how our proposed framework resolves it.
Figure 1. Illustration of the problem. FCGA leverages LLMs to generate semantically-grounded augmentations closer to the distribution of LLM-based variants, enhancing resilience against this threat.
Our contributions are as follows:
We introduce a proactive defense paradigm that repurposes LLM-driven code refactoring to prepare malware classifiers for emerging and previously unseen variants.
We propose FCGA, a code-refactoring-guided training augmentation framework operating at both the function and FCG-subgraph levels to generate semantically and structurally diverse training variants.
We develop structural and model-aware selection strategies that concentrate augmentation on graph components most influential to program structure or the target classifier.
Across four GNN architectures and multiple OOD settings, the best FCGA variants improve robustness over unaugmented and generic graph-augmentation baselines, including an 10% gain on unseen LLM-rewrite attack. Our analysis further identifies a fidelity-diversity tradeoff: broader structural variation is particularly useful for robust pretraining, while targeted, model-aware augmentation becomes more valuable during adaptation.
Preliminaries and Related Works
Graph Representation for Code Analysis
Graphs are a natural representation for code: programs are inherently structured by syntactic nesting, control flow, and inter-procedural dependencies, all of which can be directly encoded as nodes and edges [3]. Traditional program analysis tasks extract code graphs at the function level [4] (Zhou et al. 2019) for intra-procedural reasoning, and then unifying these local structures with call edges for a holistic view of the entire program (Yamaguchi et al., 2014). While expressive, they do not scale to real-world applications, where a single program can produce graphs with millions of nodes that are intractable for GNN inference. FCGs have emerged as the standard graph representation for binary analysis at scale [8] by taking a coarser inter-procedural view, where each node represents one function, and each directed edge indicates an invocation from the caller to the callee. As a tradeoff, they omit details about individual functions: each node is reduced to an opaque identifier with no signal about its underlying functionality; motivating the need for richer node embeddings to offset this loss of information [36].
Graph Data Augmentation
Data augmentation for graphs aims to diversify the training distribution by generating synthetic graph variants, improving generalization without additional labeled data (Zhao et al., 2022). Existing methods broadly fall into two categories: structural augmentations, which perturb the graph topology by randomly dropping nodes (You et al., 2020), edges [32], or sampling connected subgraphs as views (You et al., 2020); and feature augmentations, which instead perturb node or edge attributes, for example by randomly masking feature dimensions or injecting noise into embedding vectors (You et al., 2020).
For code graphs, however, these approaches fall short. Random augmentations operate without any understanding of what nodes and edges represent, and thus would produce graphs that are structurally implausible and semantically incoherent as programs. This limits the diversity and realism of the augmented training set, motivating our augmentation strategy that leverages functional semantics via LLM code comprehension.
LLMs for Code Rewrites
At a high level, LLMs can be prompted to produce semantically-equivalent reimplementations from natural-language instructions. In the security literature, LLM-driven code rewriting has been explored primarily as an attack surface. Madani [23] demonstrated that LLMs can serve as embedded mutation engines for evasive metamorphic malware. Akil et al. [2] showed that function-level LLM rewrites can achieve up to 91% attack success rate against an ML-based malware detector. In software engineering, LLM rewrites are used to improve models rather than to evade them. Ouchebara and Dupont [30] leveraged LLMs to augment vulnerable code datasets, through both generation and refactoring, to train more robust vulnerability detectors. Wang et al. (2023) evaluated the robustness of code generation models against a taxonomy of semantics-preserving transformations. This dual-use is central to our approach: the same generative capability that attackers exploit to produce evasive variants can be harnessed by defenders to proactively synthesize diverse training data.
Problem Formulation
We formulate the problem of robust Android malware classification as a graph-level classification task. Each Android application is represented as a directed graph , where are the extracted features of the functions in said application, and is the adjacency matrix of the FCG encoding caller-callee relationships, being the set of function nodes, and is the dimension of the source code embeddings. The task is graph classification: given a labeled training set , train a GNN classifier to predict the true malware family label for a graph , robust to the attacker’s evasion attempt towards an incorrect prediction .
Methodology
In this section, we describe the desired properties for a solution to the problem (§ 4.1), and how our design choices address them across the two granularities that FCGA operates on: function-level (§ 4.2.1), and subgraph-level (§ 4.2.2).
Motivation
We identify three axes along which a desired augmentation approach must operate:
Implementation variation. Varying how a function is implemented prevents from overfitting to specific coding conventions that may not generalize across implementations of the same behavior. While standard perturbation-based augmentations can introduce noise to , they lack semantic grounding and thus may not produce meaningful variation in the sample space: because there is no well-defined inverse mapping from a perturbed embedding back to source code, the shifted node features may not correspond to any plausible alternative implementation. In contrast, LLM-driven rewriting is explicitly prompted to preserve functionality while producing structurally-distinct, semantically-informed training variants, resulting in samples that are both realistic and diverse.
Structural diversity. By changing the program’s call structure and module boundaries, we can proactively improve the robustness of our model to refactoring-based evasion, where an attacker restructures the program’s functional decomposition without changing its high-level behavior ((Choliy et al., 2017; Yong Wong et al., 2024)). Augmentation along this axis requires modifying directly, producing variants whose FCG topology differs from the original. Existing structural augmentations can introduce such variation, but besides sharing the same improbable generation weakness as feature perturbation methods, they could remove informative components of the original graph that are crucial for the model’s performance.
Model awareness. Traditionally, these important nodes are identified by analyzing the graph structure alone, e.g. by selecting high-degree nodes or central hubs. However, the GNN may rely on a different subset of nodes that are not necessarily the most structurally prominent: a low-degree function that implements a critical piece of logic may be more influential to the model’s prediction than a high-degree utility function. By leveraging the trained ’s own signals to identify which nodes it relies on, we can ensure that augmentation efforts are focused on the components that matter most to the model’s decision boundary.
Function Call Graph Augmentation
Following these insights, we propose our augmentation strategy with two different variations. Each is composed of two stages: first, selecting important graph components to be augmented: given the scale of real-world FCGs, which can contain thousands of nodes ([8]), augmenting every complete graph is computationally intractable and unnecessary. Afterwards, the selected components are modified to produce a new augmented training sample, which is used as additional data during model training. Figure 2 illustrates the overall pipeline of our method, and Table 1 summarizes how our variations compare against augmentation baselines with respect to the three identified axes.
Figure 2. Diagram of our augmentation pipeline. For each training sample, FCGA first selects important graph components to be augmented based on the original sample and the target model architecture. These components are then modified to produce a new augmented training sample, which is used as additional data during model training.
| Method | Structure | Semantics | Model-aware |
| Baseline | - | - | - |
| NodeDrop | ✓ | - | - |
| EdgeDrop | ✓ | - | - |
| Node+Edge | ✓ | - | - |
| Function | - | ✓ | - |
| ... + Model | - | ✓ | ✓ |
| Perturb | - | ~ | - |
| ... + Model | - | ~ | ✓ |
| ... + All | - | ~ | - |
| Subgraph | ✓ | ✓ | - |
| ... + Model | ✓ | ✓ | ✓ |
Table 1. Summary of augmentation methods, including baselines defined in § 2.2 and our FCGA variants, with their utilized information.
Function-Level Code Rewriting
Function-level FCGA (FCGA-F) augments the FCG at the node level: for each selected function, the LLM rewrites its decompiled source code under explicit semantic-preservation instructions, producing an alternative implementation whose embedding replaces the original node feature. The graph topology remains unchanged; only feature representations of selected nodes are modified. The overall FCGA-F pipeline is illustrated in Figure 2a.
Node selection. Our node selection criteria are divided into two families: static topological measures that are derived from the input graph structure, and model-dependent measures that leverage the trained GNN’s own signals. Each option has its own advantages: the former can be efficiently pre-computed offline without any reference model, while the latter directly identifies nodes that are influential to the model’s decision boundary. Additional criteria details are in Appendix § 10.§ 4.
1) Structure-based. Static centrality measures can be used to capture structural prominence in the FCG without requiring a trained model, where each of them measures a different sense of node importance to the overall network positioning. These high-centrality nodes greatly contribute to the critical information flows during message passing, and thus are prime candidates for augmentation.
2) Model-based. While these degree-based measures can detect nodes that are critical to the general information flow through the graph, they need not coincide with the actual propagation determined by the GNN’s weights. Instead of statically relying on the input graph structure, we can leverage the model to identify nodes that are most influential to its predictions, making them more directly relevant to augmenting the model’s decision boundary. We thus borrow prominent methods from the explainable graph learning literature ([38] (Ying et al. 2019)) to accomplish this task.
Augmentation. From the selected nodes, we can start generating augmented samples by modifying their code and thus their embeddings, while keeping the rest of the graph intact. We discuss our specific FCGA-F prompting strategy, and then introduce a cheaper approximating alternative.
Function-rewrite. The prompting strategy balances preservation with transformation. We impose two invariants: (1) the function signature must remain intact, ensuring that the FCG’s caller-callee edges are unaffected; and (2) the function must exhibit the same observable behavior, i.e. identical outputs and side effects for all inputs. Within these constraints, the LLM is encouraged to apply maximum syntactic transformation: restructuring control flow, renaming variables, reorganizing computations, and substituting equivalent Java API calls. This produces rewrites that occupy a diverse region of the embedding space while preserving the function’s semantic identity. These constraints guide generation rather than provide formal equivalence guarantees; the rewritten code is used only to produce alternative node representations for training.
Embedding perturbation. From the insight that similar code yields similar embeddings, we can also cheaply generate augmented samples by directly perturbing node features in the embedding space. Perturbation-based FCGA (FCGA-P) augments node features by adding a Gaussian noise vector to the original embedding of each selected node, scaled analytically so that the perturbed vector lies at a prescribed cosine similarity from the original. This makes FCGA-P substantially cheaper to apply as it requires no LLM calls for rewrite nor re-embedding, and can be computed in closed-form on-the-fly during training. We can further leverage FCGA-P to augment the full training set, generating a completely new set of augmented samples at every training iteration for a more powerful pre-training effect, reserving the more costly FCGA-F for fine-tuning when the model is more sensitive to semantically meaningful variation.
Subgraph-Level Code Refactoring
In contrast to FCGA-F/P, FCGA-S jointly refactors a cluster of functions, reshaping the FCG topology itself via splitting, merging, or reorganizing functions within the subgraph, while being prompted to preserve the intended high-level behavior and malware-family identity of the represented subprogram. By not strictly replicating the code graph, this approach covers a broader space of program organizations than its function-level counterparts. The FCGA-S pipeline is illustrated in Figure 2b.
Node selection. A downside of function-level selection is that they can only measure individual graph components in isolation, and thus fail to capture the joint influence of multiple nodes that may be individually unimportant but collectively important. Moreover, tightly connected clusters are preferred candidates because they tend to represent self-contained, cohesive functionality; making them more amenable to successful LLM refactoring. We thus utilize subgraph selection to form a localized neighborhood for joint refactoring.
Structure-based. We can adapt any structure-based graph component importance measures by using Monte Carlo Tree Search (MCTS). From an empty set, we gradually build the subgraph by adding adjacent nodes, enforcing connectivity of the selected candidates. The candidate subgraph reward value can be computed by collapsing itself into a single node, then re-computing the resulting new graph’s node centrality metrics.
Model-based. Instead of previous explainable AI methods identifying nodes independently, we opt for SubgraphX (Yuan et al., 2021), which finds important subgraphs utilizing MCTS with Shapley values (Lundberg and Lee, [22]) as the reward signal, which attribute the model’s output to each subgraph by computing its weighted average marginal contribution across all possible subsets.
Augmentation. FCGA-S operates in three stages. First, for each node in the selected subgraph and upto one-hop away, the LLM generates a concise summary of its behavior. These summaries shift the LLM’s reasoning from how a function is written to what it does, enabling more principled structural decisions, while compressing the input to fit within the LLM’s context window. Second, the subgraph is presented to the LLM by its node signatures, summaries, edges, and one-hop context; and the LLM is given full creative freedom to split, merge, rename, or reorganize the selected nodes while keeping boundary context nodes intact, ensuring the resulting subgraph is mendable back into the original FCG without disrupting the wider program logic. Finally, the augmented data sample is reconstructed by replacing the original subgraph with the refactored subgraph, which summary embeddings as node features. Given the embedder’s capability to capture semantic similarity of source codes and their descriptions as it was demonstrated in code retrieval tasks (Zhang et al., 2025), the new summaries’ embedding distribution is expected to be close to the intended implementation, while the structural changes introduce additional diversity that is orthogonal to function-level rewriting.
Experiments
In this section, we evaluate the effectiveness of different augmentation strategies on real-world Android malware datasets. We describe the experimental setup, including datasets, evaluation protocols, and baselines, then present our results.
Experimental Setup
For a comprehensive description, please refer to Appendix § 10 for the designs and implementation, and Appendix § 11 for hyperparameter selection.
Datasets
We evaluate on MNTF (Tran et al., [36]), an OOD benchmark for Android malwares, specifically its Tiny reference split, and Common split modeling for covariate shift. Each application is represented as an FCG whose nodes carry 1024-dimensional code embeddings produced by Qwen3-Embedding-0.6B (Team, [35]) from decompiled Java source, and labeled by its malware family. We consider two evaluation protocols: Test performance is measured on the Tiny test split to measure generalization to unseen data of the same distribution, while OOD generalization is measured on the Common split, evaluating the model’s ability to new variants.
Architectures & Baselines
We evaluate across multiple GNN architectures to ensure findings generalize beyond a single backbone: GCN (Kipf and Welling, [18]), GIN (Xu et al., 2019), GAT (Veličković et al., [37]), and GraphSAGE (Hamilton et al., [13]).
We compare FCGA against the following augmentation strategies, spanning structure-only and semantic-driven approaches. Baseline denotes the unaugmented performance without any augmentation. NodeDrop (You et al., 2020) and EdgeDrop (Rong et al., [32]) randomly remove nodes and edges, respectively; and Node+Edge applies both simultaneously.
Results & Evaluation
We consider two scenarios: off-the-shelf pre-training, where the resulting model is directly used for evaluation; and downstream fine-tuning, where the existing checkpoint is then fitted to a limited set of new labeled data. Additional settings are studied in Appendix § 11 and Appendix § 12 in the interest of space.
Augmented Pre-Training
Table 2 shows the results of augmented pre-training across different augmentation strategies and GNN architectures. We observe that FCGA variants consistently outperform all baselines across architectures and evaluations, demonstrating the effectiveness of our context-aware augmentation strategy in both in-domain and OOD generalization.
For in-domain test performance, accuracies saturated across all models. Regardless, FCGA-P still achieves the highest test accuracy across all architectures, showing that even in this setting with little possible gain, our method can still provide up to 1.7% accuracy increase over the unaugmented baseline. This supports our claim that FCGA-P can be used as a cheap general-purpose augmentation strategy, having its semantic-aware edge over traditional context-agnostic approaches.
In the OOD setting where models struggle to generalize, we find that model-aware augmentation does not provide significant benefits for FCGA-F, but much more effective for FCGA-P/S. This implies that a stronger augmentation strategy is required when targeting the malware-carrying nodes: we discuss this tradeoff in more detail in § 6. Meanwhile, model-aware variants strictly yield the best OOD performance across all architectures, even higher than FCGA-P + All, highlighting the power of altering higher-level program logic over structure-preserving function-level rewrites.
Data-Limited Fine-Tuning
We study the real-world scenario of adapting to new malware samples, which are scarce and costly to label, by finetuning a pretrained GIN model on increasingly small subsets of the labeled OOD training data. We run this experiment over 3 seeds, as fewer data and training epochs can lead to higher variance, and plotting them in Figure 3.

Figure 3. OOD accuracy difference versus unaugmented baseline after finetuning on a pretrained GIN model, ablated across different augmentation strategies. Higher is better.
Pre-Training Robustness. We pretrained the model with different augmentation strategies, then run standard finetuning on the resulting checkpoints: in this setting, augmentations help the model learn a more robust representation space that can better adapt to the downstream distribution shifts upon encountering just a few new samples. The results in Figure 3a show that node dropping improves over the unaugmented baseline, confirming its capacity to generate diverse data for pretraining, though this advantage does not carry into finetuning, as the next section shows. Conversely, edge dropping instead falls below the baseline, and is useful only when a checkpoint is consumed immediately after augmented model fitting. Notably, structure-only FCGA-S markedly outperforms all others especially in the low-data regime, underscoring the value of structural diversity for pretraining.
Post-Training Generalization. We perform standard pre-training without augmentation, but apply different augmentation strategies during finetuning: in this setting, augmentations serve as a partial substitute for human annotation, enriching the limited new malware samples with diverse variants. The results in Figure 3b reveal the opposite ordering for context-agnostic approaches: node-drop-based methods now falls far below the baseline, by up to 12%, and is clipped from the plot for legibility; edge dropping takes its place as the weakest strategy that still improves on the baseline. FCGA variants cluster much more tightly in this setting, but the model-aware variants remain consistently the strongest across every data fraction.
Robustness Under LLM-Rewrite Attack
For a better assessment of robustness against LLM-rewrite attacks, we additionally craft a direct attack using a different LLM to simulate a real-world scenario. Reproducing LLMalMorph ([2]), we rewrote the training and test sets of the MNTF dataset with Phi-4-Mini-3.8B ([26]), augmenting the first 100 samples from the training set and 100 from the test set across all nodes; where the augmented training set represents the attack conducted on known malicious code, and the augmented test set represents which that has not been seen in the wild. The results, reported in Table 3, show high correlation between OOD evaluation and the LLM attack, supporting Common as a useful proxy for this threat. Across all settings, FCGA-S + Model consistently yields the best or near-best performance, with all other FCGA variants outperforming the blind-drop baselines. One final interesting data point: NodeDrop performs notably well under the LLM attack on seen data, as the model learning to be robust to sudden node changes can be helpful in a node-only attack. Note that this experiment only serves as a held out cross-model LLM rewrite stress test motivated by a realistic attack setting; and we do not claim overall generalization to an arbitrary LLM-rewrite attack.
| Method | OOD | LLM (seen) | LLM (unseen) |
| Baseline | 57.7% | 48.0% | 34.0% |
| NodeDrop | 58.5% | 63.0% | 39.0% |
| EdgeDrop | 59.9% | 53.0% | 38.0% |
| Node+Edge | 58.7% | 58.0% | 36.0% |
| Function | 62.0% | 67.0% | 43.0% |
| ... + Model | 61.3% | 67.0% | 42.0% |
| Perturb | 61.4% | 70.0% | 41.0% |
| ... + Model | 60.3% | 63.0% | 41.0% |
| ... + All | 61.9% | 72.0% | 43.0% |
| Subgraph | 60.9% | 66.0% | 39.0% |
| ... + Model | 64.4% | 70.0% | 44.0% |
Table 3. Accuracy under out-of-distribution malwares of pretrained GIN models across different augmentation methods. “Seen”/“unseen” denotes LLM-rewritten train/test samples, respectively. Higher is better, largest value in each column in bold, second largest underlined.
Discussion: Fidelity vs. Diversity
Our experiment results illustrate a very important (and perhaps obvious) tradeoff in designing a suitable augmentation method for different training modes; that is, fidelity is crucial for any last-mile finetuning, while diversity is important for generalizable pre-training. This is elaborated from the blind node/edge-drop results, where node-drop improves pre-training robustness (Pre, § 5.2.2) but not post-training generalizability (Post, § 5.2.2), and edge-drop vice versa. Node drop is a more aggressive way to achieve structural diversity, but this destructiveness hurts the low-data finetuning setting. Edge drop is much gentler as information redundancy allows the model to learn from the augmented data without being misled by the noisy structure, since source codes still include dropped function calls. However, this results in less diverse augmentations, limiting edge drop’s overall effectiveness. We refer readers to Appendix § 12 for further analysis and accompanying experiments.
Selection: reliability vs. coverage. The node selection strategies in § 4 span a spectrum from static topological measures to model-dependent explainability methods. In practice, static criteria are preferable when the model is early in training or computational budget is limited: during pretraining, the model is only learning basic representations, and thus diversity of augmentation can be more beneficial. In contrast, model-dependent criteria become more valuable once the model has learned meaningful representations and targeted augmentation of its decision boundary is most consequential.
This observation explains how the top-3 results for Post are all model-aware, while the top performer for Pre is FCGA-S without model-awareness. The latter phenomenon is caused by model-aware selection only affecting the model decision and not necessarily its propagation, in turn not impacting model’s computation enough for robustness. FCGA-P is interesting as it takes the trading off reliability for coverage to the extreme, blind-augmenting everything, and thus is effective in the situation where both Pre and Post apply (i.e. direct evaluation of pre-training, § 5.2.1), but neither individually. This is further exacerbated by its semantic approximation during perturbation.
Augmentation: semanticity vs. approximation. FCGA-P eliminates the LLM inference cost of FCGA-F through a closed-form approach, but at the expense of semantic grounding. As a result, FCGA-P variants underperform other approaches in both Post (except the Model variant, whose selection reliability offsets semantic approximation) and Pre settings. Decision boundary theory explains the latter: the optimal separator hyperplane learned by diverse-but-blind data-only augmentation will not hold in the presence of true distribution-shifted samples (see Figure 5 in Appendix § 12.§ 5). Therefore, similar to the selection strategies, FCGA-P should only be used for cheap pre-training coverage with direct evaluation, while FCGA-F is reserved for fine-tuning stages where the model is sensitive to semantically meaningful variation. This hybrid amortizes LLM inference cost while preserving the benefits of semantic diversity where they matter most. Meanwhile, subgraph-based augmentation is effective across all settings, benefiting from both the augmentation diversity induced by structural edits and semantic refactoring. The top-2 results for Pre both belong to FCGA-S; but as powerful as it is, nothing good comes for free (Appendix § 12.§ 6).
Figure 5. Illustration of the boundary induced by broad-but-blind FCGA-P, and the optimal boundary.
Conclusion
In this work, we studied the brittleness of FCG-based malware classifiers against LLM-rewritten variants. We proposed FCGA, an LLM-driven augmentation framework that rewrites individual functions and refactors function clusters into realistic, semantically-diverse training variants, concentrating its effort on the graph components most important to the target model. Across multiple GNN architectures and distribution-shift settings, including a direct LLM-rewrite attack, FCGA improves robustness by up to 10% over context-agnostic baselines. Beyond these gains, our analysis surfaces a fidelity-diversity tradeoff that dictates when semantic grounding and model-aware selection matter most across the training pipeline. We hope this work encourages a more proactive defense against generative threats, leveraging the attacker’s own strategy to strengthen the classifiers they target.
Limitations
LLM inference overhead. FCGA-F and FCGA-S require LLM inference over the entire training set. Although this cost incurs only once and is amortized across all subsequent training runs, it grows linearly with dataset size and number of augmented functions, making it non-trivial for large-scale malware corpora. FCGA-P eliminates this overhead at the cost of semantic grounding, and can be very effective for pretraining, but severely underperforms when adapting to distributionally-shifted data. Additionally, ablation over the number of augmented nodes (c.f. Appendix § 11) shows diminishing returns beyond a small augmentation budget, suggesting that even a limited number of LLM rewrites can provide significant robustness benefits.
Small language models. We employed Qwen2.5-Coder-7B ([31]) as the code reasoner as it is the most accessible code model amongst the available open-source ones. Our preliminary test with Llama3.1-8B ([10]) and Phi3-3.8B ([1]) yields inconsistent outputs in both reasoning and formatting, resulting in low-quality refactor outputs; and for more recent modern reasoning models, additional ablations can be found in Section C.1. We expect our framework to perform even better with larger models and/or state-of-the-art proprietary models such as Claude and GPT-5; however, guardrailed models rejecting certain prompts deemed to be harmful hinders our ability to fully leverage their capabilities, and jailbreaking them falls outside the scope of this work. We defer this extensive benchmarking to a future work, particularly as more capable open-weight alternatives become available.
Android and Java specificity. All experiments are conducted on Android malware FCGs derived from decompiled Java bytecode. While it’s straightforward to apply FCGA to other platforms, the lack of benchmarks with FCG representations and available source code for other domains prevents direct evaluation of our framework’s effectiveness beyond this setting. Extending FCGA to other executable formats, e.g. Windows PE, Linux ELF, or native ARM binaries, is thus left for a future work.
Iterative augmentation. We currently augment the training data in a single pass, using a snapshot of the model state as the basis for selection criteria. Iteratively augmenting the training set in multiple rounds, where the selection criteria are updated after every epoch similar to adversarial training ([24]), could potentially further enhance robustness by continuously adapting to the model’s evolving weaknesses. However, this would significantly increase the computational cost and complexity of the training process; meanwhile, even with an one-time augmentation, we reach near optimal accuracy with just 25% of the training data, suggesting that the marginal benefit of iterative augmentation may not justify its cost.
Ethical Considerations
Dual-use considerations. FCGA repurposes a capability that is already established and publicly documented: prior work has shown that LLMs can rewrite malware into evasive variants at scale ([23, 2, 15]). Our framework introduces no new offensive technique and does not lower the barrier to producing malware; it instead operates entirely on the defensive side, consuming such variants as training signal to harden classifiers rather than synthesizing deployable malicious artifacts. We contend that this defensive framing is necessary rather than optional given that adversaries already wield LLMs, and thus withholding the same tools from defenders only widens an existing asymmetry. To this end, we release our code and prompts to support reproducibility and defensive adoption; the prompts specify generic, semantics-preserving refactoring rather than any malware-specific weaponization, and we believe their value to defenders outweighs the marginal informational risk of describing a technique already available to attackers.
Responsible data handling. All experiments use MalNet (Freitas et al., [8]) and its feature-augmented variant (Tran et al., [36]), all under CC-BY-4.0 license, established public benchmarks of FCGs derived from decompiled Android applications and not live executables. At no point do we execute, compile, or repackage malware into runnable form: FCGA operates over graph and embedding representations, and its augmentations are abstract training samples that need not be executable by design. We likewise do not jailbreak or adversarially circumvent model safety mechanisms: the task we prompt for is semantics-preserving refactoring of existing functions, and we rely on open-weight code models run locally whose lighter alignment permits such code-transformation requests.
Acknowledgments
This material is supported by the National Science Foundation under Award Numbers 2325416, 2325417, 2524380, 2540765, and 2622415.
Appendix
Implementation Details
Hardware & Frameworks
All experiments are conducted on a single NVIDIA RTX 6000 Ada Generation GPU. GNN models are implemented and evaluated in PyTorch 2.7 and PyTorch Geometric (PyG) 2.4. LLM inference for both function-level rewriting and subgraph-level refactoring variants of FCGA uses Qwen2.5-Coder-7B-Instruct ([31]) served locally via Ollama for results in the main paper; additional LLM ablations are specified in their respective descriptions. Node features are 1024-dimensional embeddings of their corresponding source codes produced by Qwen3-Embedding-0.6B ([35]), consistent with the setup of the MalNet-Tiny-Feature benchmark ([36]).
Training Hyperparameters
Each architecture has 3 layers of message-passing, and a 2-layer MLP classification head, with model parameter counts listed in Table 4. MalNet-Tiny ([8]) and MalNet-Tiny-Features ([36]) use identical splits with 3,500 training samples, 500 validation, and 1,000 test samples. All models are pretrained for 150 epochs with early stopping based on validation accuracy, using the Adam optimizer with a learning rate of 0.001 and weight decay of 5e-4. Batch size is set to 128 for all experiments. Finetuning is run for 10 epochs. All experiments are seeded with 0 for reproducibility. For data-limited finetuning, subsets of the training data are identically truncated by the specified ratio, evenly distributed across each class.
| Model | GCN | GIN | GAT | GraphSAGE |
| #Params. | 82,949 | 95,429 | 83,333 | 95,237 |
Table 4. Parameter counts of model architectures used in the main experiments.
Cosine Perturbation
FCGA-P augments node embeddings by adding a scaled random noise vector whose direction is chosen uniformly at random and whose magnitude is calibrated so that the resulting embedding lands at a prescribed cosine similarity from the original. is calibrated to match the empirical distributional shift of FCGA-F, ensuring that the two methods induce a comparable deviation in feature space. We derive the closed-form scale below.
Let be the original embedding and its unit normalization. Sample , set , and let us start with the noise vector for cleanliness of proof. We seek a scalar such that
Define , the projection of the unit embedding onto the noise direction. Dividing numerator and denominator by and substituting (since both vectors are unit-length) gives
Squaring both sides (valid when , which holds for small and ) and rearranging yields the quadratic
Its discriminant simplifies to
which is strictly positive for and , guaranteeing two distinct real roots:
In -dimensional space the projection concentrates near zero as grows large, so with overwhelming probability. When the denominator is positive and ; we therefore take . The perturbed embedding is
which satisfies by construction. In the rare edge case , we re-sample .
The monotonicity of the cosine in can be verified by differentiating with respect to :
which is negative for and , confirming that the perturbed embedding moves strictly further from the original as increases.
Node Selection
Static Structural Importance
Different centrality measures capture unique structural properties of a network, defining “importance” differently based on distinct types of network positioning or flow. Degree centrality ranks nodes by the number of incident edges; high-degree functions are called frequently and act as hubs in the program’s call structure. Betweenness measures the fraction of shortest paths passing through a node, identifying bottleneck functions whose removal would disconnect large parts of the graph. Closeness captures global centrality as the inverse average shortest-path distance to all other nodes. PageRank recursively propagates importance through the graph, assigning higher scores to nodes reachable from many important callers.
Improving upon PageRank, we utilized Personalized PageRank (PPR) to the Android setting. Our PPR implementation seeds the random walk at Android lifecycle entry points such as onCreate, onReceive, and onStartCommand, the primary interfaces through which the Android runtime interacts with an application. Random walks have previously been widely used for graph learning [20] (Nikolenztos and Vazirgiannis 2020); and in the context of FCGs, they have a natural interpretation as simulating the flow of execution through the program, and thus was utilized as a surrogate for dynamic execution traces [29]. By biasing selection toward functions reachable from these entry points, PPR surfaces nodes that lie on the execution paths most relevant to the application’s observable behavior.
Model-Aware Importance
The simplest approach for model-aware node importance calculation is to measure the output performance drop when a graph component is removed. However, prominent methods in explainable AI more sophisticatedly analyze the statistical correlation between graph components and the model’s prediction. GNNExplainer (Ying et al., 2019) determines importance by maximizing mutual information between graph nodes/edges and the model’s prediction. PGMExplainer ([38]) perturbs node features in batches and uses independence tests to measure which nodes’ perturbations most shift the prediction.
On subgraph selection, SubgraphX (Yuan et al., 2021) finds important subgraphs utilizing MCTS with Shapley values ([22]) as the reward signal, which attribute the model’s output to each subgraph by computing its weighted average marginal contribution across all possible subsets. While their choice of Shapley values is motivated by its theoretical properties, it is computationally expensive to evaluate even with stochastic approximation, requiring a nested Monte Carlo sampling routine for each MCTS state evaluation. We further simplify this approach and experiment with replacing the expensive Shapley value computation with output drop in Section B.2.1, a simpler metric that is core to all explainability metrics, and can be evaluated efficiently in batches. The result of this process is a set of important subgraphs that are not only structurally cohesive, but also empirically influential to the model’s predictions.
PGMExplainer Implementation
We reimplemented PGMExplainer with the following modifications to the current version on PyG Contrib to improve efficiency and correctness:
Batched perturbation inference: The reference implementation runs
num_samplessequential forward passes per graph, with one model call per perturbed copy. We generate allnum_samplesperturbed copies upfront, stack them into a single PyG Batch, and execute one batched forward pass per round. This reduces model calls from O(\text{num_samples}) to per round per graph.
Round 1 chi-square target: In the reference, the chi-square target for Round 1 is
int(target), wheretargetis the predicted class index passed by the Explainer wrapper. This integer is used as a column index into the sample matrix, whose columns record per-node perturbation flags (independent Bernoulli draws). Consequently, Round 1 tests whether node ’s correlates with node ’s perturbation (i.e. two independent random
variables), yielding p-values that are statistically uniform and carry no information about prediction sensitivity. We use num_nodes (the binarized prediction-change column) as the chi-square target for both rounds, so Round 1 performs a genuine coarse filter over all nodes before Round 2 refines the candidate set.
Candidate-set size for small graphs: The reference sets
max_subgraph_size = int(num_nodes/20)when no value is provided, which evaluates to zero for graphs with fewer than 20 nodes, producing an empty candidate set and degenerate Round 2 behavior. We computemax_subgraph_size = max(2k, ⌊num_nodes/20⌋), where is the node budget, clamped to [1, \text{num_nodes} - 1], ensuring a non-empty candidate set.
Gradient suppression: The reference runs all perturbation forward passes with autograd enabled. We wrap all model calls in
torch.no_grad(), which is functionally equivalent since PGMExplainer does not use gradients, to reduce memory overhead.
Ablation Studies
In this section, we present detailed ablation studies over the effect of different hyperparameters for each augmentation method, and detailed the final configurations which are used in the experiments reported in the main text in Table 5.
| Method | Selection | Aug. Rate |
| NodeDrop | Uniform | 0.25 |
| EdgeDrop | Uniform | 0.1 |
| Node+Edge | Uniform | (0.1, 0.5) |
| Function | Betweenness | 0.8 |
| ... + Model | PGMExplainer | 0.2 |
| Perturb | PPR | 0.5 |
| ... + Model | PGMExplainer | 0.5 |
| ... + All | All | 0.2 |
| Subgraph | Degree | 0.2 |
| ... + Model | SubgraphX | 0.2 |
Table 5. Final hyperparameter selections for each augmentation methods used in the main experiments.
Node Drop & Edge Drop
We sweep drop rates for NodeDrop and for EdgeDrop jointly on GIN, measuring both Test and OOD accuracy. Table 6 reports all configurations, with the
| Edge Rate | 0 | 0.1 | 0.3 | 0.5 | ||||
| Node Rate | Test | OOD | Test | OOD | Test | OOD | Test | OOD |
| 0 | 94.7% | 57.7% | 95.0% | 59.9% | 95.4% | 59.0% | 94.8% | 59.3% |
| 0.05 | 94.4% | 56.5% | 95.4% | 56.7% | 95.2% | 57.7% | 95.2% | 58.1% |
| 0.10 | 94.9% | 56.4% | 95.6% | 57.9% | 93.9% | 55.4% | 94.9% | 58.7% |
| 0.25 | 95.0% | 58.5% | 94.8% | 57.6% | 95.4% | 57.7% | 95.3% | 58.6% |
caption: Prediction accuracy on the original and covariance-shifted MalNet-Tiny datasets across node and edge drop rates. Trained on the GIN architecture. Higher is better. Highest value in Edge/Node-only ablations underlined, highest value across Node+Edge in bold.
:::
first row () isolates EdgeDrop, the first column () isolates NodeDrop, and represents the baseline.
Test accuracy is stable across configurations, staying within roughly 2% of the baseline. OOD accuracy is more sensitive: EdgeDrop alone with achieves 59.9%, while NodeDrop alone with yields 58.5% with consistent gains on both splits. The combined Node+Edge setting peaks at , for OOD with 58.7%.
Graph Component Selection Criteria
We jointly ablate the node selection criterion and the expected number of augmented nodes per graph for both FCGA-F and FCGA-P on GIN. This expectation is implemented by augmenting the most important 5 nodes and individually sampling a random Bernoulli variable for each of them with probability across the training set. We report the results in Table 7.
| Criteria | FCGA-F | FCGA-P | FCGA-S | |
| Baseline | - | 58.0% | 58.0% | 58.0% |
| Degree | 1 | 57.3% | 60.6% | 58.2% |
| Degree | 2.5 | 53.8% | 57.0% | 60.8% |
| Degree | 4 | 56.8% | 57.6% | 58.9% |
| Degree | 5 | 56.9% | 60.2% | 60.9% |
| Betweenness | 1 | 60.2% | 60.4% | 59.0% |
| Betweenness | 2.5 | 58.6% | 56.8% | 58.0% |
| Betweenness | 4 | 62.0% | 59.7% | 58.6% |
| Betweenness | 5 | 58.7% | 59.1% | 56.7% |
| Closeness | 1 | 61.4% | 57.3% | 58.6% |
| Closeness | 2.5 | 57.7% | 57.0% | 58.3% |
| Closeness | 4 | 59.2% | 56.5% | 58.5% |
| Closeness | 5 | 58.3% | 57.1% | 59.3% |
| PPR | 1 | 60.0% | 59.9% | 58.1% |
| PPR | 2.5 | 60.3% | 61.4% | 58.8% |
| PPR | 4 | 55.7% | 59.7% | 59.0% |
| PPR | 5 | 59.8% | 56.9% | 56.7% |
| GNN Explainer | 1 | 59.3% | 57.9% | - |
| GNN Explainer | 2.5 | 59.7% | 57.9% | - |
| GNN Explainer | 4 | 59.8% | 59.0% | - |
| GNN Explainer | 5 | 58.2% | 58.7% | - |
| PGM Explainer | 1 | 61.3% | 58.8% | - |
| PGM Explainer | 2.5 | 58.4% | 60.3% | - |
| PGM Explainer | 4 | 58.3% | 58.2% | - |
| PGM Explainer | 5 | 58.4% | 58.0% | - |
| MCTS + Output | 1 | - | - | 59.1% |
| MCTS + Output | 2.5 | - | - | 56.4% |
| MCTS + Output | 4 | - | - | 59.2% |
| MCTS + Output | 5 | - | - | 58.9% |
| SubgraphX | 1 | - | - | 64.4% |
| SubgraphX | 2.5 | - | - | 60.5% |
| SubgraphX | 4 | - | - | 59.3% |
| SubgraphX | 5 | - | - | 58.9% |
| All | 1 | - | 61.9% | - |
| All | 2.5 | - | 59.2% | - |
| All | 4 | - | 57.7% | - |
| All | 5 | - | 56.9% | - |
Table 7. Prediction accuracy on the covariance-shifted MalNet-Tiny datasets across different node sampling criteria and augmentation rates. Trained on the GIN architecture. Higher is better. Largest value in each column in bold, largest value for each node selection criteria underlined.
Model Performance
Static topology-based criteria. With function-level augmentation, similarly to the drop ablation, Test accuracy is relatively stable across configurations, with a maximum spread of around 1%, while OOD accuracy varies more widely with hyperparameters. Specifically, FCGA-F consistently achieves above 60% OOD accuracy across all criteria except Degree, and FCGA-P achieves similar performance but except for closeness. Interestingly, the trend for FCGA-S is the complete opposite of FCGA-F, where only Degree-based selection achieves above 60% OOD accuracy. This suggests that fancier centralities criteria may not be well-aligned with MCTS in the malware FCG domain. Another interesting note is that FCGA-F with only edges over all-node FCGA-P, showing that while mass perturbation is very effective, concentrating high-quality augmentation on a limited set of high-impact nodes is still more beneficial in improving model robustness.
| Config | Qwen2.5-Coder | Phi4-Mini | Gemma 4 |
| FCGA-F | 60.3% | 63.7% | 61.4% |
| FCGA-S | 64.4% | 64.6% | 62.0% |
caption: tbl:8: OOD test set accuracy when using different augmenting LLMs. Higher is better, highest in bold.
:::
Model-dependent criteria. For FCGA-F, PG-MExplainer yields the best result at 61.3%, however still trailing behind the best static selection method by 0.4%, indicating that augmenting high-throughput nodes matters more than high model-attention. As they affected propagation the most, these nodes when perturbed should introduce more helpful variations in the representations. For FCGA-P, a similar trend appears, where PGMExplainer outperforms GNNExplainer in improving OOD accuracy, but still cannot beat the performance of its own static selection counterparts. Regarding FCGA-S, output-drop-guided MCTS disappointingly achieves sub-60% OOD accuracy, while SubgraphX performs vastly better than any other configuration in the table. This implies output-drop as a reward proxy for the more computationally-expensive Shapley values may not be effective in this domain, which is consistent with how it’s not commonly used in the explainer literature. Moreover, contrasting the effectiveness of static node selectors for function-level rewriting, this observation also reinforces the unsuitability of topology-based subgraph selection for augmentation.
Augmentation Count
Two observations guide our hyperparameter selection in Table 7: first, the selection criterion matters more than the augmentation count: varying \mathbb{E}[#n] at a fixed criterion produces modest OOD swings of 3-5%, while the criterion decides the distribution of those gains. Betweenness centrality with \mathbb{E}[#n] = 4 gives the best FCGA-F configuration with OOD accuracy of 62.0%, and Closeness with \mathbb{E}[#n] = 1 gives the best FCGA-P OOD at 61.4%. Second, small augmentation counts suffice: configurations with \mathbb{E}[#n] = 1 are largely competitive with larger counts across all criteria — for instance, Betweenness at \mathbb{E}[#n] = 1 achieves 95.3% Test and 60.2% OOD, only 1.8% below the best OOD at \mathbb{E}[#n] = 4. As analyzed in Section B.2.1, this is thanks to centralizing augmentation around nodes that spread information throughout the graph, maximally impacting the underlying representation across the whole graph after model propagation.
This justifies using a small count in practice, which significantly reduces LLM inference time and cost.
In-Depth Analysis and Discussions
LLM Ablations
To assess the sensitivity of FCGA-F to the choice of LLM, we experiment with using Qwen2.5-Coder-7B (Qwen et al., [31]), Phi4-Mini-3.8B (Microsoft et al., [26]), and Gemma 4-E4B (Google Deep-Mind, [9]) as the augmenting LLM. For FCGA-F, we use PPR as it achieved consistently high result for both FCGA-F/P; and for FCGA-S, we select SubgraphX for its overall leading performance. Reported in Table 8, results show that a stronger reasoning LLM can indeed yield better augmentation quality and thus better robustness, up to 3.4% increase in accuracy. Phi4-mini displays improved performance in both settings, although marginally for FCGA-S; while Gemma 4 was better than Qwen2.5-Coder for FCGA-F, but worse for subgraph-level refactoring. Thus, we believe that our framework can further benefit from more powerful LLMs, and the results reported in the main text with Qwen2.5-Coder can be viewed as a lower bound for the potential of our framework.
We additionally run our real-world attack in § 5.2.3 using Gemma 4 as the underlying LLM engine, and report the results in Table 9. We found that Gemma-rewritten malwares did not drastically reduce the predictive accuracy of the models comparing to Phi-4-based ones, and stay much closer to the which on original test set. Comparing to the original test, FCGA variants achieve similar results on the Gemma-rewritten malwares, showing the ability to generalize to attacks using unseen LLMs.
| Method | Original | Gemma 4 | Phi-4-mini |
| Baseline | 94.7% | 87.0% | 34.0% |
| NodeDrop | 95.0% | 90.0% | 39.0% |
| EdgeDrop | 95.0% | 93.0% | 38.0% |
| Node+Edge | 94.9% | 93.0% | 36.0% |
| Function | 95.0% | 94.0% | 43.0% |
| ... + Model | 95.0% | 94.0% | 42.0% |
| Perturb | 95.0% | 94.0% | 41.0% |
| ... + Model | 94.7% | 93.0% | 41.0% |
| ... + All | 95.1% | 96.0% | 43.0% |
| Subgraph | 94.4% | 94.0% | 39.0% |
| ... + Model | 94.9% | 95.0% | 44.0% |
Table 9. Accuracy under LLM-rewritten test-set malwares of pretrained GIN models across different augmentation methods, using different attack LLMs. Higher is better, largest value in each column in bold, second largest using a different LLM underlined.
| Method | GCN | GIN | GAT | GraphSAGE |
| Baseline | 0.09 | 0.085 | 0.105 | 0.12 |
| NodeDrop | 0.065 | 0.055 | 0.095 | 0.1 |
| EdgeDrop | 0.085 | 0.095 | 0.095 | 0.08 |
| Node+Edge | 0.08 | 0.07 | 0.22 | 0.11 |
| FCGA-F | 0.065 | 0.045 | 0.115 | 0.045 |
| ... + Model | 0.06 | 0.065 | 0.05 | 0.065 |
| FCGA-P | 0.085 | 0.08 | 0.05 | 0.09 |
| ... + Model | 0.065 | 0.085 | 0.04 | 0.1 |
| ... + All | 0.06 | 0.075 | 0.07 | 0.095 |
| FCGA-S | 0.08 | 0.075 | 0.11 | 0.09 |
| ... + Model | 0.05 | 0.05 | 0.11 | 0.075 |
tbl:10: FPR on test set accuracy across different baselines and architectures. Lower is better, lowest in bold, values larger than baseline underlined.
Selection Specificity Analysis
Figure 4 visualizes the average overlap between selection criteria evaluated on the training set using intersection-over-union (IoU). Across the two FCGA granularities, static topology-based criteria would have more overlap comparing to vs. model-aware variants, but do not exceed 0.4 IoU. And vice versa, explainer-based selectors have more overlap with each other than with static ones, but much less than which across static criteria, evident by the general color intensities of the 4 × 4 patches. The heatmap also shows that selection across architectures vastly differ from each other, denoting that each architecture learns a different set of classification rules, and thus model-dependent importance selection do not transfer well across setups.

Figure 4. Average Intersection-over-Union of node selections across criteria and checkpoints.
False Positive Rate on Benign Samples
One possible concern about high-diversity augmentations is that their resulting aggressive expansion of the decision boundary to capture more malware variants (especially via FCGA-P) could lead to the over-rejection of benign code, which is critical for a real-world malware detector. However, this concern is alleviated by the fact that MNTF includes benign applications as a class in the training set, and thus these benign training samples constrain the decision boundary expansion during training. To inspect this, we evaluated FPR of the benign class (i.e. benign samples predicted as any malware family) of the experiments reported in Table 2 on the OOD split, and report the results in Table 10. FCGA-P in fact never increased FPR relative to the corresponding baseline, and reduced GAT FPR from 10.5% to as low as 4.0%. An FCGA configuration also attained the lowest FPR for every architecture. Nevertheless, the effect is architecture-dependent, especially with GAT, where augmentations may increase FPR, most notably Node+Edge at 22.0%. Determining the cause of this GAT-specific interaction would require a separate controlled study of architecture–augmentation interactions and is outside the scope of the current work.
| Method | GCN Test | GCN OOD | GIN Test | GIN OOD | GAT Test | GAT OOD | GraphSAGE Test | GraphSAGE OOD |
| Baseline | ||||||||
| NodeDrop | ||||||||
| EdgeDrop | ||||||||
| Node+Edge | ||||||||
| Function | ||||||||
| ... + Model | ||||||||
| Perturb | ||||||||
| ... + Model | ||||||||
| ... + All | ||||||||
| Subgraph | <u></u> | |||||||
| ... + Model | <u></u> |
Table 2. Models’ test set accuracy in percentage on the original and covariance-shifted MalNet-Tiny datasets across different augmentation strategies (higher is better). Results are averaged over 3 seeds, subscripts denote standard deviations. Largest value in each column in bold, second largest OOD underlined.
LLM Generation Quality
To evaluate the quality of the rewrite output, we first ran tree-sitter on all Owen-2.5 rewrites to check for syntactic validity. Out of a total of 372,576 rewrites, 163 (0.04%) contain invalid syntax; and out of those, 82 are due to context limit cutoff. We then went through the other 81 invalid examples: most of them are actually functionally sound, but not necessarily correct, with the exception of 5 that have:
Repeated blocks of code,
Hallucinated variable type (e.g. calling hasNext on a String),
Garbled text (e.g. ifidwifi),
Early termination/truncation,
A comment of // (rest of the code remains unchanged).
For the other 76, we provide a list of syntactic error categories:
Generic invalid syntax (e.g. missing semicolons, missing/misplaced closing braces),
Reference before definition,
Out-of-scope variable reference,
Mistyped assignment/definition,
Incorrect access modifier, or invalid access to non-public members,
Mixed Kotlin code with Java,
Deprecated syntax (_ for method identifier, which works in Java 8, but is reserved and illegal in Java 9+).
And semantic errors:
Loop counter never incremented,
Function call before initializing parameters,
Incorrect lifecycle (setContentView and findViewById called in the constructor instead of onCreate setup).
We randomly (with seed 42) spot checked another 100 functions of the valid ones, and the results break down to:
61 equivalent or near-equivalent re-implementations of the original functionality,
25 functions with the right intention but bugs that prevent them from working correctly, with similar failure modes,
14 functions deviated from the original; most of them starts around the half-way mark.
Similarly for subgraph refactoring, we randomly sample 100 of 31,399 refactored subgraphs:
59 were equivalent or near-equivalent,
25 had the right intention, with some incorrect or empty summaries,
10 functionally deviated,
6 output unparsable responses.
In light of these results, to strengthen the quality of the evaluation under LLM attack, we filter out functions that cannot be parsed by tree-sitter for the results in Table 3 and Table 9.
Decision Boundary Intuition
Figure 5 illustrates why broad but semantically ungrounded augmentation may yield a suboptimal decision boundary despite increasing training diversity, as it fails to cover the shifted distribution.
The Cost of Thoroughness for FCGA-S
Both components of FCGA-S require more computational overhead than their counterparts. For selection, FCGA-S takes approximately 1 minute per graph on average, which is around the half the time needed for the LLM queries; while FCGA-F/P selection is much faster even with model-awareness. Given both MCTS and Shapley values are estimated via sampling, sufficient exploration is needed to avoid introducing variance that can undermine the reliability of selection. We attempted to simplify this complexity by replacing Shapley values with output drop for a substantially reduction in runtime in Section B.2.1; however the result is noticeably degraded, signaling that this computational overhead is highly justified. Regarding LLM inferences, while function-level rewriting only requires one prompt per augmented node and can be done in parallel, subgraph-level refactoring requires one prompt per node summarization node (which contains both augmenting nodes and context nodes), and another prompt for the refactoring itself that requires the completion of the summarization step. Moreover, while function rewrites need not be completely accurate, subgraph refactoring requires a valid JSON output for parsing and reassembly. This requirement is more stringent and thus more prone to failure, especially with smaller models, which can further increase the overhead due to re-tries. In our implementation, generated outputs are automatically schema-validated, and malformed outputs are retried under a fixed retry budget. Given that augmentation is performed offline, these retries affect one-time preprocessing cost rather than model training or inference cost. Lastly, as mentioned in § 6, the complexity of subgraph refactoring demands a capable reasoning model with a sufficiently large context window (and consequently resistant to context rot). Thus, while FCGA-S yield visibly better robustness improvements, its computational cost and potential risks should be carefully considered in practice.
Given the above limitations, FCGA-S currently combines its functional change from the LLM refactoring, and a representation change when embedding summaries instead of source code. To separate the impact of these two components to the effectiveness of FCGA-S, we run an addition ablation study where after subgraph selection and summarization, we do not run a refactor inference; and instead only embed those summarizations as features for the selected nodes. This results in an unchanged topology, but with the new summarization embeddings, eliminating one part of the confound. Denoting this new ablation as FCGA-Sum, we train a GIN model with this custom variant, and report the results on the OOD split in Table 11. At 58.4% (58.2% with model-aware selection), FCGA-Sum barely improves OOD performance over baseline at 57.7%, and worse than FCGA-F/P. This rules out that the effectiveness of FCGA-S stems mostly from augmenting source codes into summaries, and instead is due to the actual refactoring. Unfortunately, the inverse ablation is practically infeasible: LLM’s context limit prevents us from having both the refactor and new source codes. Thus, a complete separation of FCGA-S’ structure-feature confound remains open for future research. However, our results with summary embeddings performing worse than which of actual function rewrites suggest that a complete refactor will perform even better than our current FCGA-S.
| Variant | Test | OOD |
| Baseline | 94.7% | 57.7% |
| FCGA-F | 95.0% | 62.0% |
| FCGA-P | 95.0% | 61.4% |
| FCGA-Sum | 94.9% | 58.4% |
| FCGA-S | 94.4% | 60.9% |
| FCGA-F + Model | 95.0% | 61.3% |
| FCGA-P + Model | 94.7% | 60.3% |
| FCGA-Sum + Model | 94.8% | 58.2% |
| FCGA-S + Model | 94.9% | 64.4% |
Table 11. Test set accuracy across different augmentation strategies on GIN. OOD refers to the Common split. Higher is better, highest in bold.
Additional Related Work
Graph Representation for Code
Representing programs as graphs is a fundamental design choice in learning-based code analysis. Multiple graph abstractions have been proposed, each offering a different tradeoff between expressiveness and graph size [3]. Abstract Syntax Trees (ASTs) capture the hierarchical syntactic structure of source code, with nodes corresponding to syntactic constructs and edges encoding parent-child relationships [4]. ASTs are expressive and widely used in code understanding tasks, but their size scales directly with code length, thus impractical for whole-program analysis of real-world applications.
Control Flow Graphs (CFGs) model the possible execution orders of basic blocks within a function, with edges representing transitions between them. CFGs are well-suited for intra-procedural analysis such as vulnerability detection (Zhou et al., 2019), but remain scoped to individual functions and do not capture inter-procedural behavior.
Data Flow Graphs (DFGs) encode how values propagate through a program by connecting variable definitions to their uses [12]. Like CFGs, DFGs are typically constructed per-function and are often combined with CFGs for richer program representations.
Code Property Graphs (CPGs) (Yamaguchi et al., 2014) unify ASTs, CFGs, and DFGs into a single joint graph, simultaneously exposing syntactic structure, control flow, and data dependencies. Despite their richness, CPGs are extremely large: a single real-world application can yield a graph with millions of nodes, making GNN-based inference computationally intractable at scale.
Algorithm 1: FCGA-F: Function-Level Rewriting
Input: Graph $G = (V, E, X)$
vertices $V = \{v_i\}$,
edges $E$,
node features $X = \{x_i\}, x_i \in \mathbb{R}^{d}$,
source codes $S = \{s_i\}, s_i \in S$,
node selection $R = \{r_j\}, r_j \in 1..|V|$,
rewriter LLM $L : S \to S$,
embedding model $M : S \to \mathbb{R}^{d}$
Output: Augmented graph $G^{\prime}$
1 Initialize $X^{\prime} \leftarrow X$;
2 foreach $r_j$ in $R$ do
3 $X^{\prime}[r_j] \leftarrow M(L(s_{r_j}))$;
4 end
5 return $G^{\prime} = (V, E, X^{\prime})$;
Algorithm 2: FCGA-P: Function-Level Perturbation
Input: Graph $G = (V, E, X)$
vertices $V = \{v_i\}$,
edges $E$,
node features $X = \{x_i\}, x_i \in \mathbb{R}^{d}$,
cosine similarity $c \in \mathbb{R}$,
node selection $R = \{r_j\}, r_j \in 1..|V|$
Output: Augmented graph $G^{\prime}$
1 Initialize $\widetilde{X} = X$;
2 foreach $r_j$ in $R$ do
3 // Equation 3
Generate $\widetilde{x}_{r_j}$ s.t. $\frac{|\widetilde{x}_{r_j}x_{r_j}|}{\|\widetilde{x}_{r_j}\|\|x_{r_j}\|} = c$;
4 $\widetilde{X}[r_j] \leftarrow \widetilde{x}_{r_j}$;
5 end
6 return $G^{\prime} = (V, E, \widetilde{X})$;
Function Call Graphs (FCGs) take a coarser, inter-procedural view: each node represents one function, and a directed edge from to indicates that function invokes during execution. While FCGs do not expose the internal implementation of individual functions, they capture the high-level behavioral structure of a program, i.e. which components call which others, at a scale that remains tractable for GNN training.
LLMs for Code Understanding
Large language models pre-trained on large corpora of source code have demonstrated strong capabilities across a wide range of code-related tasks. Early transformer-based models for code (Feng et al., [7]; Wang et al., 2021) established that jointly pre-training on natural language and programming languages enables effective code search, summarization, and understanding. Subsequent generative models (Chen et al., [5]; Rozière et al., [33]) further showed that LLMs can produce syntactically and semantically correct code from natural language descriptions, achieving strong performance on programming benchmarks. These advances reflect a broader understanding that LLMs capture not only surface-level syntax but also the functional intent behind code. Beyond generation, LLMs have proven effective at higher-level code reasoning tasks, including code summarization (Koziolek et al., [19]), refactoring assistance (Nam et al., [27]), and bug localization (Jimenez et al., 2024).
LLMs for Graph Augmentation
LLMs have more recently been brought into graph augmentation for text-attributed graphs (TAGs), where nodes carry natural-language descriptions. TAPE (He et al., [14]) enriches node features with LLM-generated explanations, improving GNN performance on citation and product graphs. Sun et al. [34] prompt LLMs to assess pairwise semantic similarity between node texts and use the scores to add reliable edges and prune noisy ones, refining graph topology without changing node features. Yu et al. (2025) go further and generate entirely new labeled nodes via LLMs to address few-shot node classification on TAGs, integrating the synthetic nodes into the original graph through a learned edge predictor. To the best of our knowledge, no prior work has applied LLM-driven augmentation to program graphs for malware detection.
Algorithms and Prompts
Algorithms
In this section, to accompany our code base and following prompts, we provide pseudo-code for our rewrite, perturbation, and refactoring algorithms at Algorithm 1, 2, and 3, respectively.
Prompts
Function-Level Rewriting
You are a Java code rewriter. Your task is to rewrite the
following Java function to be as different as possible
while STRICTLY preserving its functionality.
CRITICAL REQUIREMENTS:
1. The function signature MUST remain EXACTLY the same: {
signature}
2. The function MUST produce identical outputs for all
possible inputs
3. The function MUST have identical side effects (exceptions
, state changes, etc.)
4. The rewritten code MUST be syntactically valid Java code
FOCUS ON: Maximum transformation across all dimensions
- Apply control flow restructuring (loops, conditionals,
branches)
- Rename variables and reorganize computations
- Transform the algorithmic approach while preserving
semantics
- Use different Java language features and APIs
- Restructure the entire function logic flow
- Make the code as different as possible from the original
IMPORTANT: Do NOT add unnecessary code just for the sake of
change. Every transformation must:
- Serve a legitimate structural purpose
- Maintain readability
- Preserve exact functionality
Subgraph-Level Refactoring
Algorithm 3: FCGA-S: Subgraph-Level Refactoring
Input: Graph $G = (V, E)$,
vertices $V = \{v_i\}$,
edges $E = \{(v_i, v_j)\}$,
$G \in \mathcal{G}$,
source codes $S = \{s_i\}$, $s_i \in \mathcal{S}$,
node selection $R = \{r_k\}$, $R \in \mathcal{R}$,
summarization LLM $K : \mathcal{S} \to \widetilde{\mathcal{S}}$,
refactoring LLM $L : \mathcal{G} \times \widetilde{\mathcal{S}}^m \times \mathcal{R} \to \mathcal{G} \times \widetilde{\mathcal{S}}^n$,
embedding model $M : (\mathcal{S} \cup \widetilde{\mathcal{S}}) \to \mathbb{R}^d$
Output: Augmented graph $G'$
// Refactoring node set
1 $V_R \gets \{v_{r_k} \mid r_k \in R\}$;
// And their summaries
2 $\widetilde{S}_R \gets \{K(s_{r_k}) \mid r_k \in R\}$;
// Context node set
3 $V_R^{(1)} \gets \{v_j \mid \exists v_i \in V_R : (v_i, v_j) \in E\}$;
// And their summaries
4 $\widetilde{S}_R^{(1)} \gets \{K(s_j) \mid \exists v_i \in V_R : (v_i, v_j) \in E\}$;
// Build inducted subgraph
5 $E_R \gets \{(v_i, v_j) \mid (v_i, v_j) \in E, v_i \in V_R, v_j \in V_R\}$;
// Context edge set
6 $E_R^{(1)} \gets \{(v_i, v_k) \mid (v_i, v_k) \in E, v_i \in V_R, v_k \in V_R^{(1)}\}$;
7 while true do
// Refactor
8 $((V_*, E_*), \widetilde{S}_*) \gets L((V_R \cup V_R^{(1)}, E_R \cup E_R^{(1)}), \widetilde{S}_R \cup \widetilde{S}_R^{(1)}, R)$;
// Ensure context is preserved
9 if $V_R^{(1)} \subset V_* \text{ and } \exists \widetilde{s}_l \in \widetilde{S}_* \ \forall v_l \in V_* \setminus V_R^{(1)}$
then
10 break;
11 end
// Build the augmented graph
12 $V' \gets V \setminus V_R \cup V_*$;
// Filter invalid edges
13 $E_*' \gets E_* \setminus \{(v_i, v_j) \mid v_i \in V_R^{(1)}, v_j \in V_R^{(1)}\}$;
14 $E' \gets E \setminus E_R \setminus E_R^{(1)} \cup E_*'$;
15 foreach $v_i$ in $V'$ do
16 if $v_i \in V$ then
// Guaranteed to exist in $S$
17 $X'[i] \gets M(s_i)$;
18 else
// Guaranteed to exist in $S_*$
19 $X'[i] \gets M(\widetilde{s}_i)$;
20 end
21 end
22 return $G' = (V', E', X')$;
You are a code refactoring engine specializing in Android
applications. Your task is to accept a partial Function
Call Graph (subgraph) and refactor specific target
nodes while STRICTLY preserving the integrity of their
adjacent nodes.
INSTRUCTIONS:
1. **Refactor**: Rewrite the logic of the whole set of nodes
you are asked to refactor. YOU HAVE CREATIVE FREEDOM
here.
- **Example Strategies**:
* **Splitting**: Break a complex function into multiple
smaller helper nodes.
* **Merging**: Combine a simple group of functions into
a single node.
* **Obfuscation**: Add dummy control flow (e.g., new
functions that do meaningful nothing), or rename
operations.
* **Logic Hiding**: Move sensitive string construction
into a new dedicated helper node.
* **Other**: Any other strategy that you think is
appropriate.
- You can combine strategies, or even rewrite the entire
set of functions.
2. **Preserve Functionalities**: All nodes that are not in
the refactoring set MUST keep their original
functionality and signature even if they are changed to
accommodate the refactoring. They MUST be present in
the final output graph.
3. **Reconstruct**: Generate the correct JSON of the new
refactored program.
CONSTRAINTS & FORMATTING:
- **Output Format**: ONLY provide the final refactored graph
in JSON. Do NOT include any other text, introduction,
thinking, or explanation.
- **JSON Schema**: {nodes: [{id: str, signature: str,
summary: str}], edges: [[source, target]]}.
- **Node IDs**: Every node in the output graph MUST have
an `id`.
- For refactored or new nodes: Give a new unique ID
starting with the letter R.
- For context nodes: Keep the original node ID verbatim.
- **Signatures**: Every node in the output graph MUST have
a `signature`.
- Function signatures MUST match exactly for non-
refactored nodes.
- **Summary**: Every node in the output graph MUST have a
`summary`.
- For updated nodes: Write a new summary of the new
implementation.
- For unchanged nodes: Copy the original summary
verbatim.
- **No Code**: Do not output Java/Kotlin source code.
- **No Curly Braces**: Do NOT use curly braces `{}` in your
summaries to simplify parsing.References
- [1]Marah Abdin, Jyoti Aneja, Hany Awadalla, Ahmed Awadallah, Ammar Ahmad Awan, Nguyen Bach, Amit Bahree, Arash Bakhtiari, Jianmin Bao, Harkirat Behl, Alon Benhaim, Misha Bilekno, Johan Bjorck, Sébastien Bubeck, Martin Cai, Qin Cai, Vishrav Chaudhary, Dong Chen, Dongdong Chen, and 110 others. 2024. Phi-3 technical report: A highly capable language model locally on your phone. Preprint, arXiv:2404.14219.arxiv.org/abs/2404.14219
- [2]Md Ajwad Akil, Adrian Shuai Li, Imtiaz Karim, Arun Iyengar, Ashish Kundu, Vinny Parla, and Elisa Bertino. 2025. LLMalmorph: On the feasibility of generating variant malware using large-language-models. Preprint, arXiv:2507.09411.arxiv.org/abs/2507.09411
- [3]Miltiadis Allamanis, Earl T. Barr, Premkumar Devanbu, and Charles Sutton. 2018. A survey of machine learning for big code and naturalness. ACM Comput. Surv., 51(4).arxiv.org/abs/1709.06182
- [4]Uri Alon, Meital Zilberstein, Omer Levy, and Eran Yahav. 2019. code2vec: learning distributed representations of code. Proc. ACM Program. Lang., 3(POPL).arxiv.org/abs/1803.09473
- [5]Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, and 39 others. 2021. Evaluating large language models trained on code. Preprint, arXiv:2107.03374.
- [7]Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, and Ming Zhou. 2020. Code-BERT: A pre-trained model for programming and natural languages. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 1536–1547, Online. Association for Computational Linguistics.
- [8]Scott Freitas, Yuxiao Dong, Joshua Neil, and Duen Horng Chau. 2021. A large-scale database for graph representation learning. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1).arxiv.org/abs/2011.07682
- [9]Google DeepMind. 2026. Gemma 4.
- [10]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie SravanKumar, Artem Korenev, Arthur Hinsvark, and 542 others. 2024. The llama 3 herd of models. Preprint, arXiv:2407.21783.arxiv.org/abs/2407.21783
- [11]Alejandro Guerra-Manzanares, Marcin Luckner, and Hayrettin Bahsi. 2022. Concept drift and cross-device behavior: Challenges and implications for effective android malware detection. Comput. Secur., 120(C).
- [12]Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. 2021. Graphcode{bert}: Pre-training code representations with data flow. In International Conference on Learning Representations.arxiv.org/abs/2009.08366
- [13]William L. Hamilton, Rex Ying, and Jure Leskovec. 2018. Inductive representation learning on large graphs. Preprint, arXiv:1706.02216.arxiv.org/abs/1706.02216
- [14]Xiaoxin He, Xavier Bresson, Thomas Laurent, Adam Perold, Yann LeCun, and Bryan Hooi. 2024. Harnessing explanations: Llм-to-lm interpreter for enhanced text-attributed graph representation learning. Preprint, arXiv:2305.19523.arxiv.org/abs/2305.19523
- [15]Gabriel Hortea and Juan Tapiador. 2026. The infinite mutation engine? measuring polymorphism in llm-generated offensive code. Preprint, arXiv:2605.03619.arxiv.org/abs/2605.03619
- [17]Vijaya Kaza. 2026. Keeping Google Play & Android app ecosystems safe in 2025 — blog.google. https://blog.google/security/keeping-google-play-android-app-ecosystem-safe-2025/. [Accessed 20-05-2026].
- [18]Thomas N. Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks.arxiv.org/abs/1609.02907
- [19]Heiko Koziolek, Sten Grüner, R̲h̲a̲b̲a̲n̲ Hark, Virendra Ashiwal, Sofia Linsbauer, and Nafise Eskandani. 2024. Llm-based and retrieval-augmented control code generation. In Proceedings of the International Workshop on Large Language Models for Code.DOI
- [20]Ni Lao, Tom Mitchell, and William Cohen. 2011. Random walk inference and learning in a large scale knowledge base. In Proceedings of the 2011 conference on empirical methods in natural language processing, pages 529–539.DOI
- [21]Zhen Liu, Ruoyu Wang, Nathalie Japkowicz, Heitor Murilo Gomes, Bitao Peng, and Wenbin Zhang. 2024. Segdroid: An android malware detection method based on sensitive function call graph learning. Expert Systems with Applications, 235:121125.DOI
- [22]Scott M Lundberg and Su-In Lee. 2017. A unified approach to interpreting model predictions. Advances in neural information processing systems, 30.arxiv.org/abs/1705.07874
- [23]Pooria Madani. 2023. Metamorphic malware evolution: The potential and peril of large language models. In IEEE International Conference on Trust, Privacy and Security in Intelligent Systems and Applications.DOI
- [24]Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. 2019. Towards deep learning models resistant to adversarial attacks. Preprint, arXiv:1706.06083.arxiv.org/abs/1706.06083
- [25]Hassen Mehadi and Philip K. Chan. 2017. Scalable function call graph-based malware classification. Proceedings of the Seventh ACM on Conference on Data and Application Security and Privacy.DOI
- [26]Microsoft, .; Abdelrahman Abouelenin, Atabak Ashfaq, Adam Atkinson, Hany Awadalla, Nguyen Bach, Jianmin Bao, Alon Benhaim, Martin Cai, Vishrav Chaudhary, Congcong Chen, Dong Chen, Dongdong Chen, Junkun Chen, Weizhu Chen, Yen-Chun Chen, Yi Iing Chen, Qi Dai, and 57 others. 2025. Phi-4-mini technical report: Compact yet powerful multimodal language models via mixture-of-loras. Preprint, arXiv:2503.01743.
- [27]Daye Nam, Andrew Macvean, Vincent Hellendoorn, Bogdan Vasilescu, and Brad Myers. 2024. Using an llm to help with code understanding. Preprint, arXiv:2307.08177.arxiv.org/abs/2307.08177
- [29]Lucky Onwuzurike, Enrico Mariconti, Panagiotis Andriotis, Emiliano De Cristofaro, Gordon Ross, and Gianluca Stringhini. 2019. Mamadroid: Detecting android malware by building markov chains of behavioral models (extended version). ACM Transactions on Privacy and Security (TOPS), 22(2):1–34.
- [30]Dyna Soumhane Ouchebara and Stéphane Dupont. 2026. Llm-based vulnerable code augmentation: Generate or refactor? Preprint, arXiv:2512.08493.arxiv.org/abs/2512.08493
- [31]Qwen, .; An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Daiyiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, and 25 others. 2025. Qwen2.5 technical report. Preprint, arXiv:2412.15115.
- [32]Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. 2020. Dropedge: Towards deep graph convolutional networks on node classification. In International Conference on Learning Representations.arxiv.org/abs/1907.10903
- [33]Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, Jérémy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafiori, Wenhan Xiong, Alexandre Défossez, and 7 others. 2024. Code llama: Open foundation models for code. Preprint, arXiv:2308.12950.arxiv.org/abs/2308.12950
- [34]Shengyin Sun, Yuxiang Ren, Jiehao Chen, and Chen Ma. 2025. Large language models as topological structure enhancers for text-attributed graphs. In International Conference on Database Systems for Advanced Applications, pages 106–122. Springer.
- [35]Qwen Team. 2025. Qwen3 technical report. Preprint, arXiv:2505.09388.
- [36]Ngoc N. Tran, Anwar Said, Waseem Abbas, Tyler Derr, and Xenofon D. Koutsoukos. 2026. Evaluating out-of-distribution robustness in graph-based android malware classification: A new principled benchmark. Preprint, arXiv:2508.06734.arxiv.org/abs/2508.06734
- [37]Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph attention networks. In International Conference on Learning Representations.arxiv.org/abs/1710.10903
- [38]Minh N. Vu and My T. Thai. 2020. Pgm-explainer: Probabilistic graphical model explanations for graph neural networks. Preprint, arXiv:2010.05788.arxiv.org/abs/2010.05788
Machine contribution statement
No AI-use declaration is available for this version in Valency.
The available record does not establish whether AI systems or models contributed to this work.


