Sliceformer: Enhancing Static Program Slicing with Dataflow-Aware LMs
Researchers have introduced Sliceformer, a novel approach to static program slicing that addresses limitations in current language model-based methods, such as inaccurate dependency modeling and hallucinated code generation. Static program slicing is a critical software engineering technique for isolating code segments relevant to specific variables. Sliceformer reformulates this task as a sequence-to-sequence problem using small language models like CodeT5+. The method incorporates two key innovations: dataflow-aware pretraining objectives that leverage data flow graphs to teach precise data dependencies through statement permutation and span corruption, and a constrained decoding mechanism that enforces lexical and syntactic constraints to eliminate hallucinations. Evaluations on Java and Python benchmarks demonstrate that Sliceformer achieves consistent improvements over state-of-the-art baselines, with up to a 22% gain in ExactMatch accuracy. This advancement highlights the potential of specialized pretraining and decoding strategies in improving the reliability and precision of AI-driven software engineering tools.
Wire timeline
Sliceformer: Enhancing Static Program Slicing with Dataflow-Aware LMs
Researchers have introduced Sliceformer, a novel approach to static program slicing that addresses limitations in current language model-based methods, such as inaccurate dependency modeling and hallucinated code generation. Static program slicing is a critical software engineering technique for isolating code segments relevant to specific variables. Sliceformer reformulates this task as a sequence-to-sequence problem using small language models like CodeT5+. The method incorporates two key innovations: dataflow-aware pretraining objectives that leverage data flow graphs to teach precise data dependencies through statement permutation and span corruption, and a constrained decoding mechanism that enforces lexical and syntactic constraints to eliminate hallucinations. Evaluations on Java and Python benchmarks demonstrate that Sliceformer achieves consistent improvements over state-of-the-art baselines, with up to a 22% gain in ExactMatch accuracy. This advancement highlights the potential of specialized pretraining and decoding strategies in improving the reliability and precision of AI-driven software engineering tools.
cs.AI updates on arXiv.org