Searcharxiv⌕ Search

arXiv subjects

Yanli Wang

Publications and source records attributed to Yanli Wang.

At least 37 records · Page 2Linked to original sources

Towards an Understanding of Context Utilization in Code Intelligence

Code intelligence is an emerging domain in software engineering, aiming to improve the effectiveness and efficiency of various code-related tasks. Recent research suggests that incorporating contextual information beyond the basic original task inputs (i.e., source code) can substantially enhance model performance. Such contextual signals may be obtained directly or indirectly from sources such as API documentation or intermediate representations like abstract syntax trees can significantly improve the effectiveness of code intelligence. Despite growing academic interest, there is a lack of systematic analysis of context in code intelligence. To address this gap, we conduct an extensive literature review of 146 relevant studies published between September 2007 and August 2024. Our investigation yields four main contributions. (1) A quantitative analysis of the research landscape, including publication trends, venues, and the explored domains; (2) A novel taxonomy of context types used in code intelligence; (3) A task-oriented analysis investigating context integration strategies across diverse code intelligence tasks; (4) A critical evaluation of evaluation methodologies for context-aware methods. Based on these findings, we identify fundamental challenges in context utilization in current code intelligence systems and propose a research roadmap that outlines key opportunities for future research.

cs.SE↗

Completely Bounded Representations Into Von Neumann Algebras And Connes Embedding Problem

In this paper, we prove that if $\mathcal{A}$ is a unital separable $C^*$-algebra, $\mathcal{M}$ is a von Neumann algebra which has the Kirchberg's quotient weak expectation property (QWEP), and $ϕ:\, \mathcal{A}\rightarrow \mathcal{M}$ is a unital completely bounded representation, then there is an invertible operator $S\in \mathcal{M}$ such that $Sϕ(\cdot) S^{-1}$ is a $\ast$-representation. On the other hand, Gilles Pisier proved the following result: a unital $C^*$-algebra $\mathcal{A}$ is nuclear if and only if for every unital completely bounded representation $ϕ$ of $\mathcal{A}$ into an arbitrary von Neumann algebra $\mathcal{M}$ there is an invertible operator $S\in \mathcal{M}$ such that $Sϕ(\cdot) S^{-1}$ is a $\ast$-representation. This implies that there exist von Neumann algebras which are not QWEP. Eberhard Kirchberg showed that every von Neumann algebra has QWEP if and only if every tracial von Neumann algebra embeds into the ultrapower $\mathcal{R}^w$ of the hyperfinite type ${\rm II}_1$ factor $\mathcal{R}$. This provides a negative answer to the Connes Embedding Problem. This paper relies on previous work of Gilles Pisier and Florin Pop.

math.OA↗

RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translation

Repository-level code translation refers to translating an entire code repository from one programming language to another while preserving the functionality of the source repository. Many benchmarks have been proposed to evaluate the performance of such code translators. However, previous benchmarks mostly provide fine-grained samples, focusing at either code snippet, function, or file-level code translation. Such benchmarks do not accurately reflect real-world demands, where entire repositories often need to be translated, involving longer code length and more complex functionalities. To address this gap, we propose a new benchmark, named RepoTransBench, which is a real-world multilingual repository-level code translation benchmark featuring 1,897 real-world repository samples across 13 language pairs with automatically executable test suites. Besides, we introduce RepoTransAgent, a general agent framework to perform repository-level code translation. We evaluate both our benchmark's challenges and agent's effectiveness using several methods and backbone LLMs, revealing that repository-level translation remains challenging, where the best-performing method achieves only a 32.8% success rate. Furthermore, our analysis reveals that translation difficulty varies significantly by language pair direction, with dynamic-to-static language translation being much more challenging than the reverse direction (achieving below 10% vs. static-to-dynamic at 45-63%). Finally, we conduct a detailed error analysis and highlight current LLMs' deficiencies in repository-level code translation, which could provide a reference for further improvements. We provide the code and data at https://github.com/DeepSoftwareAnalytics/RepoTransBench.

cs.SE↗

EffiReasonTrans: RL-Optimized Reasoning for Code Translation

