Searcharxiv⌕ Search

arXiv subjects

Kang Yang

Publications and source records attributed to Kang Yang.

At least 73 records · Page 4Linked to original sources

Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineering

Code snippet adaptation is a fundamental activity in the software development process. Unlike code generation, code snippet adaptation is not a "free creation", which requires developers to tailor a given code snippet in order to fit specific requirements and the code context. Recently, large language models (LLMs) have confirmed their effectiveness in the code generation task with promising results. However, their performance on adaptation, a reuse-oriented and context-dependent code change prediction task, is still unclear. To bridge this gap, we conduct an empirical study to investigate the performance and issues of LLMs on the adaptation task. We first evaluate the adaptation performances of three popular LLMs and compare them to the code generation task. Our result indicates that their adaptation ability is weaker than generation, with a nearly 15% decrease on pass@1 and more context-related errors. By manually inspecting 200 cases, we further investigate the causes of LLMs' sub-optimal performance, which can be classified into three categories, i.e., Unclear Requirement, Requirement Misalignment and Context Misapplication. Based on the above empirical research, we propose an interactive prompting approach to eliciting LLMs' adaptation ability. Experimental result reveals that our approach greatly improve LLMs' adaptation performance. The best-performing Human-LLM interaction successfully solves 159 out of the 202 identified defects and improves the pass@1 and pass@5 by over 40% compared to the initial instruction-based prompt. Considering human efforts, we suggest multi-agent interaction as a trade-off, which can achieve comparable performance with excellent generalization ability. We deem that our approach could provide methodological assistance for autonomous code snippet reuse and adaptation with LLMs.

cs.SE↗

Multi-head Sequence Tagging Model for Grammatical Error Correction

To solve the Grammatical Error Correction (GEC) problem , a mapping between a source sequence and a target one is needed, where the two differ only on few spans. For this reason, the attention has been shifted to the non-autoregressive or sequence tagging models. In which, the GEC has been simplified from Seq2Seq to labeling the input tokens with edit commands chosen from a large edit space. Due to this large number of classes and the limitation of the available datasets, the current sequence tagging approaches still have some issues handling a broad range of grammatical errors just by being laser-focused on one single task. To this end, we simplified the GEC further by dividing it into seven related subtasks: Insertion, Deletion, Merge, Substitution, Transformation, Detection, and Correction, with Correction being our primary focus. A distinct classification head is dedicated to each of these subtasks. the novel multi-head and multi-task learning model is proposed to effectively utilize training data and harness the information from related task training signals. To mitigate the limited number of available training samples, a new denoising autoencoder is used to generate a new synthetic dataset to be used for pretraining. Additionally, a new character-level transformation is proposed to enhance the sequence-to-edit function and improve the model's vocabulary coverage. Our single/ensemble model achieves an F0.5 of 74.4/77.0, and 68.6/69.1 on BEA-19 (test) and CoNLL-14 (test) respectively. Moreover, evaluated on JFLEG test set, the GLEU scores are 61.6 and 61.7 for the single and ensemble models, respectively. It mostly outperforms recently published state-of-the-art results by a considerable margin.

cs.CL↗

Hofstadter spectrum of Chern bands in twisted transition metal dichalcogenides

We study the topological bands in twisted bilayer transition metal dichalcogenides in an external magnetic field. We first focus on a paradigmatic model of WSe$_2$, which can be described in an adiabatic approximation as particles moving in a periodic potential and an emergent periodic magnetic field with nonzero average. We understand the magnetic-field dependent spectra of WSe$_2$ based on the point net zero flux, at which the external field cancels the average emergent field. At this point, the band structure interpolates between the tightly-bound and nearly-free (weak periodic potential) paradigms as the twist angle increases. For small twist angles, the energy levels in a magnetic field mirror the Hofstadter butterfly of the Haldane model. For larger twist angles, the isolated Chern band at zero flux evolves from nearly-free bands at the point of net zero flux. We also apply our framework to a realistic model of twisted bilayer MoTe$_2$, which has recently been suggested to feature higher Landau level analogs. We show that at negative unit flux per unit cell, the bands exhibit remarkable similarity to a backfolded parabolic dispersion, even though the adiabatic approximation is inapplicable. This backfolded parabolic dispersion naturally explains the similarity of the Chern bands at zero applied flux to the two lowest Landau levels, offering a simple picture supporting the emergence of non-Abelian states in twisted bilayer MoTe$_2$. We propose the study of magnetic field dependent band structures as a versatile method to investigate the nature of topological bands and identify Landau level analogs.

