Top

Gated Graph Neural Network for Concurrent Program Deadlock Prediction with Lock-Order Contrastive Learning

Authors

Files

PDF

Abstract

Concurrent programs with similar lock counts can have different circular-wait outcomes because ownership, pending requests and acquisition order differ. This study evaluates a gated graph neural network for eight-attempt deadlock warning from observed execution prefixes. Threads and mutexes are typed nodes, and six directed relation channels represent ownership, requests and historical lock order with reverse edges. Three gated propagation steps form a graph descriptor, while supervised contrastive training aligns topology-preserving views with the same future-outcome class. Validation selects the checkpoint, probability temperature and warning threshold. An executable mutex-program harness generates 900 scheduling episodes from 90 configurations in six synchronization families. The resulting 23,018 observation windows are partitioned by program configuration, with 54 configurations for training and 18 each for validation and testing. The main held-out model has AUROC 0.9427, area under the precision-recall curve 0.4647 and window-level F1 0.6053. Its positive-window recall is 0.6623 and false-positive rate is 0.0164 at the selected threshold. Among eligible terminal episodes, detection reaches 87.50% with median detected lead of five scheduling attempts. An ungated comparison has higher precision-recall area of 0.5114 but lower F1 of 0.5521. Main-run temperature scaling changes Brier score from 0.01890 to 0.01894 and calibration error from 0.00847 to 0.01004. Relational erasure and a changed scheduler reduce precision-recall performance, bounding the reliability of warnings to observed graph quality and tested scheduling conditions.

PDF

References

Fudholi, D. R., & Capiluppi, A. (2026). Artificial intelligence for source code understanding tasks: A systematic mapping study. Information and Software Technology, 189, 107915. https://doi.org/10.1016/j.infsof.2025.107915 DOI: https://doi.org/10.1016/j.infsof.2025.107915

Saioc, G.-V., Lee, I.-T. A., Møller, A., & Chabbi, M. (2025). Dynamic partial deadlock detection and recovery via garbage collection. In Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2 (pp. 244–259). https://doi.org/10.1145/3676641.3715990 DOI: https://doi.org/10.1145/3676641.3715990

Khoshraftar, S., & An, A. (2024). A survey on graph representation learning methods. ACM Transactions on Intelligent Systems and Technology, 15(1), Article 19, 1–55. https://doi.org/10.1145/3633518 DOI: https://doi.org/10.1145/3633518

Hu, H., Wang, X., Zhang, Y., Chen, Q., & Guan, Q. (2024). A comprehensive survey on contrastive learning. Neurocomputing, 610, 128645. https://doi.org/10.1016/j.neucom.2024.128645 DOI: https://doi.org/10.1016/j.neucom.2024.128645

Liang, C., Wei, Q., Du, J., Wang, Y., & Jiang, Z. (2025). Survey of source code vulnerability analysis based on deep learning. Computers & Security, 148, 104098. https://doi.org/10.1016/j.cose.2024.104098 DOI: https://doi.org/10.1016/j.cose.2024.104098

Muller, S. K. (2024). Language-agnostic static deadlock detection for futures. In Proceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming (pp. 68–79). https://doi.org/10.1145/3627535.3638487 DOI: https://doi.org/10.1145/3627535.3638487

Lones, M. A. (2024). Avoiding common machine learning pitfalls. Patterns, 5(10), 101046. https://doi.org/10.1016/j.patter.2024.101046 DOI: https://doi.org/10.1016/j.patter.2024.101046

Chen, W., Yang, K., Yu, Z., Shi, Y., & Chen, C. L. P. (2024). A survey on imbalanced learning: Latest research, applications and future directions. Artificial Intelligence Review, 57, 137. https://doi.org/10.1007/s10462-024-10759-6 DOI: https://doi.org/10.1007/s10462-024-10759-6

Dong, J., Jiang, Z., Pan, D., Chen, Z., Guan, Q., Zhang, H., Gui, G., & Gui, W. (2025). A survey on confidence calibration of deep learning-based classification models under class imbalance data. IEEE Transactions on Neural Networks and Learning Systems, 36(9), 15664–15684. https://doi.org/10.1109/TNNLS.2025.3565159 DOI: https://doi.org/10.1109/TNNLS.2025.3565159