Code translation is a crucial task in software development and maintenance. While recent advancements in large language models (LLMs) have improved automated code translation accuracy, these gains often come at the cost of increased inference latency, hindering real-world development workflows that involve human-in-the-loop inspection. To address this trade-off, we propose EffiReasonTrans, a training framework designed to improve translation accuracy while balancing inference latency. We first construct a high-quality reasoning-augmented dataset by prompting a stronger language model, DeepSeek-R1, to generate intermediate reasoning and target translations. Each (source code, reasoning, target code) triplet undergoes automated syntax and functionality checks to ensure reliability. Based on this dataset, we employ a two-stage training strategy: supervised fine-tuning on reasoning-augmented samples, followed by reinforcement learning to further enhance accuracy and balance inference latency. We evaluate EffiReasonTrans on six translation pairs. Experimental results show that it consistently improves translation accuracy (up to +49.2% CA and +27.8% CodeBLEU compared to the base model) while reducing the number of generated tokens (up to -19.3%) and lowering inference latency in most cases (up to -29.0%). Ablation studies further confirm the complementary benefits of the two-stage training framework. Additionally, EffiReasonTrans demonstrates improved translation accuracy when integrated into agent-based frameworks. Our code and data are available at https://github.com/DeepSoftwareAnalytics/EffiReasonTrans.

cs.SE↗

An adaptive Hermite spectral method for the Boltzmann equation

We propose an adaptive Hermite spectral method for the three-dimensional velocity space of the Boltzmann equation guided by a newly developed frequency indicator. For the homogeneous problem, the indicator is defined by the contribution of high-order coefficients in the spectral expansion. For the non-homogeneous problem, a Fourier-Hermite scheme is employed, with the corresponding frequency indicator formulated based on distributions across the entire spatial domain. The adaptive Hermite method includes scaling and p-adaptive techniques to dynamically adjust the scaling factor and expansion order according to the indicator. Numerical experiments cover both homogeneous and non-homogeneous problems in up to three spatial dimensions. Results demonstrate that the scaling adaptive method substantially reduces L2 errors at negligible computational cost, and the p-adaptive method achieves time savings of up to 74%.

math.NA↗

A fast Fourier spectral method for the linearized Boltzmann collision operator

We introduce a fast Fourier spectral method to compute linearized collision operators of the Boltzmann equation for variable hard-sphere gases. While the state-of-the-art method provides a computational cost O(MN^4 log N), with N being the number of modes in each direction and M being the number of quadrature points on a hemisphere, our method reduces the cost to O(N^4 log N), removing the factor M, which could be large in our numerical tests. The method is applied in a numerical solver for the steady-state Boltzmann equation with quadratic collision operators. Numerical experiments for both spatially homogeneous and inhomogeneous Boltzmann equations have been carried out to test the accuracy and efficiency of our method.

math.NA↗

The unified gas kinetic wave-particle method for the neutron transport equation

The unified gas-kinetic wave-particle (UGKWP) method is proposed for the neutron transport equation, addressing the inherent multiscale nature of neutron propagation in both optically thin and thick regimes. UGKWP couples macroscopic diffusion and microscopic transport processes within a unified time-dependent framework, allowing a smooth transition between the free transport and diffusion regimes. This method is readily extended to multi-group neutron transport models and is applicable to both steady-state and eigenvalue problems. Several numerical examples, including the 1D and 3D single-group and 3D multi-group problems, are studied, indicating UGKWP a promising framework for scalable and accurate simulation of multigroup neutron transport in complex geometries.

math.NA↗

A Framework of Model Reduction with Arbitrary Orders of Accuracy for the Boltzmann Equation

This paper presents a general framework for constructing reduced models that approximate the Boltzmann equation with arbitrary orders of accuracy in terms of the Knudsen number $\mathit{Kn}$, applicable to general collision models in rarefied gas dynamics. The framework is based on an orthogonal decomposition of the distribution function into components of different orders in $\mathit{Kn}$, from which the reduced models are systematically derived through asymptotic analysis. Compared to the Chapman-Enskog expansion, our approach yields more tractable model structures. Notably, we establish that a reduced model retaining all terms up to $O(\mathit{Kn}^n)$ in the expansion surprisingly yields models with order of accuracy $O(\mathit{Kn}^{n+1})$. Furthermore, when the collision term is linearized, the accuracy improves dramatically to $O(\mathit{Kn}^{2n})$. These results extend to regularized models containing second-order derivatives. As concrete applications, we explicitly derive 13-moment systems of Burnett and super-Burnett orders valid for arbitrary collision models.

