Searcharxiv⌕ Search

arXiv subjects

Xin Yin

Publications and source records attributed to Xin Yin.

At least 55 records · Page 3Linked to original sources

Enhancing LLM's Ability to Generate More Repository-Aware Unit Tests Through Precise Contextual Information Injection

Though many learning-based approaches have been proposed for unit test generation and achieved remarkable performance, they still have limitations in relying on task-specific datasets. Recently, Large Language Models (LLMs) guided by prompt engineering have gained attention for their ability to handle a broad range of tasks, including unit test generation. Despite their success, LLMs may exhibit hallucinations when generating unit tests for focal methods or functions due to their lack of awareness regarding the project's global context. These hallucinations may manifest as calls to non-existent methods, as well as incorrect parameters or return values, such as mismatched parameter types or numbers. While many studies have explored the role of context, they often extract fixed patterns of context for different models and focal methods, which may not be suitable for all generation processes (e.g., excessive irrelevant context could lead to redundancy, preventing the model from focusing on essential information). To overcome this limitation, we propose RATester, which enhances the LLM's ability to generate more repository-aware unit tests through global contextual information injection. To equip LLMs with global knowledge similar to that of human testers, we integrate the language server gopls, which provides essential features (e.g., definition lookup) to assist the LLM. When RATester encounters an unfamiliar identifier (e.g., an unfamiliar struct name), it first leverages gopls to fetch relevant definitions and documentation comments, and then uses this global knowledge to guide the LLM. By utilizing gopls, RATester enriches the LLM's knowledge of the project's global context, thereby reducing hallucinations during unit test generation.

cs.SE↗

What You See Is What You Get: Attention-based Self-guided Automatic Unit Test Generation

Software defects heavily affect software's functionalities and may cause huge losses. Recently, many AI-based approaches have been proposed to detect defects, which can be divided into two categories: software defect prediction and automatic unit test generation. While these approaches have made great progress in software defect detection, they still have several limitations in practical application, including the low confidence of prediction models and the inefficiency of unit testing models. To address these limitations, we propose a WYSIWYG (i.e., What You See Is What You Get) approach: Attention-based Self-guided Automatic Unit Test GenERation (AUGER), which contains two stages: defect detection and error triggering. In the former stage, AUGER first detects the proneness of defects. Then, in the latter stage, it guides to generate unit tests for triggering such an error with the help of critical information obtained by the former stage. To evaluate the effectiveness of AUGER, we conduct a large-scale experiment by comparing with the state-of-the-art (SOTA) approaches on the widely used datasets (i.e., Bears, Bugs.jar, and Defects4J). AUGER makes great improvements by 4.7% to 35.3% and 17.7% to 40.4% in terms of F1-score and Precision in defect detection, and can trigger 23 to 84 more errors than SOTAs in unit test generation. Besides, we also conduct a further study to verify the generalization in practical usage by collecting a new dataset from real-world projects.

cs.SE↗

Fabrication of functional 3D nanoarchitectures via atomic layer deposition on DNA origami crystals

While DNA origami is a powerful bottom-up fabrication technique, the physical and chemical stability of DNA nanostructures is generally limited to aqueous buffer conditions. Wet chemical silicification can stabilise these structures but does not add further functionality. Here, we demonstrate a versatile 3D nanofabrication technique to conformally coat micrometre-sized DNA origami crystals with functional metal oxides via atomic layer deposition (ALD). In addition to depositing homogenous and conformal nanometre-thin ZnO, TiO2, and IrO2 (multi)layers inside SiO2-stablised crystals, we establish a method to directly coat bare DNA crystals with ALD layers while maintaining the crystal integrity, enabled by critical point drying and low ALD process temperatures. As a proof-of-concept application, we demonstrate electrocatalytic water oxidation using ALD IrO2-coated DNA origami crystals, resulting in improved performance relative to planar films. Overall, our coating strategy establishes a tool set for designing custom-made 3D nanomaterials with precisely defined topologies and material compositions, combining the unique advantages of DNA origami and atomically controlled deposition of functional inorganic materials.

physics.app-ph↗

Learning-based Models for Vulnerability Detection: An Extensive Study

