SpecProbe: Probing Intent-Implementation Misalignments with Generated Executable Postconditions
Gehao ZhangZhenting WangJuan Zhai
Nov 2026
Artificial Intelligence
Abstract
Ensuring that code faithfully reflects its documented intent is a fundamental challenge in software engineering, but the informal natural language specifications in real repositories cannot be automatically compiled into executable checks and run against implementations. We introduce behavioral probes: executable postconditions generated from natural language documentation, injected into programs, and checked during test execution to reveal where documented intent and implementation behavior align or diverge. We present SpecProbe, a repository-aware pipeline that generates behavioral probes and classifies each as non-executable, matched, or mismatched. A structured four-field schema (import, pre-ghost, post-ghost, condition) makes generated postconditions injectable and compilable in real repositories; reasoning supervised fine-tuning on $\sim$1.5K automatically curated examples enables a compact 7B model to generate probes without continued API access. On Defects4J, SpecProbe's 7B model achieves GPT-4o-comparable semantic consistency (Sem@1) at 141$\times$ lower inference cost. The pipeline reveals 80 of 726 historical bugs, and for 95% of them the original failing-test stack trace omits the method checked by the probe. On Python icontract generation, SpecProbe surpasses GPT-5-mini and GPT-o3, demonstrating transfer to a different language and contract format. These results show that behavioral probes complement failing-test stack traces with diagnostic evidence grounded in the selected method's documented intent.
It is found that Llama 3 delivers comparable quality to leading language models such as GPT-4 on a plethora of tasks, and performs competitively with the state-of-the-art on image, video, and speech recognition tasks.
This paper investigates developing real-world perception for active agents, proposes Gibson Environment for this purpose, and showcases a set of perceptual tasks learned therein.
F. Xia, Amir Zamir, Zhi-Yang He et al.· 2018 IEEE/CVF Conference on...· 1,069 citations· ⚡112
GAOKAO-Bench is introduced, an intuitive benchmark that employs questions from the Chinese GAOKAO examination as test samples, including both subjective and objective questions that contribute a robust evaluation benchmark for future large language models and offers valuable insights into the advantages and limitations...
Xiaotian Zhang, Chun-yan Li, Yi Zong et al.· arXiv.org· 216 citations· ⚡17
An algorithm is proposed which leverages disentangled semantic factors to generate adversarial perturbation by altering controlled semantic attributes to fool the learner towards various "adversarial" targets.
Haonan Qiu, Chaowei Xiao, Lei Yang et al.· arXiv.org· 208 citations· ⚡17
This work proposes a HALO that directly maximizes the utility of generations instead of maximizing the log-likelihood of preferences, and suggests that the best loss depends on the inductive biases most appropriate for a given setting, an oft-overlooked consideration.
This work investigates the possibilities of using LLMs in a resume screening setting via a document retrieval framework that simulates job candidate selection and finds that the MTEs are biased, significantly favoring White-associated names in 85% of cases and female-associated names in only 11.1% of cases.