math-ph↗

Weak formulation and spectral approximation of a Fokker-Planck equation for neural ensembles

In this paper, we focus on efficiently and flexibly simulating the Fokker-Planck equation associated with the Nonlinear Noisy Leaky Integrate-and-Fire (NNLIF) model, which reflects the dynamic behavior of neuron networks. We apply the Galerkin spectral method to discretize the spatial domain by constructing a variational formulation that satisfies complex boundary conditions. Moreover, the boundary conditions in the variational formulation include only zeroth-order terms, with first-order conditions being naturally incorporated. This allows the numerical scheme to be further extended to an excitatory-inhibitory population model with synaptic delays and refractory states. Additionally, we establish the consistency of the numerical scheme. Experimental results, including accuracy tests, blow-up events, and periodic oscillations, validate the properties of our proposed method.

math.NA↗

FieldTNN-based machine learning method for Maxwell eigenvalue problems

The aim of this paper is to introduce a FieldTNN-based machine learning method for solving the Maxwell eigenvalue problem in both 2D and 3D domains, including both tensor and non-tensor computational regions. First, we extend the existing TNN-based approach to address the Maxwell eigenvalue problem, a fundamental challenge in electromagnetic field theory. Second, we tackle non-tensor computational domains, which represents a novel and significant contribution of this work. Third, we incorporate the divergence-free condition into the optimization process, allowing for the automatic filtering of spurious eigenpairs. Numerical examples are presented to demonstrate the efficiency and accuracy of our algorithm, underscoring its potential for broader applications in computational electromagnetics.

math.NA↗

An asymptotic-preserving IMEX PN method for the gray model of the radiative transfer equation

An asymptotic-preserving (AP) implicit-explicit PN numerical scheme is proposed for the gray model of the radiative transfer equation, where the first- and second-order numerical schemes are discussed for both the linear and nonlinear models. The AP property of this numerical scheme is proved theoretically and numerically, while the numerical stability of the linear model is verified by Fourier analysis. Several classical benchmark examples are studied to validate the efficiency of this numerical scheme.

math.NA↗

Neural network representation of microflows with BGK model

We consider the neural representation to solve the Boltzmann-BGK equation, especially focusing on the application in microscopic flow problems. A new dimension reduction model of the BGK equation with the flexible auxiliary distribution functions is first deduced to reduce the problem dimension. Then, a network-based ansatz that can approximate the dimension-reduced distribution with extremely high efficiency is proposed. Precisely, fully connected neural networks are utilized to avoid discretization in space and time. A specially designed loss function is employed to deal with the complex Maxwell boundary in microscopic flow problems. Moreover, strategies such as multi-scale input and Maxwellian splitting are applied to enhance the approximation efficiency further. Several classical numerical experiments, including 1D Couette flow and Fourier flow problems and 2D duct flow and in-out flow problems are studied to demonstrate the effectiveness of this neural representation method.

math.NA↗

When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?

With the development of blockchain technology, smart contracts have become an important component of blockchain applications. Despite their crucial role, the development of smart contracts may introduce vulnerabilities and potentially lead to severe consequences, such as financial losses. Meanwhile, large language models, represented by ChatGPT, have gained great attentions, showcasing great capabilities in code analysis tasks. In this paper, we presented an empirical study to investigate the performance of ChatGPT in identifying smart contract vulnerabilities. Initially, we evaluated ChatGPT's effectiveness using a publicly available smart contract dataset. Our findings discover that while ChatGPT achieves a high recall rate, its precision in pinpointing smart contract vulnerabilities is limited. Furthermore, ChatGPT's performance varies when detecting different vulnerability types. We delved into the root causes for the false positives generated by ChatGPT, and categorized them into four groups. Second, by comparing ChatGPT with other state-of-the-art smart contract vulnerability detection tools, we found that ChatGPT's F-score is lower than others for 3 out of the 7 vulnerabilities. In the case of the remaining 4 vulnerabilities, ChatGPT exhibits a slight advantage over these tools. Finally, we analyzed the limitation of ChatGPT in smart contract vulnerability detection, revealing that the robustness of ChatGPT in this field needs to be improved from two aspects: its uncertainty in answering questions; and the limited length of the detected code. In general, our research provides insights into the strengths and weaknesses of employing large language models, specifically ChatGPT, for the detection of smart contract vulnerabilities.