Rowicki, R. J., Francalanza, A., & Scalas, A. (2025). Correct black-box monitors for distributed deadlock detection: Formalisation and implementation. Proceedings of the ACM on Programming Languages, 9(OOPSLA2), 527–554. https://doi.org/10.1145/3763069 DOI: https://doi.org/10.1145/3763069

McLaughlin, C., & Lu, Y. (2024). Multi-class vulnerability prediction using value flow and graph neural networks. Neural Computing and Applications, 36(25), 15869–15891. https://doi.org/10.1007/s00521-024-09819-3 DOI: https://doi.org/10.1007/s00521-024-09819-3

Khemani, B., Patil, S., Kotecha, K., & Tanwar, S. (2024). A review of graph neural networks: Concepts, architectures, techniques, challenges, datasets, applications, and future directions. Journal of Big Data, 11, 18. https://doi.org/10.1186/s40537-023-00876- DOI: https://doi.org/10.1186/s40537-023-00876-4

Outemzabet, L., Gaud, N., Bertaux, A., Nicolle, C., Gerart, S., & Vachenc, S. (2024). Harnessing heterogeneous information networks: A systematic literature review. Computer Science Review, 52, 100633. https://doi.org/10.1016/j.cosrev.2024.100633 DOI: https://doi.org/10.1016/j.cosrev.2024.100633

Xu, Y., Wang, J., Guang, M., Yan, C., & Jiang, C. (2024). Graph contrastive learning with min-max mutual information. Information Sciences, 665, 120378. https://doi.org/10.1016/j.ins.2024.120378 DOI: https://doi.org/10.1016/j.ins.2024.120378

Xia, R., Liu, H., Li, A., Liu, X., Zhang, Y., Zhang, C., & Yang, B. (2025). Incomplete graph learning: A comprehensive survey. Neural Networks, 190, 107682. https://doi.org/10.1016/j.neunet.2025.107682 DOI: https://doi.org/10.1016/j.neunet.2025.107682

Beam, C. (2025). Resolving power: A general approach to compare the distinguishing ability of threshold-free evaluation metrics. Machine Learning, 114, 9. https://doi.org/10.1007/s10994-024-06723-8 DOI: https://doi.org/10.1007/s10994-024-06723-8

Balanya, S. A., Maroñas, J., & Ramos, D. (2024). Adaptive temperature scaling for robust calibration of deep neural networks. Neural Computing and Applications, 36(14), 8073–8095. https://doi.org/10.1007/s00521-024-09505-4 DOI: https://doi.org/10.1007/s00521-024-09505-4

Zhang, K., Liu, S., Wang, S., Shi, W., Chen, C., Li, P., Li, S., Li, J., & Ding, K. (2026). A survey of deep graph learning under distribution shifts: From graph out-of-distribution generalization to adaptation. ACM Transactions on Knowledge Discovery from Data, 20(2), Article 31, 1–38. https://doi.org/10.1145/3785475 DOI: https://doi.org/10.1145/3785475

Zhang, S., Sohrabizadeh, A., Wan, C., Huang, Z., Hu, Z., Wang, Y., Lin, Y., Cong, J., & Sun, Y. (2026). A survey on graph neural network acceleration: Algorithms, systems, and customized hardware. ACM Computing Surveys, 58(11), Article 285, 1–36. https://doi.org/10.1145/3805796 DOI: https://doi.org/10.1145/3805796

Sasse, L., Nicolaisen-Sobesky, E., Dukart, J., Eickhoff, S. B., Götz, M., Hamdan, S., Komeyer, V., Kulkarni, A., Lahnakoski, J. M., Love, B. C., Raimondo, F., & Patil, K. R. (2025). Overview of leakage scenarios in supervised machine learning. Journal of Big Data, 12, 135. https://doi.org/10.1186/s40537-025-01193-8 DOI: https://doi.org/10.1186/s40537-025-01193-8

Allgaier, J., & Pryss, R. (2024). Cross-validation visualized: A narrative guide to advanced methods. Machine Learning and Knowledge Extraction, 6(2), 1378–1388. https://doi.org/10.3390/make6020065 DOI: https://doi.org/10.3390/make6020065

Li, Z.-P., Wang, S.-G., Zhang, Q.-H., Pan, Y.-J., Xiao, N.-A., Guo, J.-Y., Yuan, C.-A., Liu, W.-J., & Huang, D.-S. (2025). Graph pooling for graph-level representation learning: A survey. Artificial Intelligence Review, 58, 45. https://doi.org/10.1007/s10462-024-10949-2 DOI: https://doi.org/10.1007/s10462-024-10949-2

