Searcharxiv⌕ Search

arXiv subjects

Junwei Liu

Publications and source records attributed to Junwei Liu.

At least 73 records · Page 4Linked to original sources

STALL+: Boosting LLM-based Repository-level Code Completion with Static Analysis

Repository-level code completion is challenging as it involves complicated contexts from multiple files in the repository. To date, researchers have proposed two technical categories to enhance LLM-based repository-level code completion, i.e., retrieval-augmented generation (RAG) and static analysis integration. This work performs the first study on the static analysis integration in LLM-based repository-level code completion by investigating both the effectiveness and efficiency of static analysis integration strategies across different phases of code completion. We first implement a framework STALL+, which supports an extendable and customizable integration of multiple static analysis strategies into the complete pipeline of LLM-based repository-level code completion; and based on STALL+, we perform extensive experiments by including different code LLMs on the latest repository-level code completion benchmark CrossCodeEval. Our findings show that integrating file-level dependencies in prompting phase performs the best while the integration in post-processing phase performs the worse. Additionally, we observe different improvements from static analysis between dynamic languages and static languages, i.e., the best combination is prompting-phase with decoding-phase integration for Java while the best combination is prompting-phase with post-processing-phase integration for Python given the limitations of statically analyzing dynamic languages. Additionally, we find the complementarity between RAG and static analysis integration as well as their cost-effectiveness after combination.

cs.SE↗

Observation of non-volatile anomalous Nernst effect in altermagnet with collinear Néel vector

Anomalous Nernst effect (ANE), a widely investigated transverse thermoelectric effect that converts waste heat into electrical energy with remarkable flexibility and integration capability, has been extended to antiferromagnets with non-collinear spin texture recently. ANE in compensated magnet with collinear Néel vector will bring more opportunities to construct magnetic-field-immune and ultrafast transverse thermoelectric converters, but remains unachieved for long. It is due to the degenerated band structure of traditional collinear compensated magnet excludes non-zero Berry curvature. Here, we realize non-volatile ANE in altermagnet Mn5Si3 thin film with collinear Neel vector, whose unique alternating spin-splitting band structure plays vital role in creating non-zero Berry curvature and hotpots of anomalous Nernst conductivity near band intersections. Interestingly, ANE is relatively weak in stoichiometric Mn5Si3, but undergoes a sixfold enhancement through strategically raising the Fermi level by additional Mn doping, indicating sensitive intrinsic influence from specific location of the Fermi level on ANE in altermagnet. Moreover, our investigation reveals a unique Neel-vector-dependent temperature-scaling relationship of anomalous Nernst conductivity in Mn5Si3. Our work not only fills a longstanding gap by confirming the presence of non-volatile ANE in collinear compensated magnet, but also enlightens thermoelectric physics related to exotic spin-splitting band structure in altermagnet.

cond-mat.mtrl-sci↗

SynFundus-1M: A High-quality Million-scale Synthetic fundus images Dataset with Fifteen Types of Annotation

Large-scale public datasets with high-quality annotations are rarely available for intelligent medical imaging research, due to data privacy concerns and the cost of annotations. In this paper, we release SynFundus-1M, a high-quality synthetic dataset containing over one million fundus images in terms of \textbf{eleven disease types}. Furthermore, we deliberately assign four readability labels to the key regions of the fundus images. To the best of our knowledge, SynFundus-1M is currently the largest fundus dataset with the most sophisticated annotations. Leveraging over 1.3 million private authentic fundus images from various scenarios, we trained a powerful Denoising Diffusion Probabilistic Model, named SynFundus-Generator. The released SynFundus-1M are generated by SynFundus-Generator under predefined conditions. To demonstrate the value of SynFundus-1M, extensive experiments are designed in terms of the following aspect: 1) Authenticity of the images: we randomly blend the synthetic images with authentic fundus images, and find that experienced annotators can hardly distinguish the synthetic images from authentic ones. Moreover, we show that the disease-related vision features (e.g. lesions) are well simulated in the synthetic images. 2) Effectiveness for down-stream fine-tuning and pretraining: we demonstrate that retinal disease diagnosis models of either convolutional neural networks (CNN) or Vision Transformer (ViT) architectures can benefit from SynFundus-1M, and compared to the datasets commonly used for pretraining, models trained on SynFundus-1M not only achieve superior performance but also demonstrate faster convergence on various downstream tasks. SynFundus-1M is already public available for the open-source community.