cs.SE↗

RLCoder: Reinforcement Learning for Repository-Level Code Completion

Repository-level code completion aims to generate code for unfinished code snippets within the context of a specified repository. Existing approaches mainly rely on retrieval-augmented generation strategies due to limitations in input sequence length. However, traditional lexical-based retrieval methods like BM25 struggle to capture code semantics, while model-based retrieval methods face challenges due to the lack of labeled data for training. Therefore, we propose RLCoder, a novel reinforcement learning framework, which can enable the retriever to learn to retrieve useful content for code completion without the need for labeled data. Specifically, we iteratively evaluate the usefulness of retrieved content based on the perplexity of the target code when provided with the retrieved content as additional context, and provide feedback to update the retriever parameters. This iterative process enables the retriever to learn from its successes and failures, gradually improving its ability to retrieve relevant and high-quality content. Considering that not all situations require information beyond code files and not all retrieved context is helpful for generation, we also introduce a stop signal mechanism, allowing the retriever to decide when to retrieve and which candidates to retain autonomously. Extensive experimental results demonstrate that RLCoder consistently outperforms state-of-the-art methods on CrossCodeEval and RepoEval, achieving 12.2% EM improvement over previous methods. Moreover, experiments show that our framework can generalize across different programming languages and further improve previous methods like RepoCoder. We provide the code and data at https://github.com/DeepSoftwareAnalytics/RLCoder.

cs.SE↗

An asymptotic-preserving method for the three-temperature radiative transfer model

We present an asymptotic-preserving (AP) numerical method for solving the three-temperature radiative transfer model, which holds significant importance in inertial confinement fusion. A carefully designedsplitting method is developed that can provide a general framework of extending AP schemes for the gray radiative transport equation to the more complex three-temperature radiative transfer model. The proposed scheme captures two important limiting models: the three-temperature radiation diffusion equation (3TRDE) when opacity approaches infinity and the two-temperature limit when the ion-electron coupling coefficient goes to infinity. We have rigorously demonstrated the AP property and energy conservation characteristics of the proposed scheme and its efficiency has been validated through a series of benchmark tests in the numerical part.

math.NA↗

A highly efficient asymptotic preserving IMEX method for the quantum BGK equation

This paper presents an asymptotic preserving (AP) implicit-explicit (IMEX) scheme for solving the quantum BGK equation using the Hermite spectral method. The distribution function is expanded in a series of Hermite polynomials, with the Gaussian function serving as the weight function. The main challenge in this numerical scheme lies in efficiently expanding the quantum Maxwellian with the Hermite basis functions. To overcome this, we simplify the problem to the calculation of polylogarithms and propose an efficient algorithm to handle it, utilizing the Gauss-Hermite quadrature. Several numerical simulations, including a spatially 2D lid-driven cavity flow, demonstrate the AP property and remarkable efficiency of this method.

math.NA↗

A symmetric Gauss-Seidel method for the steady-state Boltzmann equation

We introduce numerical solvers for the steady-state Boltzmann equation based on the symmetric Gauss-Seidel (SGS) method. Due to the quadratic collision operator in the Boltzmann equation, the SGS method requires solving a nonlinear system on each grid cell, and we consider two methods, namely Newton's method and the fixed-point iteration, in our numerical tests. For small Knudsen numbers, our method has an efficiency between the classical source iteration and the modern generalized synthetic iterative scheme, and the complexity of its implementation is closer to the source iteration. A variety of numerical tests are carried out to demonstrate its performance, and it is concluded that the proposed method is suitable for applications with moderate to large Knudsen numbers.

physics.comp-ph↗

Hermite spectral method for the inelastic Boltzmann equation

We propose a Hermite spectral method for the inelastic Boltzmann equation, which makes two-dimensional periodic problem computation affordable by the hardware nowadays. The new algorithm is based on a Hermite expansion, where the expansion coefficients for the VHS model are reduced into several summations and can be derived exactly. Moreover, a new collision model is built with a combination of the quadratic collision operator and a linearized collision operator, which helps us to balance the computational cost and the accuracy. Various numerical experiments, including spatially two-dimensional simulations, demonstrate the accuracy and efficiency of this numerical scheme.

math.NA↗