Zhao, H., Wolff, D., Mathur, U., & Roychoudhury, A. (2025). Selectively uniform concurrency testing. In Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1 (pp. 1003–1019). https://doi.org/10.1145/3669940.3707214 DOI: https://doi.org/10.1145/3669940.3707214

Ghorbani, R., Reinders, M. J. T., & Tax, D. M. J. (2024). PATE: Proximity-aware time series anomaly evaluation. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (pp. 872–883). https://doi.org/10.1145/3637528.3671971 DOI: https://doi.org/10.1145/3637528.3671971

Yahya, M. A., Moya, A. R., & Ventura, S. (2025). Deep learning for multivariate time series anomaly detection: An evaluation of reconstruction-based methods. Artificial Intelligence Review, 58(12), 400. https://doi.org/10.1007/s10462-025-11401-9 DOI: https://doi.org/10.1007/s10462-025-11401-9

Altalhan, M., Algarni, A., & Turki-Hadj Alouane, M. (2025). Imbalanced data problem in machine learning: A review. IEEE Access, 13, 13686–13699. https://doi.org/10.1109/ACCESS.2025.3531662 DOI: https://doi.org/10.1109/ACCESS.2025.3531662

Sujon, K. M., Hassan, R., Choi, K., & Samad, M. A. (2025). Accuracy, precision, recall, f1-score, or MCC? Empirical evidence from advanced statistics, ML, and XAI for evaluating business predictive models. Journal of Big Data, 12, 268. https://doi.org/10.1186/s40537-025-01313-4 DOI: https://doi.org/10.1186/s40537-025-01313-4

Semmelrock, H., Ross-Hellauer, T., Kopeinik, S., Theiler, D., Haberl, A., Thalmann, S., & Kowald, D. (2025). Reproducibility in machine-learning-based research: Overview, barriers, and drivers. AI Magazine, 46(2), e70002. https://doi.org/10.1002/aaai.70002 DOI: https://doi.org/10.1002/aaai.70002

Lane, R. O. (2026). A comprehensive review of classifier probability calibration metrics. Data Science, 9(1), 24518492261436231. https://doi.org/10.1177/24518492261436231 DOI: https://doi.org/10.1177/24518492261436231

Feng, S., Jing, B., Zhu, Y., & Tong, H. (2024). ArieL: Adversarial graph contrastive learning. ACM Transactions on Knowledge Discovery from Data, 18(4), Article 82, 1–22. https://doi.org/10.1145/3638054 DOI: https://doi.org/10.1145/3638054

Du, H., Li, X., & Shao, M. (2025). Graph out-of-distribution generalization through contrastive learning paradigm. Knowledge-Based Systems, 315, 113316. https://doi.org/10.1016/j.knosys.2025.113316 DOI: https://doi.org/10.1016/j.knosys.2025.113316

Li, Z., Paolieri, M., & Golubchik, L. (2024). A benchmark for ML inference latency on mobile devices. In Proceedings of the 7th International Workshop on Edge Systems, Analytics and Networking (pp. 31–36). https://doi.org/10.1145/3642968.3654818 DOI: https://doi.org/10.1145/3642968.3654818

Mejri, N., Lopez-Fuentes, L., Roy, K., Chernakov, P., Ghorbel, E., & Aouada, D. (2024). Unsupervised anomaly detection in time-series: An extensive evaluation and analysis of state-of-the-art methods. Expert Systems with Applications, 256, 124922. https://doi.org/10.1016/j.eswa.2024.124922 DOI: https://doi.org/10.1016/j.eswa.2024.124922

Cai, H. (2025). A survey of program analysis for distributed software systems. ACM Computing Surveys, 57(12), Article 300, 1–45. https://doi.org/10.1145/3742900 DOI: https://doi.org/10.1145/3742900

Ge, X., Fang, C., Li, X., Sun, W., Wu, D., Zhai, J., Lin, S.-W., Zhao, Z., Liu, Y., & Chen, Z. (2025). Machine learning for actionable warning identification: A comprehensive survey. ACM Computing Surveys, 57(2), Article 39, 1–35. https://doi.org/10.1145/3696352 DOI: https://doi.org/10.1145/3696352

Details