cs.CV↗

Crystal design of altermagnetism

Symmetry plays a fundamental role in condensed matter. The unique entanglement between magnetic sublattices and alternating crystal environment in altermagnets provides a unique opportunity for designing magnetic space symmetry. There have been extensive experimental efforts concentrated on tuning the Neel vector to reconstruct altermagnetic symmetry. However, it remains challenging to modulate the altermagnetic symmetry through the crystal aspect. Here, the crystal design of altermagnetism is successfully realized, by breaking glide mirrors and magnetic mirrors of the (0001) crystallographic plane in CrSb films via crystal distortion. We establish a locking relationship between altermagnetic symmetry and the emergent Dzyaloshinskii-Moriya (DM) vectors in different CrSb films, realizing unprecedentedly room-temperature spontaneous anomalous Hall effect in an altermagnetic metal. The concept of exchange-coupling torques is broadened to include both antiferromagnetic exchange-coupling torque and DM torque. Their relationship is designable, determining electrical manipulation modes, e.g., field-assisted switching for CrSb(1-100)/Pt and field-free switching for W/CrSb(11-20). Particularly, the unprecedentedly field-free 100-percent switching of Neel vectors is realized by making these two torques parallel or antiparallel, dependent on Neel vector orientation. Besides unravelling the rich mechanisms for electrical manipulation of altermagnetism rooted in broadened concept of exchange-coupling torques, we list other material candidates and propose that crystal design of altermagnetism would bring rich designability to magnonics, topology, etc.

cond-mat.mtrl-sci↗

Observation of Giant Spin Splitting and d-wave Spin Texture in Room Temperature Altermagnet RuO2

Recently, a novel magnetic phase called altermagnetism has been proposed, ushering in a third distinct magnetic phase beyond ferromagnetism and antiferromagnetism. It is expected that this groundbreaking phase exhibits unique physical properties such as C-paired spin-valley locking, anomalous Hall effect, nontrivial Berry phase, and giant magnetoresistance, etc. Among all the predicted candidates, several room temperature altermagnets are suggested to host significant potential applications in the near future. Nevertheless, direct evidence about the spin pattern of the room temperature altermagnet is still unrevealed. Previous studies found that RuO2 is identified as the most promising candidate for room temperature d-wave altermagnetism, exhibiting a substantial spin splitting of up to 1.4 eV. In this study, utilizing angle-resolved photoemission spectroscopy (ARPES), we report experimental observation of the spin splitting in RuO2. Furthermore, employing spin-ARPES, we directly observed the d-wave spin pattern. Our results unequivocally show that RuO2 is a perfect d-wave altermagnet with great potential for upcoming spintronic applications.

cond-mat.mtrl-sci↗

Electrical 180o switching of Néel vector in spin-splitting antiferromagnet

Antiferromagnetic spintronics have attracted wide attention due to its great potential in constructing ultra-dense and ultra-fast antiferromagnetic memory that suits modern high-performance information technology. The electrical 180o switching of Néel vector is a long-term goal for developing electrical-controllable antiferromagnetic memory with opposite Néel vectors as binary "0" and "1". However, the state-of-art antiferromagnetic switching mechanisms have long been limited for 90o or 120o switching of Néel vector, which unavoidably require multiple writing channels that contradicts ultra-dense integration. Here, we propose a deterministic switching mechanism based on spin-orbit torque with asymmetric energy barrier, and experimentally achieve electrical 180o switching of spin-splitting antiferromagnet Mn5Si3. Such a 180o switching is read out by the Néel vector-induced anomalous Hall effect. Based on our writing and readout methods, we fabricate an antiferromagnet device with electrical-controllable high and low resistance states that accomplishes robust write and read cycles. Besides fundamental advance, our work promotes practical spin-splitting antiferromagnetic devices based on spin-splitting antiferromagnet.

cond-mat.mtrl-sci↗

ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generation

