pith. sign in

arxiv: 2606.05986 · v1 · pith:SVN3RUFQnew · submitted 2026-06-04 · 💻 cs.CR · cs.AI

AttackPathGNN: Cross-function vulnerability detection in smart contracts using state interference graphs and conjunction pooling

Pith reviewed 2026-06-28 00:46 UTC · model grok-4.3

classification 💻 cs.CR cs.AI
keywords smart contractsvulnerability detectiongraph neural networksstate interference graphsconjunction poolingsolidityreentrancycross-function vulnerabilities
0
0 comments X

The pith

Smart-contract vulnerability detection improves when models reason over relationships between functions instead of isolated code patterns.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

Existing detectors reduce the task to syntactic matching inside single functions, yet consequential exploits such as The DAO arise from the interplay of multiple functions and the joint satisfaction of several preconditions. AttackPathGNN therefore builds an explicit State Interference Graph that connects every pair of functions sharing mutable storage through typed weighted edges and through directed reentrancy edges defined by a five-condition predicate. It then applies conjunction pooling, a differentiable AND aggregator over eight named exploit preconditions, so that the per-function score drops to zero whenever any single mitigation is present. On the SmartBugs Wild held-out set the model reaches 92.3 % F1 with a 4.3 % false-negative rate and recovers six of the ten DASP10 categories at 100 % across every training seed. Each prediction is accompanied by a structured remediation report that identifies the responsible functions and missing guards.

Core claim

AttackPathGNN reframes detection as reasoning over explicit attack paths in a State Interference Graph that links every pair of functions sharing mutable storage through typed, weighted edges and through directed reentrancy-path edges defined by an explicit five-condition predicate, together with conjunction pooling, a differentiable AND-aggregator over eight named exploit preconditions whose log-sigmoid form causes the per-function exploit score to collapse whenever any single mitigation is in place.

What carries the argument

The State Interference Graph that connects functions sharing mutable storage via typed edges and reentrancy paths via a five-condition predicate, paired with conjunction pooling as a differentiable AND over eight exploit preconditions.

If this is right

  • The model attains 92.3 % F1 on the SmartBugs Wild held-out partition.
  • False-negative rate stays at 4.3 % while detection rate on the human-labelled SmartBugs Curated benchmark reaches 90.8 %.
  • Six of the ten DASP10 categories are recovered at 100 % on every training seed.
  • Reentrancy detection reaches 98.7 % across seeds.
  • Each positive verdict is emitted with a structured, function-level remediation report.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The same graph-construction and conjunction-pooling pattern could be applied to other languages that expose shared mutable state across modules.
  • The explicit precondition list may serve as a checklist for manual auditors even when the neural model is not used.
  • Because the pooling operation is differentiable, the architecture could be inserted into larger end-to-end training pipelines that jointly optimize detection and repair suggestions.
  • Testing the five-condition reentrancy predicate on contracts written after the introduction of newer Solidity features would reveal whether the predicate needs updating.

Load-bearing premise

The State Interference Graph that links every pair of functions sharing mutable storage through typed edges and through directed reentrancy paths defined by the five-condition predicate correctly captures the relationships that make attacks feasible.

What would settle it

Running the model on a fresh collection of contracts whose only vulnerabilities are known cross-function attacks and finding that its F1 score is statistically indistinguishable from single-function baselines would falsify the central claim.

Figures

Figures reproduced from arXiv: 2606.05986 by Adela Bara, Gabriela Dobrita, Simona-Vasilica Oprea.

Figure 1
Figure 1. Figure 1: AttackPathGNN pipeline. 3.2 Stage 1-Source code parsing The first stage converts raw Solidity source into a structured representation suitable for downstream graph construction. Two parsing strategies are employed and selected automatically based on tool availability [PITH_FULL_IMAGE:figures/full_fig_p005_1.png] view at source ↗
read the original abstract

