Kaiwen Zhang

Mr. Kaiwen Zhang


Research Focus & Metrics

Academic Career Length

4Years (2023-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
22 August 2023 in IEEE Transactions on Intelligent Vehicles
Verified
Journal Article
Closed access
SCShutong Chen
Shutong Chen
GLGuanjun Liu
Guanjun Liu
ZZZiyuan Zhou
Ziyuan Zhou
KZKaiwen Zhang
Kaiwen Zhang
JWJiacun Wang
Jiacun Wang
A control system of multiple unmanned aerial vehicles (multi-UAV) is generally very complex when they complete a task in a closely-cooperative manner, e.g. two UAVs cooperatively transport a package of goods. Multi-agent reinforcement learning (MARL) offers a promising solution for such a complex control. However, MARL heavily relies on trial-and-error explorations, facing a big challenge in gathering real-world training data. Simulation environments are commonly used to overcome this challenge, i.e., a control policy is trained in a simulation environment and then transferred into a real-world system. But there often exists a gap between simulation and reality and thus a successful transfer is not guaranteed easily. The domain randomization method provides a workable way to bridge this gap. Nevertheless, the traditional one used in a policy training often suffers from slow convergence and results in an unstable decision policy. To address these issues, this paper proposes an adversarial domain randomization method. It utilizes an adversarial generator as a “nature player” to generate a more reasonable training environment so that the trained decision policy can deal with complex situations. Additionally, we improve the prioritized experience replay method by which we can sample those critical experiences, increasing the convergence speed of a training without decreasing the performance of the trained policy. We apply our method to a real-world task of dual-UAV cooperative transportation, and experiments illustrate its effectiveness compared to traditional ones.

16 October 2023 in IEEE Transactions on Intelligent Vehicles
Verified
Journal Article
Closed access
JXJun Xue
Jun Xue
ZLZiniu Liu
Ziniu Liu
GLGuanjun Liu
Guanjun Liu
ZZZiyuan Zhou
Ziyuan Zhou
KZKaiwen Zhang
Kaiwen Zhang
JWJiacun Wang
Jiacun Wang
Unmanned Aerial Vehicles (UAVs) have extensive applications such as logistics transportation and aerial photography. However, UAVs are sensitive to winds. Traditional control methods, such as proportional- integral-derivative controllers, generally fail to work well when the strength and direction of winds are changing frequently. In this work deep reinforcement learning algorithms are combined with a domain randomization method to learn robust wind-resistant hovering policies. A novel reward function is designed to guide learning. This reward function uses a constant reward to maintain a continuous flight of a UAV as well as a weight of the horizontal distance error to ensure the stability of the UAV at altitude. A five-dimensional representation of actions instead of the traditional four dimensions is designed to strengthen the coordination of wings of a UAV. We theoretically explain the rationality of our reward function based on the theories of Q-learning and reward shaping. Experiments in the simulation and real-world application both illustrate the effectiveness of our method. To the best of our knowledge, it is the first paper to use reinforcement learning and domain randomization to explore the problem of robust wind-resistant hovering control of quadrotor UAVs, providing a new way for the study of wind-resistant hovering and flying of UAVs.

15 December 2025 in Future Internet
Verified
Journal Article
Open access
PDF file
ZFZuocheng Feng
Zuocheng Feng
YCYiming Chen
Yiming Chen
KZKaiwen Zhang
Kaiwen Zhang
XLXiaofeng Li
Xiaofeng Li
GLGuanjun Liu
Guanjun Liu
Concurrency bugs originate from complex and improper synchronization of shared resources, presenting a significant challenge for detection. Traditional static analysis relies heavily on expert knowledge and frequently fails when code is non-compilable. Conversely, large language models struggle with semantic sparsity, inadequate comprehension of concurrent semantics, and the tendency to hallucinate. To address the limitations of static analysis in capturing complex concurrency semantics and the hallucination risks associated with large language models, this study proposes ConSynergy. This novel framework integrates the structural rigor of static analysis with the semantic reasoning capabilities of large language models. The core design employs a robust task decomposition strategy that decomposes concurrency bug detection into a four-stage pipeline: shared resource identification, concurrency-aware slicing, data-flow reasoning, and formal verification. This approach fundamentally mitigates hallucinations from large language models caused by insufficient program context. First, the framework identifies shared resources and applies a concurrency-aware program slicing technique to precisely extract concurrency-related structural features, thereby alleviating semantic sparsity. Second, to enhance the large language model’s comprehension of concurrent semantics, we design a concurrency data-flow analysis based on Chain-of-Thought prompting. Third, the framework incorporates a Satisfiability Modulo Theories solver to ensure the reliability of detection results, alongside an iterative repair mechanism based on large language models that dramatically reduces dependency on code compilability. Extensive experiments on three mainstream concurrency bug datasets, including DataRaceBench, the concurrency subset of Juliet, and DeepRace, demonstrate that ConSynergy achieves an average precision and recall of 80.0% and 87.1%, respectively. ConSynergy outperforms state-of-the-art baselines by 10.9% to 68.2% in average F1 score, demonstrating significant potential for practical application.

28 August 2025 in arXiv
Verified
Preprint
Open access
PDF file
ZFZuocheng Feng
Zuocheng Feng
KZKaiwen Zhang
Kaiwen Zhang
MWMiaomiao Wang
Miaomiao Wang
YCYiming Cheng
Yiming Cheng
YCYuandao Cai
Yuandao Cai
GLGuanjun Liu
Guanjun Liu
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.

3 October 2026 in ACM Transactions on Autonomous and Adaptive Systems
Verified
Journal Article
Open access
KZKaiwen Zhang
Kaiwen Zhang
GLGuanjun Liu
Guanjun Liu
Rust's memory safety guarantees, notably ownership and lifetime systems, have driven its widespread adoption. Concurrency bugs still occur in Rust programs, and existing detection approaches exhibit significant limitations: static analyzers suffer from context insensitivity and high false positives, while dynamic methods incur prohibitive runtime costs due to exponential path exploration. This paper presents a Petri net-based method for detecting Rust concurrency bugs from Rust's compiler-derived Mid-level Intermediate Representation (MIR), restricted to the concurrency-relevant operations needed by the target bug classes. The method rests on three pillars: (1) A syntax-directed program-to-Petri-net transformation tailored for target bug classes; (2) Witness-preserving state compression via context-aware slicing; (3) Bug detection through efficient Petri net reachability analysis. The core innovation is its control-flow-driven modeling of Rust synchronization primitives and ownership-relevant resource lifecycles within the Petri net structure, with concurrency-relevant operations represented as token movements. Integrated pointer analysis automates alias identification during transformation. Experiments on Rust concurrency benchmarks show that the proposed analysis improves over LockBud in precision and over Miri in path coverage or runtime on the evaluated cases. Compared to LockBud, our approach reduces false positives by 35.7% and false negatives by 28.3% through flow-sensitive alias-aware resource binding. Compared with Miri, which is a dynamic analysis tool, our reachability-based method avoids repeated schedule execution and is substantially faster on several benchmark cases.