MCP
SW

Shaowei Wang

107 papers in the library

Papers

30
Test-Centric Code Generation: Enhancing Test Diversity, Reliability, and Utilization
Chaohang WenZhao TianShiqi KuangChaofan TaoShaowei WangXiaohui LiHaoli BaiLifeng ShangJunjie Chen
The paper proposes TCG, a test-centric code generation framework that addresses the limited correctness, diversity, and use of automatically generated tests in test-driven code generation. TCG combines three components: Diverse Test Generation, which merges unit tests with property-based tests for broader behavioral coverage; Reliable Test Curation, which uses syntax checking and execution-based cross-validation to identify reliable tests; and Test-Centric Code Generation, which incorporates test information into requirement understanding, verification, and fault repair. Evaluated with three representative LLMs across six function- and repository-level benchmarks against nine baselines, TCG consistently outperforms all applicable baselines in 18 settings, with average Pass@1 gains of 6.63% to 25.59%.
arXivarXiv · · December 3, 2026
0
LegoReview: Scaling Code Review Data with Verification from Pull Request Histories
Ruoyu WangJierun ChenYuxin JiangChaofan TaoShaowei WangSidi YangConghao XiongYiming DuTiezheng YuKim-Hui YapLifeng ShangXiao-Hui Li  +1
LegoReview exploits an implicit verification signal in pull request histories—discussions, code revisions, and other actions reveal which review findings were accepted or fixed and which were withdrawn or rejected—to construct verifiable review tasks and verify training trajectories, since open-ended natural-language findings cannot be checked by running tests. Reconstructing reviewed code snapshots from merged GitHub PRs, the pipeline yields 168k tasks and 60k verified trajectories from 556k merged PRs across eight languages and eight finding categories. Fine-tuning Qwen3.5-35B-A3B-Base on 1k verified trajectories raises F1 from 5.7 to 43.1 on the proposed LegoReview-Bench, and 60k raises it to 56.1; joint training with review trajectories also improves coding-task scores over coding-only training, from 26.5 to 31.9 on DeepSWE and 62.8 to 70.6 on SWE-bench Pro V2 Hard.
arXivarXiv · · December 1, 2026
0
FineCR: A Fine-Grained Benchmark for Evaluating LLMs on Raising Code Review and its Resolution
Taufiqul Islam KhanShaowei WangHaoxiang ZhangMuhammad Asaduzzaman
FineCR is a fine-grained benchmark that evaluates LLMs on two code-review tasks using the same review comments. It contains 500 manually verified actionable comments from 240 real pull requests across 10 Python repositories in SWE-bench, grouped into 349 instances; each comment is labeled with one of 14 fine-grained criteria from industry review guidelines and traced to its resolution commit. Comment generation is scored by an issue-level LLM-as-a-Judge and resolution by the Review-Requirement Satisfaction Judge (RRSJ). Testing GPT-5.6 Luna, Qwen3-Coder-30B-A3B and Qwen3.5-9B, all three raise every reviewer issue far less often (45.8%, 25.8%, 26.4% of instances) than their patches are judged correct (86.0%, 57.3%, 46.4%); across criteria they most often request tests but rarely notice existing tests that do not verify the intended behavior.
arXivarXiv · · December 1, 2026
0
Morphology-Decoupled Segmentation for Multiple Tunnel Defects Under Complex Environments
Mohan RenHang LiYifei LiuShaowei WangJames O'KaneXuanzhi WangShiyu ZhaoYumeng ZhangSongtao JiJurij Karlovsek
This paper proposes Morphology-Decoupled Segmentation (MDS), which makes defect morphology the organizing principle for feature routing, decoding, and interaction in tunnel-lining inspection. A supervised routing module splits multiscale encoder features into linear and areal streams: Deformable Strip Attention with image-conditioned direction hypotheses preserves crack continuity without fixed orientations, while Pyramid Pooling with feature-pyramid fusion captures diffuse boundaries and regional context. Gated cross-morphology attention couples the streams, and resolution-adaptive tiling preserves fine defects across variable-resolution imagery. MDS reaches 81.17% mIoU on internal validation and improves foreground image-level recognition over a backbone-matched SegDINO, mainly for areal defects; ablations show complementary contributions of routing supervision and cross-stream interaction but a trade-off between areal-class performance and crack specialization. It scored 67.55% mIoU on the hidden test (second place), and selective dynamic INT8 quantisation cut storage 2.83 times with negligible accuracy loss.
arXivarXiv · · November 15, 2026
0
Typify: A Tool for Usage-driven Type Inference in Python
Hassan AmanAli AmanMuhammad AsaduzzamanShaowei WangJessica Chen
Typify is a lightweight, usage-driven static type inference engine that infers precise types across entire Python projects without needing annotations or training data. It combines symbolic execution, fixpoint analysis, and context-matching retrieval to propagate types across modules, functions, and recursive call structures, and is offered as both a command-line interface for batch inference and downstream integration and a VS Code extension for interactive type assistance. On the ManyTypes4Py and Typilus datasets, Typify outperforms all static baselines and closely matches state-of-the-art hybrid deep learning approaches while running approximately 10x faster.
arXivarXiv · · November 11, 2026
0
TestGRAD: Evolving Test Suites via Failure Pattern Momentum for SWE-Agent Ensemble
Pengfei HeJiayuan ZhouShaowei WangRuiqi Pan
TestGRAD formulates test-based patch selection for SWE-agent ensembles as test-space optimization, evolving a repository test suite until it distinguishes competing patches. It introduces three concepts: a differential loss giving an explicit execution-defined target where useful tests separate candidates by behavior; full CRUD gradients expanding updates to include reading existing tests and updating stale assertions; and Failure Pattern Momentum mining frequent failure sequences to avoid repeated non-discriminative directions. On SWE-bench Verified, TestGRAD achieves 84.2% Pass@1 with a 4-agent ensemble, outperforming the strongest baseline by 3.6 percentage points while compressing failure-history context by over $100\times$.
arXivarXiv · · October 7, 2026
0
0
Beyond Tokens: Semantic-Aware Speculative Decoding for Efficient Inference by Probing Internal States
Ximing DongShaowei WangDayi LinBoyuan ChenAhmed E. Hassan
Large Language Models (LLMs) achieve strong performance across many tasks but suffer from high inference latency due to autoregressive decoding. The issue is exacerbated in Large Reasoning Models (LRMs), which generate lengthy chains of thought. While speculative decoding accelerates inference by drafting and verifying multiple tokens in parallel, existing methods operate at the token level and ignore semantic equivalence (i.e., different token sequences expressing the same meaning), leading to inefficient rejections. We propose SemanticSpec, a semantic-aware speculative decoding framework that verifies entire semantic sequences instead of tokens. SemanticSpec introduces a semantic probability estimation mechanism that probes the model’s internal hidden states to assess the likelihood of generating sequences with specific meanings. Experiments on four benchmarks show that SemanticSpec achieves up to 2.7× speedup on DeepSeekR1-32B and 2.1× on QwQ-32B, consistently outperforming token-level and sequence-level baselines in both efficiency and effectiveness.
ACL AnthologyACL Anthology · October 2026
0
LEGO-RL: Harness-Native Reinforcement Learning for Coding Agents
Yiming DuYuxin JiangTao YuanJianbo DaiShaowei WangJierun ChenChaofan TaoXianzhi YuLifeng ShangKam-Fai WongXiaohui LiHaoli Bai
LEGO-RL is a framework that aligns native coding-agent harnesses with policy-gradient reinforcement learning without modifying internal control flow. It addresses misalignment from environment crashes and reward hacking through three components: in-process LLM proxying for faithful token-level gradient computation, scalable sandbox orchestration with defenses against reward hacking, and an integrated monitoring plugin. Training Qwen3.5-35B-A3B with GSPO across three harnesses, LEGO-RL improves SWE-bench Verified scores (e.g., from 64.0% to 70.4% on OpenHands SDK) while maintaining rollout-training probability correlation above 0.99.
arXivarXiv · · August 18, 2026
0
8
A unified reconstruction algorithm for reduced-frame structured illumination microscopy
Jingxiang ZhangTianyu ZhaoManming ShuKeru MouZheming ZhangYihan SunMengrui WangYansheng LiangShaowei WangMing Lei
URA-SIM unifies reduced-frame structured illumination microscopy reconstruction by performing phase-domain completion on the low-dimensional harmonic manifold required by the target modality, then delegating order separation and image formation to the standard pipeline. This avoids solving a large object-level inverse problem while maintaining model consistency. For 2D-SIM, it uses three-phase first-harmonic structure to estimate a shared zero-order field and complete missing phases via direction-wise harmonic fitting. Reconstructions from five raw frames per time point resolve mitochondrial cristae in live COS7 cells, and the design transfers to 3D-SIM and nonlinear SIM.
arXivarXiv · · August 13, 2026
0
Robust Estimation of Sparse Numerical Vectors under Local Differential Privacy
Puning ZhaoZhikun ZhangShaowei WangSheng YueBangzhou XinTianhang ZhengPengfei ZhangXiaochun Cao
This paper proposes Randomized Projection with Clipping (RPC) for robustly estimating the mean of sparse numerical vectors under local differential privacy when each user holds multiple items. The server sends a random binary vector to each user, who projects its $m$-nonzero vector onto it and clips the result to limit attack impact. The authors derive an exact expression of the clipping bias, eliminating the bias-variance tradeoff and allowing a smaller threshold for stronger robustness. Theoretical guarantees hold under all possible attacks, and experiments show RPC matches or outperforms existing methods in trusted settings and is significantly more robust to poisoning.
arXivarXiv · · July 30, 2026
0
0
MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesis
Yihao ChenShi ChangKhaled ChawaFeng LinBoyuan ChenShaowei WangAhmed E. Hassan
MindForge is an automated pipeline that converts open-source command-line programs into source-free environments exposing only a compiled reference executable and its documentation, enabling scalable training for whole-life-cycle software engineering from scratch. Using it, training environments are built from repositories disjoint from ProgramBench, and program synthesis trajectories from GLM-5.2 are used to fine-tune Qwen3.6-27B, increasing its ProgramBench average test pass rate from 37.98% to 49.51% and yielding consistent gains across seven unseen benchmarks.
arXivarXiv · · July 29, 2026
0
1
SpecFirst: Behavioral Specification Elicitation as a First-Class Step in Agent-Based Program Synthesis from Scratch
Yihao ChenShi ChangFeng LinKhaled ChawaBoyuan ChenShaowei WangAhmed E. Hassan
LLM-based agents struggle to build programs from scratch, often conflating exploration and coding. SpecFirst introduces a dedicated behavioral specification elicitation phase before code synthesis. A spec agent probes the executable binary and combines observations with documentation into a structured specification; a separate synthesis agent then implements from that stable reference. On 200 ProgramBench instances, SpecFirst improves test pass rates by 6.9–21.3% and exploration coverage by 9.4–18.5% over single-loop baselines, showing that an explicit requirements-engineering phase is effective for from-scratch program construction.
arXivarXiv · · July 29, 2026
0
0
Bug Report Specification Refinement with Trajectory Guidance for Automated Program Repair
S M Farah Al FahimMd Nakhla RafiMd AhasanuzzamanZeyang MaDong Jae KimShaowei WangTse-HsunChen
TrajSpec refines bug reports for automated program repair by collecting a pre-fix trajectory from the repository, organizing it into a three-level representation (high-level interpretation, diagnostic findings, concrete observations), and then applying repository-based review to produce a refined report. On SWE-Bench Lite, refined reports raise Pass@1 from 41.00% to 59.67% with GPT-5-mini and from 54.67% to 64.33% with MiniMax M2.5, with ablation confirming the contribution of both the hierarchical evidence and the review step.
arXivarXiv · · July 8, 2026
0
0
SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review
Ruoyu WangJierun ChenShaowei WangChaofan TaoSidi YangYuxin JiangKim-Hui YapLifeng ShangXiaohui LiHaoli Bai
SWE-Review closes the open-loop gap in AI-generated pull requests (PRs) by introducing agentic code review. A reviewer agent explores the repository, decides whether to accept the PR, and provides structured feedback for revision. Evaluated on SWE-Review-Bench, this generate-review-revise loop outperforms single-turn fixed-context review in decision accuracy and resolve rate, and transfers to improve issue-resolution models and test-time scaling.
arXivarXiv · · July 7, 2026
0
6
SLICEFORMER: Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Pengfei HeShaowei WangTse-Hsun ChenMuhammad Asaduzzaman
SliceFormer reformulates static program slicing as a sequence-to-sequence task using small language models. It introduces two innovations: dataflow-aware pretraining with data flow graphs to teach precise dependency modeling, and constrained decoding that enforces lexical and syntactic constraints to eliminate hallucinated tokens. Evaluated on Java and Python benchmarks, SliceFormer achieves up to 22% gain in ExactMatch over state-of-the-art baselines.
ACL AnthologyACL Anthology · July 2026
0
0
CODEPROMPTZIP: Code-specific Prompt Compression for Retrieval-Augmented Generation in Coding Tasks with LMs
Pengfei HeShaowei WangTse-Hsun Chen
CodePromptZip is a code-aware prompt compression framework for retrieval-augmented code generation. It uses static analysis to rank tokens by information gain, then applies a dynamic strategy to retain the most informative ones under a precise length budget, outperforming entropy- and distillation-based baselines by 23.4%, 28.7%, and 8.7% on three code tasks. For unparsable snippets, it leverages a language-model-based compressor with a copy mechanism.
ACL AnthologyACL Anthology · · July 2026
0
Evaluating LLMs on Java Code Snippet Adaptation Using a Mutation-Injection Framework
Ali AmanMuhammad AsaduzzamanShaowei WangChanchal K. Roy
This paper proposes a mutation-injection framework to evaluate LLMs on instruction-free Java code snippet adaptation. The method constructs a dataset by injecting controlled changes, derived from a taxonomy of adaptation operators, into code fragments from open-source repositories with test coverage. The unmutated fragment serves as a correctness reference, and models are assessed at three context granularity levels primarily via test-suite re-insertion. The study investigates which adaptation types are hardest, how performance scales with complexity, and how much context the model needs.
arXivarXiv · · June 26, 2026
0
0
Multi-tier Differential Private Query Release
Shaowei WangJinn LiYun PengPuning ZhaoWenqi RenChangyu DongJin LiJian Weng
This paper presents a framework for multi-tier differential privacy (DP) query release, where the same query receives answers under different privacy budgets from different analysts. The framework simultaneously bounds cumulative privacy loss by the maximum budget among all queries and achieves optimal utility comparable to single-tier mechanisms. For noise-adding mechanisms like count queries with the two-sided Geometric mechanism, a general solution based on characteristic functions of noise distributions is developed. For other mechanisms like local DP with the Subset mechanism, mechanism-specific budget transformation primitives and a template-based strategy are designed. Experiments confirm effectiveness.
arXivarXiv · · June 14, 2026
0
0
Hierarchical ODE: Learning Continuous-Time Physical Prototypes for Early Link Failure Detection
Jiaen LvLeran QiShaowei Wang
This paper proposes a hierarchical ordinary differential equation (ODE) clustering network for continuous-time prototype learning. The method uses a neural ODE to model latent state evolution as a continuous integral curve, disentangling smooth feature trends from stochastic noise. An adaptive hierarchical mechanism autonomously determines the number of prototypes without rigid prior constraints. Validated on early link failure detection with irregularly sampled time series, it effectively extracts underlying physical prototypes, enabling robust detection.
arXivarXiv · · June 12, 2026
0
Beyond Correctness: Enhancing Architectural Reasoning in Code LLMs via Scalable Labeling with Agentic Judgment
Kirill VasilevskiXiming DongBenjamin RombautMilad SoltanyRuochen DengJiahuei LinArthur LeungDayi LinBoyuan ChenShaowei WangAhmed E. Hassan
This paper introduces an agentic judging pipeline that uses a strong LLM as a scalable proxy for expert architectural evaluation of code patches. Two judges are proposed: the Architecture Complexity Judge (ACJ) estimates the architectural understanding a task requires, and the Architecture Quality Judge (AQJ) evaluates patch conformance to repository-specific conventions. Fine-tuning Qwen3-8B/14B/32B on 3,360 curated instances yields resolved rates of up to 27.2% on SWE-bench Verified, a 540% improvement over the base model and 256% over unfiltered fine-tuning, with strong cross-language generalization.
arXivarXiv · · June 12, 2026
0
2
SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review
Ruoyu WangJierun ChenShaowei WangChaofan TaoSidi YangYuxin JiangKim-Hui YapLifeng ShangXiao-Hui LiHaoli Bai
SWE-Review is a framework that closes the loop on AI-generated pull requests by adding agentic code review: given an issue and a generated PR, a reviewer agent explores the repository, decides whether to accept the patch, and supplies structured feedback for revision. The authors also propose SWE-Review-Bench to measure review correctness and downstream revision usefulness, and curate SWE-Review-Traj to address data scarcity for open reviewer training. Experiments show agentic review improves PRs through a generate-review-revise loop, outperforms single-turn fixed-context review in decision accuracy and revision resolve rate, transfers to improve issue-resolution models, and enables effective test-time scaling.
OpenReviewOpenReview · · May 4, 2026
0
Think Harder and Don't Overlook Your Options: Revisiting Issue-Commit Linking with LLM-Assisted Retrieval
Cole MorganMuhammad AsaduzzamanShaiful ChowdhurryShaowei Wang
This paper revisits issue-commit link recovery by comparing retrieval and reranking methods. Dense retrieval (e.g., SBERT) outperforms sparse retrieval (BM25) for candidate commit retrieval, and combining both improves recall. For reranking, traditional machine learning models achieve higher precision than LLM-based approaches (ChatGPT, Qwen, Gemma, Llama). The results show that retrieval-based pipelines remain effective and efficient, and simpler models should be considered before adopting computationally expensive LLMs.
arXivarXiv · · May 1, 2026
0
0
Source localization realizes single frame super-resolution for fluorescence imaging
Mengrui WangShouwen Ma…Shaowei Wang
Existing super-resolution fluorescence microscopy often faces trade-offs among resolution, speed, phototoxicity, and hardware complexity. This paper presents Source Localization (SoLo), a single-frame algorithm that infers fluorescent source positions through a sampling-detection strategy, enabling non-iterative, parallelizable computation. SoLo achieves real-time live-cell imaging with high spatiotemporal resolution while preserving intensity linearity, making it compatible with quantitative analyses like calcium imaging. The framework is further extended to 3D-SoLo for volumetric imaging and nonlinear SoLo (NL-SoLo) for high-density fluctuation imaging.
arXivarXiv · · April 22, 2026
0
When LLMs Lag Behind: Knowledge Conflicts from Evolving APIs in Code Generation
Ahmed Nusayer AshikShaowei WangTse-Hsun ChenMuhammad AsaduzzamanYuan Tian
This paper investigates how LLMs generate code under API evolution, where external documentation (RAG) contradicts the model's static training knowledge. On a benchmark of 270 real-world API updates from eight Python libraries, four LLM families (11 models) achieve only 42.55% executable code on average, as models struggle to prioritize external context. Structured documentation and larger models improve but do not fully resolve the issue (66.36% executable). Reasoning strategies like Self-Reflection raise executability by 11%, yet outdated patterns persist even when updates are specified.
arXivarXiv · · April 10, 2026
0
2
Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Pengfei HeShaowei WangTse-HsunChenMuhammad Asaduzzaman
Sliceformer reformulates static program slicing as a sequence-to-sequence task using small language models like CodeT5+. It introduces dataflow-aware pretraining, which uses data flow graphs to teach dependency modeling through dataflow-preserving statement permutation and dataflow-aware span corruption, and a constrained decoding mechanism that enforces lexical and syntactic constraints to eliminate hallucinated tokens. On Java and Python benchmarks, Sliceformer achieves up to 22% improvement in ExactMatch over state-of-the-art baselines.
arXivarXiv · · April 9, 2026
0
3
REAgent: Requirement-Driven LLM Agents for Software Issue Resolution
Shiqi KuangZhao TianKaiwei LinChaofan TaoShaowei WangHaoli BaiLifeng ShangJunjie Chen
REAgent is a requirement-driven LLM agent framework for software issue resolution. Unlike existing approaches that treat low-quality issue descriptions as direct inputs, REAgent automatically constructs structured, information-rich requirements from them, identifies low-quality requirements, and iteratively refines these requirements to better guide patch generation. Evaluated on three benchmarks with two advanced LLMs, REAgent consistently outperforms five baselines, achieving an average improvement of 17.40% in % Resolved.
arXivarXiv · · April 8, 2026
0
6
Typify: A Lightweight Usage-driven Static Analyzer for Precise Python Type Inference
Ali AmanMuhammad AsaduzzamanShaowei Wang
Typify is a lightweight static analyzer that infers precise Python types without deep learning or large datasets. It combines symbolic execution, iterative fixpoint analysis, and a context-matching retrieval system to propagate type information across projects via execution-aware dependency graphs. Evaluated on ManyTypes4Py and Typilus benchmarks, Typify matches or surpasses deep learning-based systems (Type4Py, HiTyper) and industrial tools (Pyre), demonstrating that usage-driven, retrieval-based inference offers a practical, interpretable, and computationally efficient alternative.
arXivarXiv · · April 6, 2026
0
1
A Survey of Code Review Benchmarks and Evaluation Practices in Pre-LLM and LLM Era
Taufiqul Islam KhanShaowei WangHaoxiang ZhangTse-Hsun Chen
This survey analyzes 104 papers (60 pre-LLM, 44 LLM-era, 2015–2025) to systematically map code review benchmarks and their evaluation practices. Extracting metadata on datasets, metrics, data sources, and target tasks, the authors propose a multi-level taxonomy of five domains and 18 fine-grained tasks, and observe a shift toward generative peer-review results, broader multilingual coverage, and fewer standalone change-understanding tasks. They identify key benchmark gaps—missing macro-level and structural review tasks, misaligned or uncalibrated metrics, and little execution-grounded assessment—and derive four taxonomy-driven design principles (broader task coverage, execution-grounded evaluation, calibrated multi-reference assessment, cross-language generalization testing) to guide more realistic LLM-based code review benchmarks.
arXivarXiv · · February 13, 2026
0
3
When Elo Lies: Hidden Biases in Codeforces-Based Evaluation of Large Language Models
Shenyu ZhengXiming DongXiaoshuang LiuGustavo OlivaChong Chun YongDayi LinBoyuan ChenShaowei WangAhmed E. Hassan
This paper shows that Codeforces-based Elo ratings for LLMs are highly sensitive to three hidden factors: submission temporal ordering, contest difficulty selection, and run-to-run stochastic variability. In a controlled study of 37 contests and 13,691 test cases, varying submission order shifted scores by up to 394 points, contest selection caused differences up to 1,122 points, and run-to-run mean scores varied by up to 349 points. The authors conclude that direct Elo comparisons are unreliable without strict standardization and transparent reporting.
arXivarXiv · · February 5, 2026
0
2
Beyond Tokens: Semantic-Aware Speculative Decoding for Efficient Inference by Probing Internal States
Ximing DongShaowei WangDayi LinBoyuan ChenAhmed E. Hassan
SemanticSpec accelerates LLM inference by verifying entire semantic sequences instead of individual tokens during speculative decoding. It probes the model's internal hidden states to estimate the probability of generating sequences with specific meanings, enabling more efficient acceptance of semantically equivalent drafts. Experiments on DeepSeek-R1-32B and QwQ-32B demonstrate up to 2.7x and 2.1x speedups respectively, outperforming token-level and sequence-level baselines.
arXivarXiv · · February 3, 2026
0
7
Authors with the same name
Shaowei Wang · 10 papers
Shaowei Wang #0001 · 3 papers
Shaowei Wang #0002 · 34 papers
Shaowei Wang #0003 · 12 papers
Frequent collaborators
Ahmed E. Hassan (13)
Tse-Hsun Chen (12)
Wei Yang (11)
Muhammad Asaduzzaman (10)
Pengfei He (9)
Jin Li (9)
Di Wang (9)
Chaofan Tao (7)
Haoli Bai (7)
Lifeng Shang (7)
Dayi Lin (7)
Yuan Tian (7)