Though many deep learning-based models have made great progress in vulnerability detection, we have no good understanding of these models, which limits the further advancement of model capability, understanding of the mechanism of model detection, and efficiency and safety of practical application of models. In this paper, we extensively and comprehensively investigate two types of state-of-the-art learning-based approaches (sequence-based and graph-based) by conducting experiments on a recently built large-scale dataset. We investigate seven research questions from five dimensions, namely model capabilities, model interpretation, model stability, ease of use of model, and model economy. We experimentally demonstrate the priority of sequence-based models and the limited abilities of both LLM (ChatGPT) and graph-based models. We explore the types of vulnerability that learning-based models skilled in and reveal the instability of the models though the input is subtlely semantical-equivalently changed. We empirically explain what the models have learned. We summarize the pre-processing as well as requirements for easily using the models. Finally, we initially induce the vital information for economically and safely practical usage of these models.

cs.SE↗

Large Language Model-aided Edge Learning in Distribution System State Estimation

Distribution system state estimation (DSSE) plays a crucial role in the real-time monitoring, control, and operation of distribution networks. Besides intensive computational requirements, conventional DSSE methods need high-quality measurements to obtain accurate states, whereas missing values often occur due to sensor failures or communication delays. To address these challenging issues, a forecast-then-estimate framework of edge learning is proposed for DSSE, leveraging large language models (LLMs) to forecast missing measurements and provide pseudo-measurements. Firstly, natural language-based prompts and measurement sequences are integrated by the proposed LLM to learn patterns from historical data and provide accurate forecasting results. Secondly, a convolutional layer-based neural network model is introduced to improve the robustness of state estimation under missing measurement. Thirdly, to alleviate the overfitting of the deep learning-based DSSE, it is reformulated as a multi-task learning framework containing shared and task-specific layers. The uncertainty weighting algorithm is applied to find the optimal weights to balance different tasks. The numerical simulation on the Simbench case is used to demonstrate the effectiveness of the proposed forecast-then-estimate framework.

eess.SY↗

ThinkRepair: Self-Directed Automated Program Repair

Though many approaches have been proposed for Automated Program Repair (APR) and indeed achieved remarkable performance, they still have limitations in fixing bugs that require analyzing and reasoning about the logic of the buggy program. Recently, large language models (LLMs) instructed by prompt engineering have attracted much attention for their powerful ability to address many kinds of tasks including bug-fixing. However, the quality of the prompt will highly affect the ability of LLMs and manually constructing high-quality prompts is a costly endeavor. To address this limitation, we propose a self-directed LLM-based automated program repair, ThinkRepair, with two main phases: collection phase and fixing phase. The former phase automatically collects various chains of thoughts that constitute pre-fixed knowledge by instructing LLMs with the Chain-of-Thought (CoT) prompt. The latter phase targets fixing a bug by first selecting examples for few-shot learning and second automatically interacting with LLMs, optionally appending with feedback of testing information. Evaluations on two widely studied datasets (Defects4J and QuixBugs) by comparing ThinkRepair with 12 SOTA APRs indicate the priority of ThinkRepair in fixing bugs. Notably, ThinkRepair fixes 98 bugs and improves baselines by 27%-344.4% on Defects4J V1.2. On Defects4J V2.0, ThinkRepair fixes 12-65 more bugs than the SOTA APRs. Additionally, ThinkRepair also makes a considerable improvement on QuixBugs (31 for Java and 21 for Python at most).

cs.SE↗

Rectifier: Code Translation with Corrector via LLMs

Software migration is garnering increasing attention with the evolution of software and society. Early studies mainly relied on handcrafted translation rules to translate between two languages, the translation process is error-prone and time-consuming. In recent years, researchers have begun to explore the use of pre-trained large language models (LLMs) in code translation. However, code translation is a complex task that LLMs would generate mistakes during code translation, they all produce certain types of errors when performing code translation tasks, which include (1) compilation error, (2) runtime error, (3) functional error, and (4) non-terminating execution. We found that the root causes of these errors are very similar (e.g. failure to import packages, errors in loop boundaries, operator errors, and more). In this paper, we propose a general corrector, namely Rectifier, which is a micro and universal model for repairing translation errors. It learns from errors generated by existing LLMs and can be widely applied to correct errors generated by any LLM. The experimental results on translation tasks between C++, Java, and Python show that our model has effective repair ability, and cross experiments also demonstrate the robustness of our method.

cs.SE↗

Multitask-based Evaluation of Open-Source LLM on Software Vulnerability