In this work, we make the first attempt to evaluate LLMs in a more challenging code generation scenario, i.e. class-level code generation. We first manually construct the first class-level code generation benchmark ClassEval of 100 class-level Python code generation tasks with approximately 500 person-hours. Based on it, we then perform the first study of 11 state-of-the-art LLMs on class-level code generation. Based on our results, we have the following main findings. First, we find that all existing LLMs show much worse performance on class-level code generation compared to on standalone method-level code generation benchmarks like HumanEval; and the method-level coding ability cannot equivalently reflect the class-level coding ability among LLMs. Second, we find that GPT-4 and GPT-3.5 still exhibit dominate superior than other LLMs on class-level code generation, and the second-tier models includes Instruct-Starcoder, Instruct-Codegen, and Wizardcoder with very similar performance. Third, we find that generating the entire class all at once (i.e. holistic generation strategy) is the best generation strategy only for GPT-4 and GPT-3.5, while method-by-method generation (i.e. incremental and compositional) is better strategies for the other models with limited ability of understanding long instructions and utilizing the middle information. Lastly, we find the limited model ability of generating method-dependent code and discuss the frequent error types in generated classes. Our benchmark is available at https://github.com/FudanSELab/ClassEval.

cs.CL↗

Evaluating Instruction-Tuned Large Language Models on Code Comprehension and Generation

In this work, we evaluate 10 open-source instructed LLMs on four representative code comprehension and generation tasks. We have the following main findings. First, for the zero-shot setting, instructed LLMs are very competitive on code comprehension and generation tasks and sometimes even better than small SOTA models specifically fine-tuned on each downstream task. We also find that larger instructed LLMs are not always better on code-related tasks. Second, for the few-shot setting, we find that adding demonstration examples substantially helps instructed LLMs perform better on most code comprehension and generation tasks; however, the examples would sometimes induce unstable or even worse performance. Furthermore, we find widely-used BM25-based shot selection strategy significantly outperforms the basic random selection or fixed selection only on generation problems. Third, for the fine-tuning setting, we find that fine-tuning could further improve the model performance on downstream code comprehension and generation tasks compared to the zero-shot/one-shot performance. In addition, after being fine-tuned on the same downstream task dataset, instructed LLMs outperform both the small SOTA models and similar-scaled LLMs without instruction tuning. Based on our findings, we further present practical implications on model and usage recommendation, performance and cost trade-offs, and future direction.

cs.CL↗

Coordinated Defense Allocation in Reach-Avoid Scenarios with Efficient Online Optimization

In this paper, we present a dual-layer online optimization strategy for defender robots operating in multiplayer reach-avoid games within general convex environments. Our goal is to intercept as many attacker robots as possible without prior knowledge of their strategies. To balance optimality and efficiency, our approach alternates between coordinating defender coalitions against individual attackers and allocating coalitions to attackers based on predicted single-attack coordination outcomes. We develop an online convex programming technique for single-attack defense coordination, which not only allows adaptability to joint states but also identifies the maximal region of initial joint states that guarantees successful attack interception. Our defense allocation algorithm utilizes a hierarchical iterative method to approximate integer linear programs with a monotonicity constraint, reducing computational burden while ensuring enhanced defense performance over time. Extensive simulations conducted in 2D and 3D environments validate the efficacy of our approach in comparison to state-of-the-art approaches, and show its applicability in wheeled mobile robots and quadcopters.

cs.RO↗

Unconventional ferroelectricity in half-filling states of antiparallel stacking of twisted WSe2

Abstract: We report on emergence of an abnormal electronic polarization in twisted double bilayer WSe2 in antiparallel interface stacking geometry, where local centrosymmetry of atomic registries at the twist interface does not favor the spontaneous electronic polarizations as recently observed in the parallel interface stacking geometry. The unconventional ferroelectric behaviors probed by electronic transport measurement occur at half filling insulating states at 1.5 K and gradually disappear at about 40 K. Single band Hubbard model based on the triangular moiré lattice and the interlayer charge transfer controlled by insulating phase transition are proposed to interpret the formation of electronic polarization states near half filling in twisted WSe2 devices. Our work highlights the prominent role of many-body electronic interaction in fostering novel quantum states in moiré-structured systems.

cond-mat.mes-hall↗

Fast Online Hashing with Multi-Label Projection