cond-mat.mes-hall↗

MindSpore Quantum: A User-Friendly, High-Performance, and AI-Compatible Quantum Computing Framework

We introduce MindSpore Quantum, a pioneering hybrid quantum-classical framework with a primary focus on the design and implementation of noisy intermediate-scale quantum (NISQ) algorithms. Leveraging the robust support of MindSpore, an advanced open-source deep learning training/inference framework, MindSpore Quantum exhibits exceptional efficiency in the design and training of variational quantum algorithms on both CPU and GPU platforms, delivering remarkable performance. Furthermore, this framework places a strong emphasis on enhancing the operational efficiency of quantum algorithms when executed on real quantum hardware. This encompasses the development of algorithms for quantum circuit compilation and qubit mapping, crucial components for achieving optimal performance on quantum processors. In addition to the core framework, we introduce QuPack, a meticulously crafted quantum computing acceleration engine. QuPack significantly accelerates the simulation speed of MindSpore Quantum, particularly in variational quantum eigensolver (VQE), quantum approximate optimization algorithm (QAOA), and tensor network simulations, providing astonishing speed. This combination of cutting-edge technologies empowers researchers and practitioners to explore the frontiers of quantum computing with unprecedented efficiency and performance.

quant-ph↗

Homotopy, Symmetry, and Non-Hermitian Band Topology

Non-Hermitian matrices are ubiquitous in the description of nature ranging from classical dissipative systems, including optical, electrical, and mechanical metamaterials, to scattering of waves and open quantum many-body systems. Seminal line-gap and point-gap classifications of non-Hermitian systems using K-theory have deepened the understanding of many physical phenomena. However, ample systems remain beyond this description; reference points and lines do not in general distinguish whether multiple non-Hermitian bands exhibit intriguing exceptional points, spectral braids and crossings. To address this we consider two different notions: non-Hermitian band gaps and separation gaps that crucially encompass a broad class of multi-band scenarios, enabling the description of generic band structures with symmetries. With these concepts, we provide a unified and comprehensive classification of both gapped and nodal systems in the presence of physically relevant parity-time ($\mathcal{PT}$) and pseudo-Hermitian symmetries using homotopy theory. This uncovers new stable topology stemming from both eigenvalues and wave functions, and remarkably also implies distinct fragile topological phases. In particular, we reveal different Abelian and non-Abelian phases in $\mathcal{PT}$-symmetric systems, described by frame and braid topology. The corresponding invariants are robust to symmetry-preserving perturbations that do not induce (exceptional) degeneracy, and they also predict the deformation rules of nodal phases. We further demonstrate that spontaneous $\mathcal{PT}$ symmetry breaking is captured by Chern-Euler and Chern-Stiefel-Whitney descriptions, a fingerprint of unprecedented non-Hermitian topology previously overlooked. These results open the door for theoretical and experimental exploration of a rich variety of novel topological phenomena in a wide range of physical platforms.

cond-mat.mes-hall↗

MARLP: Time-series Forecasting Control for Agricultural Managed Aquifer Recharge

The rapid decline in groundwater around the world poses a significant challenge to sustainable agriculture. To address this issue, agricultural managed aquifer recharge (Ag-MAR) is proposed to recharge the aquifer by artificially flooding agricultural lands using surface water. Ag-MAR requires a carefully selected flooding schedule to avoid affecting the oxygen absorption of crop roots. However, current Ag-MAR scheduling does not take into account complex environmental factors such as weather and soil oxygen, resulting in crop damage and insufficient recharging amounts. This paper proposes MARLP, the first end-to-end data-driven control system for Ag-MAR. We first formulate Ag-MAR as an optimization problem. To that end, we analyze four-year in-field datasets, which reveal the multi-periodicity feature of the soil oxygen level trends and the opportunity to use external weather forecasts and flooding proposals as exogenous clues for soil oxygen prediction. Then, we design a two-stage forecasting framework. In the first stage, it extracts both the cross-variate dependency and the periodic patterns from historical data to conduct preliminary forecasting. In the second stage, it uses weather-soil and flooding-soil causality to facilitate an accurate prediction of soil oxygen levels. Finally, we conduct model predictive control (MPC) for Ag-MAR flooding. To address the challenge of large action spaces, we devise a heuristic planning module to reduce the number of flooding proposals to enable the search for optimal solutions. Real-world experiments show that MARLP reduces the oxygen deficit ratio by 86.8% while improving the recharging amount in unit time by 35.8%, compared with the previous four years.