This paper proposes a pipeline for quantitatively evaluating interactive Large Language Models (LLMs) using publicly available datasets. We carry out an extensive technical evaluation of LLMs using Big-Vul covering four different common software vulnerability tasks. This evaluation assesses the multi-tasking capabilities of LLMs based on this dataset. We find that the existing state-of-the-art approaches and pre-trained Language Models (LMs) are generally superior to LLMs in software vulnerability detection. However, in software vulnerability assessment and location, certain LLMs (e.g., CodeLlama and WizardCoder) have demonstrated superior performance compared to pre-trained LMs, and providing more contextual information can enhance the vulnerability assessment capabilities of LLMs. Moreover, LLMs exhibit strong vulnerability description capabilities, but their tendency to produce excessive output significantly weakens their performance compared to pre-trained LMs. Overall, though LLMs perform well in some aspects, they still need improvement in understanding the subtle differences in code vulnerabilities and the ability to describe vulnerabilities to fully realize their potential. Our evaluation pipeline provides valuable insights into the capabilities of LLMs in handling software vulnerabilities.

cs.SE↗

Diamond-lattice photonic crystals assembled from DNA origami

Colloidal self-assembly allows rational design of structures on the micrometer and submicrometer scale. One architecture that can generate complete 3D photonic band gaps is the diamond cubic lattice, which has remained difficult to realize at length scales comparable to the wavelength of visible or ultraviolet light. Here, we demonstrate three-dimensional photonic crystals self-assembled from DNA origami that act as precisely programmable patchy colloids. Our DNA-based nanoscale tetrapods crystallize into a rod-connected diamond cubic lattice with a periodicity of 170 nm. This structure serves as a scaffold for atomic layer deposition of high refractive index materials such as TiO$_2$, yielding a tunable photonic band gap in the near-ultraviolet.

physics.app-ph↗

Pros and Cons! Evaluating ChatGPT on Software Vulnerability

This paper proposes a pipeline for quantitatively evaluating interactive LLMs such as ChatGPT using publicly available dataset. We carry out an extensive technical evaluation of ChatGPT using Big-Vul covering five different common software vulnerability tasks. We evaluate the multitask and multilingual aspects of ChatGPT based on this dataset. We found that the existing state-of-the-art methods are generally superior to ChatGPT in software vulnerability detection. Although ChatGPT improves accuracy when providing context information, it still has limitations in accurately predicting severity ratings for certain CWE types. In addition, ChatGPT demonstrates some ability in locating vulnerabilities for certain CWE types, but its performance varies among different CWE types. ChatGPT exhibits limited vulnerability repair capabilities in both providing and not providing context information. Finally, ChatGPT shows uneven performance in generating CVE descriptions for various CWE types, with limited accuracy in detailed information. Overall, though ChatGPT performs well in some aspects, it still needs improvement in understanding the subtle differences in code vulnerabilities and the ability to describe vulnerabilities in order to fully realize its potential. Our evaluation framework provides valuable insights for further enhancing ChatGPT' s software vulnerability handling capabilities.

cs.SE↗

Distinguishing Look-Alike Innocent and Vulnerable Code by Subtle Semantic Representation Learning and Explanation

Though many deep learning (DL)-based vulnerability detection approaches have been proposed and indeed achieved remarkable performance, they still have limitations in the generalization as well as the practical usage. More precisely, existing DL-based approaches (1) perform negatively on prediction tasks among functions that are lexically similar but have contrary semantics; (2) provide no intuitive developer-oriented explanations to the detected results. In this paper, we propose a novel approach named SVulD, a function-level Subtle semantic embedding for Vulnerability Detection along with intuitive explanations, to alleviate the above limitations. Specifically, SVulD firstly trains a model to learn distinguishing semantic representations of functions regardless of their lexical similarity. Then, for the detected vulnerable functions, SVulD provides natural language explanations (e.g., root cause) of results to help developers intuitively understand the vulnerabilities. To evaluate the effectiveness of SVulD, we conduct large-scale experiments on a widely used practical vulnerability dataset and compare it with four state-of-the-art (SOTA) approaches by considering five performance measures. The experimental results indicate that SVulD outperforms all SOTAs with a substantial improvement (i.e., 23.5%-68.0% in terms of F1-score, 15.9%-134.8% in terms of PR-AUC and 7.4%-64.4% in terms of Accuracy). Besides, we conduct a user-case study to evaluate the usefulness of SVulD for developers on understanding the vulnerable code and the participants' feedback demonstrates that SVulD is helpful for development practice.

