Weisong Sun
· 3 previous affiliations
- Nanyang Technological UniversitySince 2023
- Postdoc · Since 2023
- Nanjing University2017–2023
- PhD student · 2019–2023
- MS student · 2017–2019
- Yangzhou University2013–2017
- Undergrad student · 2013–2017
Research Overview
Weisong Sun focuses on software engineering, code intelligence, and the security of machine learning models. His trajectory spans from early work in source code search and plagiarism detection to the evaluation and protection of large language models for code. Currently, his research addresses the vulnerabilities of neural code models, exploring backdoor mitigation and the application of multi-agent systems to software development processes.
Research Trajectory
Sun's early research centers on traditional software engineering tools and code retrieval mechanisms. In 2016, he introduced WB4SP: A tool to build the word base for specific programs, which assists developers in locating and recovering source code elements during maintenance. He subsequently developed techniques for educational software engineering, proposing MAF: method-anchored test fragmentation for test code plagiarism detection in 2019, which utilizes bidirectional static slicing to filter noisy test codes. Continuing his focus on code retrieval, he later presented Code Search based on Context-aware Code Translation (2022).
By 2023, his work expanded to systematically analyze and optimize the intersection of machine learning and code analysis. He contributed to a comprehensive taxonomy in A Survey of Source Code Search: A 3-Dimensional Perspective, which maps the evolution of the field from information retrieval to deep learning, touching upon the research direction of Graph-Based Code Representation for Software Engineering. To better understand how models process programming languages, he co-authored Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?, an empirical study revealing that while token-based models often perform well on average, Abstract Syntax Trees remain vital for complex code samples. He also explored parameter-efficient adaptation for large language models (LLMs) in A Prompt Learning Framework for Source Code Summarization, demonstrating that training a small prompt agent can match the performance of full-parameter fine-tuning.
A major theme in Sun's recent trajectory is the security and robustness of neural code models, particularly concerning vulnerabilities to malicious manipulation. He identified critical flaws in code retrieval systems with Backdooring Neural Code Search, demonstrating how subtle mutations in variable names can trick models into ranking malicious code highly. This work aligns with the broader area of Backdoor Attacks through Training Data Poisoning. To counter such threats, he developed defense frameworks like Eliminating Backdoors in Neural Code Models via Trigger Inversion, which reverse-engineers adversarial triggers to neutralize them. He extended these defensive strategies to self-supervised learning environments, proposing Mutual Information Guided Backdoor Mitigation for Pre-trained Encoders to address vulnerabilities where label information is absent during pre-training. Further investigating defense mechanisms, he collaborated on Can Distillation Mitigate Backdoor Attacks in Pre-trained Encoders?, contributing to the research direction of Purifying Neural Networks via Knowledge Distillation by transferring knowledge from a poisoned teacher to a clean student model.
Sun's security research also encompasses the broader landscape of code intelligence. He formalized the state of the field in Security of Language Models for Code: A Systematic Literature Review, mapping the arms race between adversarial attacks and emerging defenses. He further exposed vulnerabilities in how models learn from examples, introducing Demonstration Attack against In-Context Learning for Code Intelligence to show how poisoned demonstrations can manipulate predictions. Beyond code-specific models, he addressed general LLM safety in Self and Cross-Model Distillation for LLMs: Effective Methods for Refusal Pattern Alignment, proposing distillation techniques to improve a model's ability to reject toxic or harmful requests.
Concurrently, Sun has continued to advance automated software engineering tasks using frontier models. He evaluated the capabilities of various models in Source Code Summarization in the Era of Large Language Models, finding that while GPT-4 serves as a strong automated evaluator, smaller specialized models can excel at explaining code logic. He scaled this analysis to larger codebases in Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarization (2025), systematically testing prompt strategies for file- and module-level understanding. His recent collaborative work also extends into domain-specific testing and multi-agent systems. He participated in developing Generate Realistic Test Scenes for V2X Communication Systems, a tool that uses LiDAR simulation and search strategies to stress-test cooperative perception, contributing to the area of Overcoming Sensor Occlusion Through Collaborative Perception. Most recently, he contributed to Envisioning Intelligent Requirements Engineering via Knowledge-Guided Multi-Agent Collaboration (2026), which proposes a framework to simulate the complex collaboration of human experts during the software requirements phase.
Current Directions
The most recent papers in the evidence indicate a dual focus on scaling large language models for complex software engineering tasks and ensuring the robustness of AI systems in specialized domains. Work from 2025 and 2026 investigates how to move beyond function-level code intelligence to comprehend entire files and modules using hierarchical summarization strategies. Concurrently, recent research explores the integration of domain knowledge into multi-agent frameworks to automate intricate processes like requirements engineering. Alongside these software engineering advancements, ongoing collaborative efforts address the validation of safety-critical systems, such as generating high-fidelity, realistic test scenes to expose failures in vehicle-to-everything (V2X) communication and cooperative perception pipelines.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake