Mar 21, 2026
Structural Code Monitors: Graph Matching Networks on Code Property Graphs for Topology-Aware Trusted Monitoring
tanzeel shaikh, shubham gupta
We built a non-LLM trusted monitor that compares Code Property Graphs of untrusted code against trusted references
using a Graph Matching Network with cross-graph attention. On 200 trajectories from Apps-Control-Arena, our
0.7M-parameter GNN achieves 0.946 AUC and 70% recall at the 2% FPR audit budget. Even when LLMs receive the same
reference code (diff-based prompt), their false positive rates spike to 46%, making them unusable at low FPR
thresholds. The GNN's structural pooling separates localized backdoor insertions from algorithmic differences — a
distinction text-based monitors cannot make. Cross-graph attention weights additionally produce node-level audit
trails identifying which code lines triggered detection.
No reviews are available yet
Cite this work
@misc {
title={
(HckPrj) Structural Code Monitors: Graph Matching Networks on Code Property Graphs for Topology-Aware Trusted Monitoring
},
author={
tanzeel shaikh, shubham gupta
},
date={
3/21/26
},
organization={Apart Research},
note={Research submission to the research sprint hosted by Apart.},
howpublished={https://apartresearch.com}
}