Existing learning-based detectors for Solidity smart-contracts reduce vulnerability detection to syntactic pattern matching within single functions, yet many of the most consequential exploits (The DAO, Cream Finance) exist not in any individual function but in the relationship between functions and in the combination of conditions that made the attack feasible. Thus, we propose AttackPathGNN, a graph neural network (GNN) that reframes detection as reasoning over explicit attack paths. Two architectural choices distinguish it from prior GNN-based detectors: (1)a State Interference Graph that links every pair of functions sharing mutable storage through typed, weighted edges and through directed reentrancy-path edges defined by an explicit five-condition predicate; (2)conjunction pooling, a differentiable AND-aggregator over eight named exploit preconditions whose log-sigmoid form causes the per-function exploit score to collapse whenever any single mitigation (a reentrancy guard, an access-control modifier or SafeMath) is in place. Across five independent training runs, AttackPathGNN attains 92.3+/-0.2% F1 on the SmartBugs Wild held-out test partition (4.3+/-0.3% false-negative rate, 90.8+/-2.5% detection rate on the independently human-labelled SmartBugs Curated benchmark), recovering 6/10 DASP10 categories at 100% on every seed and Reentrancy at 98.7+/-1.8%. Each prediction is emitted with a structured remediation report, turning each verdict into an actionable, function-level audit finding.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 1 minor

Summary. The paper introduces AttackPathGNN, a GNN-based detector for Solidity smart-contract vulnerabilities that reframes the task as reasoning over explicit cross-function attack paths. It constructs a State Interference Graph connecting functions via typed weighted edges for shared mutable storage and directed reentrancy-path edges generated by an explicit five-condition predicate, then applies conjunction pooling (a differentiable AND aggregator over eight exploit preconditions) so that the per-function score collapses in the presence of any mitigation. On the SmartBugs Wild held-out partition the model reports 92.3±0.2% F1 (4.3±0.3% FNR) across five seeds and 90.8±2.5% detection on the human-labelled SmartBugs Curated set, recovering six of ten DASP10 categories at 100% and Reentrancy at 98.7±1.8%, while also emitting structured remediation reports.

Significance. If the State Interference Graph and conjunction pooling genuinely allow the model to reason over feasible attack paths rather than surface syntax, the work would constitute a substantive advance over prior single-function or purely syntactic detectors for multi-function exploits. The consistent reporting of means and standard deviations across five independent training runs is a methodological strength. However, the performance numbers rest on the unvalidated premise that the five-condition predicate correctly encodes real attack feasibility; absent that link, the architectural claims cannot be credited for the observed gains.

major comments (2)
  1. [Abstract / Graph Construction] Abstract (and the description of the State Interference Graph): the five-condition predicate that produces directed reentrancy-path edges is introduced without any independent validation against documented exploits (e.g., The DAO or Cream Finance). If the predicate omits real attack paths or adds spurious ones, the central claim that performance derives from explicit attack-path reasoning collapses.
  2. [Experimental Evaluation] Experimental section (implied by the reported metrics): no information is supplied on train/test splits, feature-construction details, hyper-parameter search procedure, or whether the five-condition predicate itself was tuned with knowledge of the test distribution. These omissions make it impossible to assess whether the 92.3±0.2% F1 and the per-category 100% recoveries are attributable to the proposed architecture or to experimental leakage.
minor comments (1)
  1. [Abstract] Abstract contains minor formatting issues (missing spaces after numbered items, e.g., “(1)a State Interference Graph”).

Simulated Author's Rebuttal

2 responses · 0 unresolved

Thank you for the constructive review. We address each major comment below, indicating where revisions will strengthen the manuscript and where we provide clarification.

read point-by-point responses
  1. Referee: [Abstract / Graph Construction] Abstract (and the description of the State Interference Graph): the five-condition predicate that produces directed reentrancy-path edges is introduced without any independent validation against documented exploits (e.g., The DAO or Cream Finance). If the predicate omits real attack paths or adds spurious ones, the central claim that performance derives from explicit attack-path reasoning collapses.

    Authors: We agree that independent validation of the five-condition predicate is required to support the claim that performance gains stem from explicit attack-path reasoning rather than incidental pattern matching. In the revised manuscript we will insert a dedicated subsection (in the graph-construction section) that maps each of the five conditions to the concrete exploit traces of The DAO and Cream Finance, showing which conditions are satisfied and which are not. We will also note any potential spurious edges and their measured effect on false-positive rate. revision: yes

  2. Referee: [Experimental Evaluation] Experimental section (implied by the reported metrics): no information is supplied on train/test splits, feature-construction details, hyper-parameter search procedure, or whether the five-condition predicate itself was tuned with knowledge of the test distribution. These omissions make it impossible to assess whether the 92.3±0.2% F1 and the per-category 100% recoveries are attributable to the proposed architecture or to experimental leakage.

    Authors: We acknowledge the current manuscript does not supply the requested experimental details. The revision will expand the Experimental Setup section with: (i) the precise construction of the SmartBugs Wild held-out partition and the train/validation/test ratios, (ii) the full feature-construction pipeline, (iii) the hyper-parameter search ranges, budget, and selection criterion, and (iv) an explicit statement that the five-condition predicate was derived from the literature prior to any test-set inspection and was never tuned on the test distribution. These additions will allow independent assessment of leakage risk. revision: yes