cs.SE↗

Continuous-Variable Quantum Key Distribution at 10 GBaud using an Integrated Photonic-Electronic Receiver

Quantum key distribution (QKD) is a well-known application of quantum information theory that guarantees information-theoretically secure key exchange. As QKD becomes more and more commercially viable, challenges such as scalability, network integration, and high production costs need to be addressed. Photonic and electronic integrated circuits that can be produced in large volumes at low cost hold the key to large-scale deployment of next-generation QKD systems. Here, we present a continuous-variable (CV) QKD system using an integrated photonic-electronic receiver that combines a silicon photonic integrated circuit implementing a phase-diverse receiver with custom-designed GaAs pHEMT transimpedance amplifiers. The QKD system operates at a classical telecom symbol rate of 10 GBaud, generating high secret key rates exceeding 0.7 Gb/s over a distance of 5 km and 0.3 Gb/s over a distance of 10 km. The secret keys are secure against collective attacks with finite-size effects taken into account. Well-designed digital signal processing enabled the high-speed operation. Our experiment sets a new record for secure quantum communication and paves the way for the next generation of CV-QKD systems.

quant-ph↗

Research on data integration of overseas discrete archives from the perspective of digital humanties

The digitization of displaced archives is of great historical and cultural significance. Through the construction of digital humanistic platforms represented by MISS platform, and the comprehensive application of IIIF technology, knowledge graph technology, ontology technology, and other popular information technologies. We can find that the digital framework of displaced archives built through the MISS platform can promote the establishment of a standardized cooperation and dialogue mechanism between the archives authoritiess and other government departments. At the same time, it can embed the works o fichives ction of digital government and the economy, promote the exploration of the integration of archives management, data management, and information resource management, and ultimately promote the construction of a digital society. By fostering a new partnership between archives departments and enterprises, think tanks, research institutes, and industry associations, the role of multiple social subjects in the modernization process of the archives governance system and governance capacity will be brought into play. The National Archives Administration has launched a special operation to recover scattered archives overseas, drawing up a list and a recovery action plan for archives lost to overseas institutions and individuals due to war and other reasons. Through the National Archives Administration, the State Administration of Cultural Heritage, the Ministry of Foreign Affairs, the Supreme People's Court, the Supreme People's Procuratorate, and the Ministry of Justice, specific recovery work is carried out by studying and working on international laws.

cs.SI↗

100 Gbps Integrated Quantum Random Number Generator Based on Vacuum Fluctuations

Emerging communication and cryptography applications call for reliable, fast, unpredictable random number generators. Quantum random number generation (QRNG) allows for the creation of truly unpredictable numbers thanks to the inherent randomness available in quantum mechanics. A popular approach is using the quantum vacuum state to generate random numbers. While convenient, this approach was generally limited in speed compared to other schemes. Here, through custom co-design of opto-electronic integrated circuits and side-information reduction by digital filtering, we experimentally demonstrated an ultrafast generation rate of 100 Gbps, setting a new record for vacuum-based quantum random number generation by one order of magnitude. Furthermore, our experimental demonstrations are well supported by an upgraded device-dependent framework that is secure against both classical and quantum side-information and that also properly considers the non-linearity in the digitization process. This ultrafast secure random number generator in the chip-scale platform holds promise for next generation communication and cryptography applications.

quant-ph↗

Page-level Optimization of e-Commerce Item Recommendations

The item details page (IDP) is a web page on an e-commerce website that provides information on a specific product or item listing. Just below the details of the item on this page, the buyer can usually find recommendations for other relevant items. These are typically in the form of a series of modules or carousels, with each module containing a set of recommended items. The selection and ordering of these item recommendation modules are intended to increase discover-ability of relevant items and encourage greater user engagement, while simultaneously showcasing diversity of inventory and satisfying other business objectives. Item recommendation modules on the IDP are often curated and statically configured for all customers, ignoring opportunities for personalization. In this paper, we present a scalable end-to-end production system to optimize the personalized selection and ordering of item recommendation modules on the IDP in real-time by utilizing deep neural networks. Through extensive offline experimentation and online A/B testing, we show that our proposed system achieves significantly higher click-through and conversion rates compared to other existing methods. In our online A/B test, our framework improved click-through rate by 2.48% and purchase-through rate by 7.34% over a static configuration.

cs.IR↗