Hashing has been widely researched to solve the large-scale approximate nearest neighbor search problem owing to its time and storage superiority. In recent years, a number of online hashing methods have emerged, which can update the hash functions to adapt to the new stream data and realize dynamic retrieval. However, existing online hashing methods are required to update the whole database with the latest hash functions when a query arrives, which leads to low retrieval efficiency with the continuous increase of the stream data. On the other hand, these methods ignore the supervision relationship among the examples, especially in the multi-label case. In this paper, we propose a novel Fast Online Hashing (FOH) method which only updates the binary codes of a small part of the database. To be specific, we first build a query pool in which the nearest neighbors of each central point are recorded. When a new query arrives, only the binary codes of the corresponding potential neighbors are updated. In addition, we create a similarity matrix which takes the multi-label supervision information into account and bring in the multi-label projection loss to further preserve the similarity among the multi-label data. The experimental results on two common benchmarks show that the proposed FOH can achieve dramatic superiority on query time up to 6.28 seconds less than state-of-the-art baselines with competitive retrieval accuracy.

cs.DB↗

Robust Retinal Vessel Segmentation from a Data Augmentation Perspective

Retinal vessel segmentation is a fundamental step in screening, diagnosis, and treatment of various cardiovascular and ophthalmic diseases. Robustness is one of the most critical requirements for practical utilization, since the test images may be captured using different fundus cameras, or be affected by various pathological changes. We investigate this problem from a data augmentation perspective, with the merits of no additional training data or inference time. In this paper, we propose two new data augmentation modules, namely, channel-wise random Gamma correction and channel-wise random vessel augmentation. Given a training color fundus image, the former applies random gamma correction on each color channel of the entire image, while the latter intentionally enhances or decreases only the fine-grained blood vessel regions using morphological transformations. With the additional training samples generated by applying these two modules sequentially, a model could learn more invariant and discriminating features against both global and local disturbances. Experimental results on both real-world and synthetic datasets demonstrate that our method can improve the performance and robustness of a classic convolutional neural network architecture. The source code is available at \url{https://github.com/PaddlePaddle/Research/tree/master/CV/robust_vessel_segmentation}.

eess.IV↗

Instantaneous Capture Input for Balancing the Variable Height Inverted Pendulum

Balancing is a fundamental need for legged robots due to their unstable floating-base nature. Balance control has been thoroughly studied for simple models such as the linear inverted pendulum thanks to the concept of the instantaneous capture point (ICP), yet the constant center of mass height assumption limits the application. This paper explores balancing of the variable-height inverted pendulum (VHIP) model by introducing the \emph{instantaneous capture input} (ICI), an extension of the ICP based on its key properties. Namely, the ICI can be computed as a function of the state, and when this function is used as the control policy, the ICI is rendered stationary and the system will eventually come to a stop. This characterization induces an analytical region of capturable states for the VHIP, which can be used to conceptually guide where to step. To further address state and control constraints during recovery, we present and theoretically analyze an explicit ICI-based controller with online optimal feedback gains. Simulations demonstrate the validity of our controller for capturability maintenance compared to an approach based on the divergent component of motion.

cs.RO↗

Bridging the gap between atomically thin semiconductors and metal leads

Electrically interfacing atomically thin transition metal dichalcogenide semiconductors (TMDSCs) with metal leads is challenging because of undesired interface barriers, which have drastically constrained the electrical performance of TMDSC devices for exploring their unconventional physical properties and realizing potential electronic applications. Here we demonstrate a strategy to achieve nearly barrier-free electrical contacts with few-layer TMDSCs by engineering interfacial bonding distortion. The carrier-injection efficiency of such electrical junction is substantially increased with robust ohmic behaviors from room to cryogenic temperatures. The performance enhancements of TMDSC field-effect transistors are well reflected by the ultralow contact resistance (down to 90 Ohm um in MoS2, towards the quantum limit), the ultrahigh field-effect mobility (up to 358,000 cm2V-1s-1 in WSe2) and the prominent transport characteristics at cryogenic temperatures. This method also offers new possibilities of the local manipulation of structures and electronic properties for TMDSC device design.

cond-mat.mtrl-sci↗

Multifunctional Antiferromagnetic Materials with Giant Piezomagnetism and Noncollinear Spin Current

We propose a new type of spin-valley locking (SVL), named $\textit{C}$-paired SVL, in antiferromagnetic systems, which directly connects the spin/valley space with the real space, and hence enables both static and dynamical controls of spin and valley to realize a multifunctional antiferromagnetic material. The new emergent quantum degree of freedom in the $\textit{C}$-paired SVL is comprised of spin-polarized valleys related by a crystal symmetry instead of the time-reversal symmetry. Thus, both spin and valley can be accessed by simply breaking the corresponding crystal symmetry. Typically, one can use a strain field to induce a large net valley polarization/magnetization and use a charge current to generate a large noncollinear spin current. We predict the realization of the $\textit{C}$-paired SVL in monolayer V$_2$Se$_2$O, which indeed exhibits giant piezomagnetism and can generate a large transverse spin current. Our findings provide unprecedented opportunities to integrate various controls of spin and valley with nonvolatile information storage in a single material, which is highly desirable for versatile fundamental research and device applications.

cond-mat.mtrl-sci↗

Realistic tight-binding model for monolayer transition metal dichalcogenides in 1T' structure

Monolayer transition metal dichalcogenides $MX_2$ ($M$ = Mo,W and $X$ = Te, Se, S) in 1T' structure were predicted to be quantum spin Hall insulators based on first-principles calculations, which were quickly confirmed by multiple experimental groups. For a better understanding of their properties, in particular their responses to external fields, we construct a realistic four-band tight-binding (TB) model by combining the symmetry analysis and first-principles calculations. Our TB model respects all the symmetries and can accurately reproduce the band structure in a large energy window from -0.3 eV to 0.8 eV. With the inclusion of spin-orbital coupling (SOC), our TB model can characterize the nontrivial topology and the corresponding edge states. Our TB model can also capture the anisotropic strain effects on the band structure and the strain-induced metal-insulator transition. Moreover, we found that although $MX_2$ share the same crystal structures and have the same crystal symmetries, while the orbital composition of states around the Fermi level are qualitatively different and their lower-energy properties cannot fully described by a single k $\cdot$ p model. Thus, we construct two different types of k $\cdot$ p model for $M$S$_2$,$M$Se$_2$ and $M$Te$_2$, respectively. Benefiting from the high accuracy and simplicity, our TB and k $\cdot$ p models can serve as a solid and concrete starting point for future studies of transport, superconductivity, strong correlation effects and twistronics in 1T'-transition metal dichalcogenides.

cond-mat.mtrl-sci↗

Ferromagnetic helical nodal line and Kane-Mele spin-orbit coupling in kagome metal Fe3Sn2

The two-dimensional kagome lattice hosts Dirac fermions at its Brillouin zone corners K and K', analogous to the honeycomb lattice. In the density functional theory electronic structure of ferromagnetic kagome metal Fe$_3$Sn$_2$, without spin-orbit coupling we identify two energetically split helical nodal lines winding along $z$ in the vicinity of K and K' resulting from the trigonal stacking of the kagome layers. We find that hopping across A-A stacking introduces a layer splitting in energy while that across A-B stacking controls the momentum space amplitude of the helical nodal lines. The effect of spin-orbit coupling is found to resemble that of a Kane-Mele term, where the nodal lines can either be fully gapped to quasi-two-dimensional massive Dirac fermions, or remain gapless at discrete Weyl points depending on the ferromagnetic moment orientation. Aside from numerically establishing Fe$_3$Sn$_2$ as a model Dirac kagome metal, our results provide insights into materials design of topological phases from the lattice point of view, where paradigmatic low dimensional lattice models often find realizations in crystalline materials with three-dimensional stacking.

cond-mat.mtrl-sci↗

Scalability of all-optical neural networks based on spatial light modulators

Optical implementation of artificial neural networks has been attracting great attention due to its potential in parallel computation at speed of light. Although all-optical deep neural networks (AODNNs) with a few neurons have been experimentally demonstrated with acceptable errors recently, the feasibility of large scale AODNNs remains unknown because error might accumulate inevitably with increasing number of neurons and connections. Here, we demonstrate a scalable AODNN with programmable linear operations and tunable nonlinear activation functions. We verify its scalability by measuring and analyzing errors propagating from a single neuron to the entire network. The feasibility of AODNNs is further confirmed by recognizing handwritten digits and fashions respectively.

physics.optics↗