Circularity Check

0 steps flagged

No circularity; standard supervised GNN training and held-out evaluation

full rationale

The paper explicitly defines the State Interference Graph (typed weighted edges plus five-condition reentrancy predicate) and conjunction pooling as architectural choices, trains the model on labeled data, and evaluates F1, false-negative rate, and per-category detection on independent held-out partitions (SmartBugs Wild test and Curated benchmark). No equations, parameters, or claims reduce the reported metrics to inputs by construction, and no self-citation chains or uniqueness theorems are invoked. The derivation chain is therefore self-contained against external benchmarks.

Axiom & Free-Parameter Ledger

1 free parameters · 2 axioms · 1 invented entities

The central claim rests on the correctness of the five-condition reentrancy predicate and the assumption that conjunction pooling over the eight named preconditions faithfully models mitigation effects; both are introduced without independent verification outside the training data.

free parameters (1)
  • GNN model weights
    Learned parameters of the graph neural network trained on SmartBugs data.
axioms (2)
  • domain assumption The explicit five-condition predicate correctly identifies directed reentrancy paths between functions.
    Used to define the directed edges in the State Interference Graph.
  • domain assumption Conjunction pooling via log-sigmoid over eight preconditions collapses the exploit score exactly when any mitigation is present.
    Core of the differentiable AND-aggregator.
invented entities (1)
  • State Interference Graph no independent evidence
    purpose: Explicit graph linking functions that share mutable storage with typed weighted and reentrancy edges.
    New graph structure introduced to capture cross-function relationships.

pith-pipeline@v0.9.1-grok · 5821 in / 1545 out tokens · 26400 ms · 2026-06-28T00:46:34.752515+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