Positive least energy solutions for $k$-coupled Schrödinger system with critical exponent: the higher dimension and cooperative case

In this paper, we study the following $k$-coupled nonlinear Schrödinger system with Sobolev critical exponent: \begin{equation*} \left\{ \begin{aligned} -Δu_i & +λ_iu_i =μ_i u_i^{2^*-1}+\sum_{j=1,j\ne i}^{k} β_{ij} u_{i}^{\frac{2^*}{2}-1}u_{j}^{\frac{2^*}{2}} \quad \hbox{in}\;Ω,\newline u_i&>0 \quad \hbox{in}\; Ω\quad \hbox{and}\quad u_i=0 \quad \hbox{on}\;\partialΩ, \quad i=1,2,\cdots, k. \end{aligned} \right. \end{equation*} Here $Ω\subset \mathbb{R}^N $ is a smooth bounded domain, $2^{*}=\frac{2N}{N-2}$ is the Sobolev critical exponent, $-λ_1(Ω)<λ_i<0, μ_i>0$ and $ β_{ij}=β_{ji}\ne 0$, where $λ_1(Ω)$ is the first eigenvalue of $-Δ$ with the Dirichlet boundary condition. We characterize the positive least energy solution of the $k$-coupled system for the purely cooperative case $β_{ij}>0$, in higher dimension $N\ge 5$. Since the $k$-coupled case is much more delicated, we shall introduce the idea of induction. We point out that the key idea is to give a more accurate upper bound of the least energy. It's interesting to see that the least energy of the $k$-coupled system decreases as $k$ grows. Moreover, we establish the existence of positive least energy solution of the limit system in $\mathbb{R}^N$, as well as classification results.

math.AP↗

Improving prediction of the terrestrial water storage anomalies during the GRACE and GRACE-FO gap with Bayesian convolutional neural networks

The Gravity Recovery and Climate Experiment (GRACE) satellite and its successor GRACE Follow-On (GRACE-FO) provide valuable and accurate observations of terrestrial water storage anomalies (TWSAs) at a global scale. However, there is an approximately one-year observation gap of TWSAs between GRACE and GRACE-FO. This poses a challenge for practical applications, as discontinuity in the TWSA observations may introduce significant biases and uncertainties in the hydrological model predictions and consequently mislead decision making. To tackle this challenge, a Bayesian convolutional neural network (BCNN) driven by climatic data is proposed in this study to bridge this gap at a global scale. Enhanced by integrating recent advances in deep learning, including the attention mechanisms and the residual and dense connections, BCNN can automatically and efficiently extract important features for TWSA predictions from multi-source input data. The predicted TWSAs are compared to the hydrological model outputs and three recent TWSA prediction products. The comparison suggests the superior performance of BCNN in providing improved predictions of TWSAs during the gap in particular in the relatively arid regions. The BCNN's ability to identify the extreme dry and wet events during the gap period is further discussed and comprehensively demonstrated by comparing with the precipitation anomalies, drought index, ground/surface water levels. Results indicate that BCNN is capable of offering a reliable solution to maintain the TWSA data continuity and quantify the impacts of climate extremes during the gap.

physics.ao-ph↗

Lattice-mismatched semiconductor heterostructures

Semiconductor heterostructure is a critical building block for modern semiconductor devices. However, forming semiconductor heterostructures of lattice-mismatch has been a great challenge for several decades. Epitaxial growth is infeasible to form abrupt heterostructures with large lattice-mismatch while mechanical-thermal bonding results in a high density of interface defects and therefore severely limits device applications. Here we show an ultra-thin oxide-interfaced approach for the successful formation of lattice-mismatched semiconductor heterostructures. Following the depiction of a theory on the role of interface oxide in forming the heterostructures, we describe experimental demonstrations of Ge/Si (diamond lattices), Si/GaAs (zinc blende lattice), GaAs/GaN (hexagon lattice), and Si/GaN heterostructures. Extraordinary electrical performances in terms of ideality factor, current on/off ratio, and reverse breakdown voltage are measured from p-n diodes fabricated from the four types of heterostructures, significantly outperforming diodes derived from other methods. Our demonstrations indicate the versatility of the ultra-thin-oxide-interface approach in forming lattice-mismatched heterostructures, open up a much larger possibility for material combinations for heterostructures, and pave the way toward broader applications in electronic and optoelectronic realms.

physics.app-ph↗