cs.LG↗

WindGP: Efficient Graph Partitioning on Heterogenous Machines

Graph Partitioning is widely used in many real-world applications such as fraud detection and social network analysis, in order to enable the distributed graph computing on large graphs. However, existing works fail to balance the computation cost and communication cost on machines with different power (including computing capability, network bandwidth and memory size), as they only consider replication factor and neglect the difference of machines in realistic data centers. In this paper, we propose a general graph partitioning algorithm WindGP, which can support fast and high-quality edge partitioning on heterogeneous machines. WindGP designs novel preprocessing techniques to simplify the metric and balance the computation cost according to the characteristics of graphs and machines. Also, best-first search is proposed instead of BFS and DFS, in order to generate clusters with high cohesion. Furthermore, WindGP adaptively tunes the partition results by sophisticated local search methods. Extensive experiments show that WindGP outperforms all state-of-the-art partition methods by 1.35 - 27 times on both dense and sparse distributed graph algorithms, and has good scalability with graph size and machine number.

cs.DC↗

Resilience in Platoons of Cooperative Heterogeneous Vehicles: Self-organization Strategies and Provably-correct Design

This work proposes provably-correct self-organizing strategies for platoons of heterogeneous vehicles. We refer to self-organization as the capability of a platoon to autonomously homogenize to a common group behavior. We show that self-organization promotes resilience to acceleration limits and communication failures, i.e., homogenizing to a common group behavior makes the platoon recover from these causes of impairments. In the presence of acceleration limits, resilience is achieved by self-organizing to a common constrained group behavior that prevents the vehicles from hitting their acceleration limits. In the presence of communication failures, resilience is achieved by self-organizing to a common group observer to estimate the missing information. Stability of the self-organization mechanism is studied analytically, and correctness with respect to traffic actions (e.g. emergency braking, cut-in, merging) is realized through a provably-correct safety layer. Numerical validations via the platooning toolbox OpenCDA in CARLA and via the CommonRoad platform confirm improved performance through self-organization and the provably-correct safety layer.

eess.SY↗

Robust spectral $π$ pairing in the random-field Floquet quantum Ising model

Motivated by an experiment on a superconducting quantum processor [Mi et al., Science 378, 785 (2022)], we study level pairings in the many-body spectrum of the random-field Floquet quantum Ising model. The pairings derive from Majorana zero and $π$ modes when writing the spin model in Jordan-Wigner fermions. Both splittings have lognormal distributions with random transverse fields. In contrast, random longitudinal fields affect the zero and $π$ splittings in drastically different ways. While zero pairings are rapidly lifted, the $π$ pairings are remarkably robust, or even strengthened, up to vastly larger disorder strengths. We explain our results within a self-consistent Floquet perturbation theory and study implications for boundary spin correlations. The robustness of $π$ pairings against longitudinal disorder may be useful for quantum information processing.

cond-mat.dis-nn↗

Enhancing Code Intelligence Tasks with ChatGPT

Pre-trained code models have emerged as crucial tools in various code intelligence tasks. However, their effectiveness depends on the quality of the pre-training dataset, particularly the human reference comments, which serve as a bridge between the programming language and natural language. One significant challenge is that such comments can become inconsistent with the corresponding code as the software evolves. This discrepancy can lead to suboptimal training of the models, decreasing their performances. LLMs have demonstrated superior capabilities in generating high-quality code comments. In light of that, we try to tackle the quality issue of the dataset by harnessing the power of LLMs. Specifically, we raise the question: Can we rebuild the pre-training dataset by substituting the original comments with LLM-generated ones for more effective pre-trained code models? To answer the question, we first conduct a comprehensive evaluation to compare ChatGPT-generated comments with human reference comments. As existing reference-based metrics treat the reference comments as gold standards, we introduce two auxiliary tasks as novel reference-free metrics to assess the quality of comments, i.e., code-comment inconsistency detection and code search. Experimental results show that ChatGPT-generated comments demonstrate superior semantic consistency with the code compared to human references, indicating the potential of utilizing ChatGPT to enhance the quality of the pre-training dataset. We rebuilt the widely used dataset, CodeSearchNet, with ChatGPT-generated comments. Subsequent experiments involve re-pre-training the CodeT5 with our refined dataset.Evaluation results on four generation tasks and one understanding code intelligence tasks show that the model pre-trained by ChatGPT-enhanced data outperforms its counterpart on code summarization, code generation, and code translation tasks.

