SearcharxivSearch

arXiv subjects

Peichu Xie

Publications and source records attributed to Peichu Xie.

3 recordsLinked to original sources

Reducing Hallucinations in LLM-Generated Code via Semantic Triangulation

Large language models (LLMs) can generate executable code from natural language descriptions, but the resulting programs frequently contain bugs due to hallucinations. In the absence of formal specifications, existing approaches attempt to assess correctness using LLM-generated proxies such as tests or auto-formalized specifications. However, these proxies are produced by the same imperfect models and thus often corroborate rather than catch errors, especially when the model exhibits correlated errors. We introduce semantic triangulation, a theory-grounded framework that decorrelates model errors by transforming the original problem into a dissociative variant - one likely requiring a fundamentally different algorithm - and checks consistency between independently sampled solutions to both problems. We identify theoretical requirements for this framework, and we prove that under a formal model of LLM hallucinations, these properties confer higher confidence in program correctness. We instantiate the framework through four concrete triangulation methods based on problem inversion, decomposition, and solution enumeration. Evaluated on LiveCodeBench and CodeElo across GPT-4o, DeepSeek-V3, and Gemini 2.5 Flash, our tool increases the probability of selecting a correct program by 16% over baselines (test generation, metamorphic testing, and auto-formalized specifications) and achieves 7% higher reliability and 7% higher F1 score in selection-or-abstention scenarios, while being the only method that consistently handles inexact problems admitting multiple valid solutions.

cs.SE

Analysis of a wavelet frame based two-scale model for enhanced edges

Image restoration is a class of important tasks that emerges from a wide range of scientific disciplines. It has been noticed that most practical images can be modeled as a composition from a sparse singularity set (edges) where the image contents or their gradients change drastically, and cartoon chunks in which a high degree of regularity is dominant. Enhancing edges while promoting regularity elsewhere has been an important criterion for successful restoration in many image classes. In this article, we present a wavelet frame based image restoration model that captures potential edges and facilitates the restoration procedure by a dedicated treatment both of singularity and of cartoon. Moreover, its geometric robustness is enhanced by exploiting subtle inter-scale information available in the coarse image. To substantiate our intuition, we prove that this model converges to one variant of the celebrated Mumford-Shah model when adequate asymptotic specifications are given.

math.FA

Image Restoration: A General Wavelet Frame Based Model and Its Asymptotic Analysis

Image restoration is one of the most important areas in imaging science. Mathematical tools have been widely used in image restoration, where wavelet frame based approach is one of the successful examples. In this paper, we introduce a generic wavelet frame based image restoration model, called the "general model", which includes most of the existing wavelet frame based models as special cases. Moreover, the general model also includes examples that are new to the literature. Motivated by our earlier studies [1-3], We provide an asymptotic analysis of the general model as image resolution goes to infinity, which establishes a connection between the general model in discrete setting and a new variatonal model in continuum setting. The variational model also includes some of the existing variational models as special cases, such as the total generalized variational model proposed by [4]. In the end, we introduce an algorithm solving the general model and present one numerical simulation as an example.

math.FA