38 extracted references · 26 canonical work pages

  1. [1]

    Smashing Ethereum Smart Contracts for Fun and Real Profit

    B. Mueller, “Smashing Ethereum Smart Contracts for Fun and Real Profit.” [Online]. Available: https://github.com/muellerberndt/smashing-smart-contracts/blob/master/smashing-smart-contracts- 1of1.pdf

  2. [2]

    Securify: Practical security analysis of smart contracts,

    P. Tsankov, A. Dan, D. Drachsler-Cohen, A. Gervais, F. Bünzli, and M. Vechev, “Securify: Practical security analysis of smart contracts,” in Proceedings of the ACM Conference on Computer and Communications Security, 2018. doi: 10.1145/3243734.3243780

  3. [3]

    SmartCheck: Static analysis of ethereum smart contracts,

    S. Tikhomirov, E. Voskresenskaya, I. Ivanitskiy, R. Takhaviev, E. Marchenko, and Y. Alexandrov, “SmartCheck: Static analysis of ethereum smart contracts,” in Proceedings - International Conference on Software Engineering, 2018. doi: 10.1145/3194113.3194115

  4. [4]

    In: POST (2017).https://doi.org/10.1007/978-3-662-54455-6_8

    N. Atzei, M. Bartoletti, and T. Cimoli, “A survey of attacks on Ethereum smart contracts (SoK),” in Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2017. doi: 10.1007/978-3-662-54455-6_8

  5. [5]

    In: IEEE S&P (2023).https://doi.org/10.1109/SP46215.2023.10179435

    L. Zhou et al., “SoK: Decentralized Finance (DeFi) Attacks,” in Proceedings - IEEE Symposium on Security and Privacy, 2023. doi: 10.1109/SP46215.2023.10179435

  6. [6]

    Empirical review of automated analysis tools on 47,587 ethereum smart contracts,

    T. Durieux, J. F. Ferreira, R. Abreu, and P. Cruz, “Empirical review of automated analysis tools on 47,587 ethereum smart contracts,” in Proceedings - International Conference on Software Engineering, 2020. doi: 10.1145/3377811.3380364

  7. [7]

    Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detection,

    Z. Liu, P. Qian, X. Wang, Y. Zhuang, L. Qiu, and X. Wang, “Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detection,” IEEE Trans. Knowl. Data Eng., 2023, doi: 10.1109/TKDE.2021.3095196

  8. [8]

    Peculiar: Smart Contract Vulnerability Detection Based on Crucial Data Flow Graph and Pre-training Techniques,

    H. Wu et al., “Peculiar: Smart Contract Vulnerability Detection Based on Crucial Data Flow Graph and Pre-training Techniques,” in Proceedings - International Symposium on Software Reliability Engineering, ISSRE, 2021. doi: 10.1109/ISSRE52982.2021.00047

  9. [9]

    Charalambous, Liyi Zhou, Raghavendra Galanopoulou, Arthur Gervais, Dionysis Mitropoulos, and Benjamin Livshits

    S. Chaliasos et al., “Smart Contract and DeFi Security Tools: Do They Meet the Needs of Practitioners?,” in Proceedings - International Conference on Software Engineering, 2024. doi: 10.1145/3597503.3623302

  10. [10]

    Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks,

    M. Rodler, W. Li, G. O. Karame, and L. Davi, “Sereum: Protecting Existing Smart Contracts Against Re-Entrancy Attacks,” in 26th Annual Network and Distributed System Security Symposium, NDSS 2019, 2019. doi: 10.14722/ndss.2019.23413

  11. [11]

    Clairvoyance: Cross-contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts,

    J. Ye, M. Ma, Y. Lin, Y. Sui, and Y. Xue, “Clairvoyance: Cross-contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts,” in Proceedings - 2020 ACM/IEEE 42nd International Conference on Software Engineering: Companion, ICSE- Companion 2020, 2020. doi: 10.1145/3377812.3390908

  12. [12]

    Gutfleisch, J

    P. Bose, D. Das, Y. Chen, Y. Feng, C. Kruegel, and G. Vigna, “SAILFISH: Vetting Smart Contract State-Inconsistency Bugs in Seconds,” in Proceedings - IEEE Symposium on Security and Privacy, 2022. doi: 10.1109/SP46214.2022.9833721

  13. [13]

    Finding the greedy, prodigal, and suicidal contracts at scale,

    I. Nikolić, A. Kolluri, I. Sergey, P. Saxena, and A. Hobor, “Finding the greedy, prodigal, and suicidal contracts at scale,” in ACM International Conference Proceeding Series, 2018. doi: 10.1145/3274694.3274743

  14. [14]

    Smart contract vulnerabilities: Vulnerable does not imply exploited,

    D. Perez and B. Livshits, “Smart contract vulnerabilities: Vulnerable does not imply exploited,” in Proceedings of the 30th USENIX Security Symposium, 2021

  15. [15]

    ETainter: Detecting gas-related vulnerabilities in smart contracts,

    A. Ghaleb, J. Rubin, and K. Pattabiraman, “ETainter: Detecting gas-related vulnerabilities in smart contracts,” in ISSTA 2022 - Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, 2022. doi: 10.1145/3533767.3534378

  16. [16]

    Smart contract vulnerability detection using graph neural networks,

    Y. Zhuang, Z. Liu, P. Qian, Q. Liu, X. Wang, and Q. He, “Smart contract vulnerability detection using graph neural networks,” in IJCAI International Joint Conference on Artificial Intelligence,

  17. [17]

    doi: 10.24963/ijcai.2020/454

  18. [18]

    DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network,

    Z. Zhen, X. Zhao, J. Zhang, Y. Wang, and H. Chen, “DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network,” Comput. Networks, 2024, doi: 10.1016/j.comnet.2024.110238

  19. [19]

    HGAT: smart contract vulnerability detection method based on hierarchical graph attention network,

    C. Ma, S. Liu, and G. Xu, “HGAT: smart contract vulnerability detection method based on hierarchical graph attention network,” J. Cloud Comput., 2023, doi: 10.1186/s13677-023-00459-x

  20. [20]

    Spectral clustering with graph neural networks for graph pooling,

    F. M. Bianchi, D. Grattarola, and C. Alippi, “Spectral clustering with graph neural networks for graph pooling,” in 37th International Conference on Machine Learning, ICML 2020, 2020

  21. [21]

    Explainable expected goal models for performance analysis in football analytics , url =

    H. H. Nguyen et al., “MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities,” in Proceedings - 2022 IEEE 9th International Conference on Data Science and Advanced Analytics, DSAA 2022, 2022. doi: 10.1109/DSAA54385.2022.10032337

  22. [22]

    MANDO- GURU: vulnerability detection for smart contract source code by heterogeneous graph embeddings,

    H. H. Nguyen, N. M. Nguyen, H. P. Doan, Z. Ahmadi, T. N. Doan, and L. Jiang, “MANDO- GURU: vulnerability detection for smart contract source code by heterogeneous graph embeddings,” in ESEC/FSE 2022 - Proceedings of the 30th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering,

  23. [23]

    doi: 10.1145/3540250.3558927

  24. [24]

    Enhanced Smart Contract Vulnerability Detection via Graph Neural Networks: Achieving High Accuracy and Efficiency,

    C. Xu, H. Xu, L. Zhu, X. Shen, and K. Sharif, “Enhanced Smart Contract Vulnerability Detection via Graph Neural Networks: Achieving High Accuracy and Efficiency,” IEEE Trans. Softw. Eng., 2025, doi: 10.1109/TSE.2025.3570421

  25. [25]

    A smart contract vulnerability line detection method based on graph neural network and fusion of multidimensional code representation,

    X. Huanliang, W. Canghai, C. JiaXin, W. Yinglong, and Z. yulin, “A smart contract vulnerability line detection method based on graph neural network and fusion of multidimensional code representation,” Appl. Soft Comput., 2025, doi: 10.1016/j.asoc.2025.113435

  26. [26]

    GNNExplainer: Generating explanations for graph neural networks,

    R. Ying, D. Bourgeois, J. You, M. Zitnik, and J. Leskovec, “GNNExplainer: Generating explanations for graph neural networks,” in Advances in Neural Information Processing Systems, 2019

  27. [27]

    On Explainability of Graph Neural Networks via Subgraph Explorations,

    H. Yuan, H. Yu, J. Wang, K. Li, and S. Ji, “On Explainability of Graph Neural Networks via Subgraph Explorations,” in Proceedings of Machine Learning Research, 2021

  28. [28]

    Graph-based explainable vulnerability prediction,

    H. Q. Nguyen, T. Hoang, H. K. Dam, and A. Ghose, “Graph-based explainable vulnerability prediction,” Inf. Softw. Technol., 2025, doi: 10.1016/j.infsof.2024.107566

  29. [29]

    Logic tensor networks for semantic image interpretation,

    I. Donadello, L. Serafini, and A. D’Avila Garcez, “Logic tensor networks for semantic image interpretation,” in IJCAI International Joint Conference on Artificial Intelligence, 2017. doi: 10.24963/ijcai.2017/221

  30. [30]

    Neural probabilistic logic programming in DeepProbLog,

    R. Manhaeve, S. Dumančić, A. Kimmig, T. Demeester, and L. De Raedt, “Neural probabilistic logic programming in DeepProbLog,” Artif. Intell., 2021, doi: 10.1016/j.artint.2021.103504

  31. [31]

    Logical Neural Networks,

    R. Riegel et al., “Logical Neural Networks,” 2020. [Online]. Available: https://arxiv.org/abs/2006.13155

  32. [32]

    Analyzing Differentiable Fuzzy Logic Operators,

    E. van Krieken, E. Acar, and F. van Harmelen, “Analyzing Differentiable Fuzzy Logic Operators,” Artif. Intell., 2022, doi: 10.1016/j.artint.2021.103602

  33. [33]

    Automated Vulnerability Detection in Source Code Using Deep Representation Learning,

    C. Seas, G. Fitzpatrick, J. A. Hamilton, and M. C. Carlisle, “Automated Vulnerability Detection in Source Code Using Deep Representation Learning,” in 2024 IEEE 14th Annual Computing and Communication Workshop and Conference, CCWC 2024, 2024. doi: 10.1109/CCWC60891.2024.10427574

  34. [34]

    Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks,

    Y. Zhou, S. Liu, J. Siow, X. Du, and Y. Liu, “Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks,” in Advances in Neural Information Processing Systems, 2019

  35. [35]

    LineVul: A Transformer-based Line-Level Vulnerability Prediction,

    M. Fu and C. Tantithamthavorn, “LineVul: A Transformer-based Line-Level Vulnerability Prediction,” in Proceedings - 2022 Mining Software Repositories Conference, MSR 2022, 2022. doi: 10.1145/3524842.3528452

  36. [36]

    HOW ATTENTIVE ARE GRAPH ATTENTION NETWORKS?,

    S. Brody, U. Alon, and E. Yahav, “HOW ATTENTIVE ARE GRAPH ATTENTION NETWORKS?,” in ICLR 2022 - 10th International Conference on Learning Representations, 2022

  37. [37]

    Semi-supervised classification with graph convolutional networks,

    T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in 5th International Conference on Learning Representations, ICLR 2017 - Conference Track Proceedings, 2017

  38. [38]

    Decoupled weight decay regularization,

    I. Loshchilov and F. Hutter, “Decoupled weight decay regularization,” in 7th International Conference on Learning Representations, ICLR 2019, 2019