cs.SE↗

Braid Protected Topological Band Structures with Unpaired Exceptional Points

We demonstrate the existence of topologically stable unpaired exceptional points (EPs), and construct simple non-Hermitian (NH) tight-binding models exemplifying such remarkable nodal phases. While fermion doubling, i.e. the necessity of compensating the topological charge of a stable nodal point by an anti-dote, rules out a direct counterpart of our findings in the realm of Hermitian semimetals, here we derive how noncommuting braids of complex energy levels may stabilize unpaired EPs. Drawing on this insight, we reveal the occurrence of a single, unpaired EP, manifested as a non-Abelian monopole in the Brillouin zone of a minimal three-band model. This third-order degeneracy represents a sweet spot within a larger topological phase that cannot be fully gapped by any local perturbation. Instead, it may only split into simpler (second-order) degeneracies that can only gap out by pairwise annihilation after having moved around inequivalent large circles of the Brillouin zone. Our results imply the incompleteness of a topological classification based on winding numbers, due to non-Abelian representations of the braid group intertwining three or more complex energy levels, and provide insights into the topological robustness of non-Hermitian systems and their non-Abelian phase transitions.

cond-mat.mes-hall↗

Prompting GPT-3.5 for Text-to-SQL with De-semanticization and Skeleton Retrieval

Text-to-SQL is a task that converts a natural language question into a structured query language (SQL) to retrieve information from a database. Large language models (LLMs) work well in natural language generation tasks, but they are not specifically pre-trained to understand the syntax and semantics of SQL commands. In this paper, we propose an LLM-based framework for Text-to-SQL which retrieves helpful demonstration examples to prompt LLMs. However, questions with different database schemes can vary widely, even if the intentions behind them are similar and the corresponding SQL queries exhibit similarities. Consequently, it becomes crucial to identify the appropriate SQL demonstrations that align with our requirements. We design a de-semanticization mechanism that extracts question skeletons, allowing us to retrieve similar examples based on their structural similarity. We also model the relationships between question tokens and database schema items (i.e., tables and columns) to filter out scheme-related information. Our framework adapts the range of the database schema in prompts to balance length and valuable information. A fallback mechanism allows for a more detailed schema to be provided if the generated SQL query fails. Ours outperforms state-of-the-art models and demonstrates strong generalization ability on three cross-domain Text-to-SQL benchmarks.

cs.CL↗

NaturalFinger: Generating Natural Fingerprint with Generative Adversarial Networks

Deep neural network (DNN) models have become a critical asset of the model owner as training them requires a large amount of resource (i.e. labeled data). Therefore, many fingerprinting schemes have been proposed to safeguard the intellectual property (IP) of the model owner against model extraction and illegal redistribution. However, previous schemes adopt unnatural images as the fingerprint, such as adversarial examples and noisy images, which can be easily perceived and rejected by the adversary. In this paper, we propose NaturalFinger which generates natural fingerprint with generative adversarial networks (GANs). Besides, our proposed NaturalFinger fingerprints the decision difference areas rather than the decision boundary, which is more robust. The application of GAN not only allows us to generate more imperceptible samples, but also enables us to generate unrestricted samples to explore the decision boundary.To demonstrate the effectiveness of our fingerprint approach, we evaluate our approach against four model modification attacks including adversarial training and two model extraction attacks. Experiments show that our approach achieves 0.91 ARUC value on the FingerBench dataset (154 models), exceeding the optimal baseline (MetaV) over 17\%.

cs.CV↗

Enhanced eigenvector sensitivity and algebraic classification of sublattice-symmetric exceptional points

Exceptional points (EPs) are degeneracy of non-Hermitian Hamiltonians, at which the eigenvalues, along with their eigenvectors, coalesce. Their orders are given by the Jordan decomposition. Here, we focus on higher-order EPs arising in fermionic systems with a sublattice symmetry, which restricts the eigenvalues of the Hamitlonian to appear in pairs of $\lbrace E, -E\rbrace $. Thus, a naive prediction might lead to only even-order EPs at zero energy. However, we show that odd-order EPs can exist and exhibit enhanced sensitivity in the behaviour of eigenvector-coalescence in their neighbourhood, depending on how we approach the degenerate point. The odd-order EPs can be understood as a mixture of higher- and lower-valued even-order EPs. Such an anomalous behaviour is related to the irregular topology of the EPs as the subspace of the Hamiltonians in question, which is a unique feature of the Jordan blocks. The enhanced eigenvector sensitivity can be described by observing how the quantum distance to the target eigenvector converges to zero. In order to capture the eigenvector-coalescence, we provide an algebraic method to describe the conditions for the existence of these EPs. This complements previous studies based on resultants and discriminants, and unveils heretofore unexplored structures of higher-order exceptional degeneracy.

