# Deep Learning Based Concurrency Bug Detection and Localization

**Authors:** Zuocheng Feng, Kaiwen Zhang, Miaomiao Wang, Yiming Cheng, Yuandao Cai, Xiaofeng Li, Guanjun Liu

arXiv: 2508.20911 · 2025-08-29

## TL;DR

This paper introduces a deep learning approach for detecting and localizing concurrency bugs in software, utilizing a new dataset, a specialized graph neural network, and interpretability techniques to improve accuracy and debugging precision.

## Contribution

It presents a novel concurrency bug detection and localization method combining a dedicated dataset, a GNN with a new code graph, and interpretability for precise bug localization.

## Key findings

- 10% improvement in accuracy and precision
- 26% improvement in recall
- Effective bug localization to specific code lines

## Abstract

Concurrency bugs, caused by improper synchronization of shared resources in multi-threaded or distributed systems, are notoriously hard to detect and thus compromise software reliability and security. The existing deep learning methods face three main limitations. First, there is an absence of large and dedicated datasets of diverse concurrency bugs for them. Second, they lack sufficient representation of concurrency semantics. Third, binary classification results fail to provide finer-grained debug information such as precise bug lines. To address these problems, we propose a novel method for effective concurrency bug detection as well as localization. We construct a dedicated concurrency bug dataset to facilitate model training and evaluation. We then integrate a pre-trained model with a heterogeneous graph neural network (GNN), by incorporating a new Concurrency-Aware Code Property Graph (CCPG) that concisely and effectively characterizes concurrency semantics. To further facilitate debugging, we employ SubgraphX, a GNN-based interpretability method, which explores the graphs to precisely localize concurrency bugs, mapping them to specific lines of source code. On average, our method demonstrates an improvement of 10\% in accuracy and precision and 26\% in recall compared to state-of-the-art methods across diverse evaluation settings.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/2508.20911/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/2508.20911/full.md

## References

40 references — full list in the complete paper: https://tomesphere.com/paper/2508.20911/full.md

---
Source: https://tomesphere.com/paper/2508.20911