quant-ph↗

Deep Reinforcement Learning for Orienteering Problems Based on Decomposition

This paper presents a new method for solving an orienteering problem (OP) by breaking it down into two parts: a knapsack problem (KP) and a traveling salesman problem (TSP). A KP solver is responsible for picking nodes, while a TSP solver is responsible for designing the proper path and assisting the KP solver in judging constraint violations. To address constraints, we propose a dual-population coevolutionary algorithm (DPCA) as the KP solver, which simultaneously maintains both feasible and infeasible populations. A dynamic pointer network (DYPN) is introduced as the TSP solver, which takes city locations as inputs and immediately outputs a permutation of nodes. The model, which is trained by reinforcement learning, can capture both the structural and dynamic patterns of the given problem. The model can generalize to other instances with different scales and distributions. Experimental results show that the proposed algorithm can outperform conventional approaches in terms of training, inference, and generalization ability.

cs.NE↗

Quantum Metric Induced Phases in Moiré Materials

We show that, quite generally, quantum geometry plays a major role in determining the low-energy physics in strongly correlated lattice models at fractional band fillings. We identify limits in which the Fubini Study metric dictates the ground states and show that this is highly relevant for Moiré materials leading to symmetry breaking and interaction driven Fermi liquids. This phenomenology stems from a remarkable interplay between the quantum geometry and interactions which is absent in continuum Landau levels but generically present in lattice models where these terms tend to destabilize e.g. fractional Chern insulators. We explain this as a consequence of the fundamental asymmetry between electrons and holes for band projected normal ordered interactions, as well as from the perspective of a self-consistent Hartree-Fock calculation. These basic insights about the role of the quantum metric turn, when dominant, an extremely strongly coupled problem into an effectively weakly coupled one, and may also serve as a guiding principle for designing material setups.

cond-mat.str-el↗

Superconductivity of repulsive spinless fermions with sublattice potentials

We explore unconventional superconductivity of repulsive spinless fermions on square and honeycomb lattices with staggered sublattice potentials. The two lattices can exhibit staggered $d$-wave and $f$-wave pairing, respectively, at low doping stemming from an effective two-valley band structure. At higher doping, in particular, the square lattice displays a much richer phase diagram including topological $p+ip$ superconductivity which is induced by a qualitatively different mechanism compared to the $d$-wave pairing. We illuminate this from several complementary perspectives: We analytically perform sublattice projection to analyze the effective continuum low-energy description and we numerically calculate the binding energies for pair and larger bound states for few-body doping near half filling. Furthermore, for finite doping, we present phase diagrams based on extensive functional renormalization group and and density matrix renormalization group calculations.

cond-mat.supr-con↗

Meta-Auto-Decoder for Solving Parametric Partial Differential Equations

Many important problems in science and engineering require solving the so-called parametric partial differential equations (PDEs), i.e., PDEs with different physical parameters, boundary conditions, shapes of computation domains, etc. Recently, building learning-based numerical solvers for parametric PDEs has become an emerging new field. One category of methods such as the Deep Galerkin Method (DGM) and Physics-Informed Neural Networks (PINNs) aim to approximate the solution of the PDEs. They are typically unsupervised and mesh-free, but require going through the time-consuming network training process from scratch for each set of parameters of the PDE. Another category of methods such as Fourier Neural Operator (FNO) and Deep Operator Network (DeepONet) try to approximate the solution mapping directly. Being fast with only one forward inference for each PDE parameter without retraining, they often require a large corpus of paired input-output observations drawn from numerical simulations, and most of them need a predefined mesh as well. In this paper, we propose Meta-Auto-Decoder (MAD), a mesh-free and unsupervised deep learning method that enables the pre-trained model to be quickly adapted to equation instances by implicitly encoding (possibly heterogenous) PDE parameters as latent vectors. The proposed method MAD can be interpreted by manifold learning in infinite-dimensional spaces, granting it a geometric insight. Extensive numerical experiments show that the MAD method exhibits faster convergence speed without losing accuracy than other deep learning-based methods. The project page with code is available: https://gitee.com/mindspore/mindscience/tree/master/MindElec/.

cs.LG↗