Searcharxiv⌕ Search

arXiv subjects

Jiakun Liu

Publications and source records attributed to Jiakun Liu.

At least 37 records · Page 2Linked to original sources

Regularity of singular set in optimal transportation

In this paper, we establish a regularity theory for the optimal transport problem when the target is composed of two disjoint convex domains. This is an important model in which singularities arise. Even though the singular set does not exhibit any form of convexity a priori, we prove its higher order regularity by developing novel methods, which also have many other applications. Notably, our results are achieved without requiring any convexity of the source domain. This aligns with Caffarelli's celebrated regularity theory.

math.AP↗

LLM4SZZ: Enhancing SZZ Algorithm with Context-Enhanced Assessment on Large Language Models

The SZZ algorithm is the dominant technique for identifying bug-inducing commits and serves as a foundation for many software engineering studies, such as bug prediction and static code analysis. Researchers have proposed many variants to enhance the SZZ algorithm's performance since its introduction. The majority of them rely on static techniques or heuristic assumptions, making them easy to implement, but their performance improvements are often limited. Recently, a deep learning-based SZZ algorithm has been introduced to enhance the original SZZ algorithm. However, it requires complex preprocessing and is restricted to a single programming language. Additionally, while it enhances precision, it sacrifices recall. Furthermore, most of variants overlook crucial information, such as commit messages and patch context, and are limited to bug-fixing commits involving deleted lines. The emergence of large language models (LLMs) offers an opportunity to address these drawbacks. In this study, we investigate the strengths and limitations of LLMs and propose LLM4SZZ, which employs two approaches (i.e., rank-based identification and context-enhanced identification) to handle different types of bug-fixing commits. We determine which approach to adopt based on the LLM's ability to comprehend the bug and identify whether the bug is present in a commit. The context-enhanced identification provides the LLM with more context and requires it to find the bug-inducing commit among a set of candidate commits. In rank-based identification, we ask the LLM to select buggy statements from the bug-fixing commit and rank them based on their relevance to the root cause. Experimental results show that LLM4SZZ outperforms all baselines across three datasets, improving F1-score by 6.9% to 16.0% without significantly sacrificing recall.

cs.SE↗

RustMap: Towards Project-Scale C-to-Rust Migration via Program Analysis and LLM

Migrating existing C programs into Rust is increasingly desired, as Rust offers superior memory safety while maintaining C's high performance. However, vastly different features between C and Rust--e.g., distinct definitions and usages of pointers and references--pose significant challenges beyond mere syntactic translation. Existing automated translation tools, such as C2Rust, may rely too much on syntactic, template-based translation and generate unsafe Rust code that is hard for human developers to read, maintain, or even compile. More semantic-aware translation that produces safer, idiomatic, and runnable Rust code is much needed. This paper introduces a novel dependency-guided and large language model (LLM)-based C-to-Rust translation approach, RustMap, based on three key ideas: (1) Utilize LLM capabilities to produce idiomatic Rust code from given small pieces of C code, (2) Mitigate LLM limitations in handling large codebases by breaking project-scale C programs into smaller units for translation according to their usage dependencies and composing them into a runnable Rust program, and (3) Enhance the correctness of the translated Rust program by using test cases to check input/output equivalence, isolate faulty code when execution states deviate, and iteratively refine the translation using feedback from compilation and test errors. We empirically evaluate RustMap on 126 real-world programs, including 125 from Rosetta Code and a 7000+ line bzip2 implementation using GPT-4o as the LLM. RustMap shows promising results, guiding GPT-4o to produce idiomatic, readable, and functional Rust code with significantly less unsafe code than other tools, and revealing non-trivial translation patterns reusable for future research.

cs.SE↗

Shelving it rather than Ditching it: Dynamically Debloating DEX and Native Methods of Android Applications without APK Modification

Today's Android developers tend to include numerous features to accommodate diverse user requirements, which inevitably leads to bloated apps. Yet more often than not, only a fraction of these features are frequently utilized by users, thus a bloated app costs dearly in potential vulnerabilities, expanded attack surfaces, and additional resource consumption. Especially in the event of severe security incidents, users have the need to block vulnerable functionalities immediately. Existing works have proposed various code debloating approaches for identifying and removing features of executable components. However, they typically involve static modification of files (and, for Android apps, repackaging of APKs, too), which lacks user convenience let alone undermining the security model of Android due to the compromising of public key verification and code integrity checks. This paper introduces 3DNDroid, a Dynamic Debloating approach targeting both DEX and Native methods in AnDroid apps. Using an unprivileged management app in tandem with a customized Android OS, 3DNDroid dynamically reduces unnecessary code loading during app execution based on a pre-generated debloating schema from static or dynamic analyses. It intercepts invocations of debloated bytecode methods to prevent their interpretation, compilation, and execution, while zero-filling memory spaces of debloated native methods during code loading. Evaluation demonstrates 3DNDroid's ability to debloat 187 DEX methods and 30 native methods across 55 real-world apps, removing over 10K Return-Oriented Programming (ROP) gadgets. Case studies confirm its effectiveness in mitigating vulnerabilities, and performance assessments highlight its resource-saving advantages over non-debloated apps.

cs.CR↗

A Rate-Distortion Analysis for Composite Sources Under Subsource-Dependent Fidelity Criteria

A composite source, consisting of multiple subsources and a memoryless switch, outputs one symbol at a time from the subsource selected by the switch. If some data should be encoded more accurately than other data from an information source, the composite source model is suitable because in this model different distortion constraints can be put on the subsources. In this context, we propose subsource-dependent fidelity criteria for composite sources and use them to formulate a rate-distortion problem. We solve the problem and obtain a single-letter expression for the rate-distortion function. Further rate-distortion analysis characterizes the performance of classify-then-compress (CTC) coding, which is frequently used in practice when subsource-dependent fidelity criteria are considered. Our analysis shows that CTC coding generally has performance loss relative to optimal coding, even if the classification is perfect. We also identify the cause of the performance loss, that is, class labels have to be reproduced in CTC coding. Last but not least, we show that the performance loss is negligible for asymptotically small distortion if CTC coding is appropriately designed and some mild conditions are satisfied.

cs.IT↗

Towards Better Comprehension of Breaking Changes in the NPM Ecosystem

Breaking changes cause a lot of effort to both downstream and upstream developers: downstream developers need to adapt to breaking changes and upstream developers are responsible for identifying and documenting them. In the NPM ecosystem, characterized by frequent code changes and a high tolerance for making breaking changes, the effort is larger. For better comprehension of breaking changes in the NPM ecosystem and to enhance breaking change detection tools, we conduct a large-scale empirical study to investigate breaking changes in the NPM ecosystem. We construct a dataset of explicitly documented breaking changes from 381 popular NPM projects. We find that 95.4% of the detected breaking changes can be covered by developers' documentation, and about 19% of the breaking changes cannot be detected by regression testing. Then in the process of investigating source code of our collected breaking changes, we yield a taxonomy of JavaScript and TypeScript-specific syntactic breaking changes and a taxonomy of major types of behavioral breaking changes. Additionally, we investigate the reasons why developers make breaking changes in NPM and find three major reasons, i.e., to reduce code redundancy, to improve identifier name, and to improve API design, and each category contains several sub-items. We provide actionable implications for future research, e.g., automatic naming and renaming techniques should be applied in JavaScript projects to improve identifier names, future research can try to detect more types of behavioral breaking changes. By presenting the implications, we also discuss the weakness of automatic renaming and breaking change detection approaches.

cs.SE↗

A Substructure Perturbation Method for Systematic Design of Mechanical Metamaterials with Programmed Functionalities

Mechanical metamaterials utilize geometry to achieve exceptional mechanical properties, including those not typically possible for traditional materials. To achieve these properties, it is necessary to identify the proper structures and geometries, which is often a non-trivial and computationally expensive process. Here, we propose a Substructure Perturbation Method (SSPM) for systematic design and search of these materials with programmed deformation modes. We present the theoretical fundamentals and computational algorithms of the SSPM, along with four design problems to investigate the effect and performance of the SSPM. Results reveal the necessity of analyzing multiple substructures simultaneously in obtaining successful designs, and its effectiveness in speeding up numerical processes. In one design case, SSPM is shown to be effectively two orders of magnitude faster than another state-of-art approach while using less computational resources. We also show an experimental validation where the fabricated prototypes can grasp objects respectively by undergoing programmed deformations under corresponding inputs. The proposed SSPM provides new fundamentals and strategies for the design of mechanical metamaterials with advanced functionalities.

physics.app-ph↗

PTM4Tag+: Tag Recommendation of Stack Overflow Posts with Pre-trained Models

Stack Overflow is one of the most influential Software Question & Answer (SQA) websites, hosting millions of programming-related questions and answers. Tags play a critical role in efficiently organizing the contents in Stack Overflow and are vital to support a range of site operations, e.g., querying relevant content. Poorly selected tags often raise problems like tag ambiguity and tag explosion. Thus, a precise and accurate automated tag recommendation technique is demanded. Inspired by the recent success of pre-trained models (PTMs) in natural language processing (NLP), we present PTM4Tag+, a tag recommendation framework for Stack Overflow posts that utilizes PTMs in language modeling. PTM4Tag+ is implemented with a triplet architecture, which considers three key components of a post, i.e., Title, Description, and Code, with independent PTMs. We utilize a number of popular pre-trained models, including the BERT-based models (e.g., BERT, RoBERTa, CodeBERT, BERTOverflow, and ALBERT), and encoder-decoder models (e.g., PLBART, CoTexT, and CodeT5). Our results show that leveraging CodeT5 under the PTM4Tag+ framework achieves the best performance among the eight considered PTMs and outperforms the state-of-the-art Convolutional Neural Network-based approach by a substantial margin in terms of average P recision@k, Recall@k, and F1-score@k (k ranges from 1 to 5). Specifically, CodeT5 improves the performance of F1-score@1-5 by 8.8%, 12.4%, 15.3%, 16.4%, and 16.6%. Moreover, to address the concern with inference latency, we experiment PTM4Tag+ with smaller PTM models (i.e., DistilBERT, DistilRoBERTa, CodeBERT-small, and CodeT5-small). We find that although smaller PTMs cannot outperform larger PTMs, they still maintain over 93.96% of the performance on average, meanwhile shortening the mean inference time by more than 47.2%

cs.SE↗

Exploring the Capabilities of LLMs for Code Change Related Tasks

Developers deal with code-change-related tasks daily, e.g., reviewing code. Pre-trained code and code-change-oriented models have been adapted to help developers with such tasks. Recently, large language models (LLMs) have shown their effectiveness in code-related tasks. However, existing LLMs for code focus on general code syntax and semantics rather than the differences between two code versions. Thus, it is an open question how LLMs perform on code-change-related tasks. To answer this question, we conduct an empirical study using \textgreater 1B parameters LLMs on three code-change-related tasks, i.e., code review generation, commit message generation, and just-in-time comment update, with in-context learning (ICL) and parameter-efficient fine-tuning (PEFT, including LoRA and prefix-tuning). We observe that the performance of LLMs is poor without examples and generally improves with examples, but more examples do not always lead to better performance. LLMs tuned with LoRA have comparable performance to the state-of-the-art small pre-trained models. Larger models are not always better, but \textsc{Llama~2} and \textsc{Code~Llama} families are always the best. The best LLMs outperform small pre-trained models on the code changes that only modify comments and perform comparably on other code changes. We suggest future work should focus more on guiding LLMs to learn the knowledge specific to the changes related to code rather than comments for code-change-related tasks.

cs.SE↗

PAC Learnability for Reliable Communication over Discrete Memoryless Channels

In practical communication systems, knowledge of channel models is often absent, and consequently, transceivers need be designed based on empirical data. In this work, we study data-driven approaches to reliably choosing decoding metrics and code rates that facilitate reliable communication over unknown discrete memoryless channels (DMCs). Our analysis is inspired by the PAC (probably approximately correct) learning theory and does not rely on any assumptions on the statistical characteristics of DMCs. We show that a naive plug-in algorithm for choosing decoding metrics is likely to fail for finite training sets. We propose an alternative algorithm called the virtual sample algorithm and establish a non-asymptotic lower bound on its performance. The virtual sample algorithm is then used as a building block for constructing a learning algorithm that chooses a decoding metric and a code rate using which a transmitter and a receiver can reliably communicate at a rate arbitrarily close to the channel mutual information. Therefore, we conclude that DMCs are PAC learnable.

cs.IT↗

APIDocBooster: An Extract-Then-Abstract Framework Leveraging Large Language Models for Augmenting API Documentation

API documentation is often the most trusted resource for programming. Many approaches have been proposed to augment API documentation by summarizing complementary information from external resources such as Stack Overflow. Existing extractive-based summarization approaches excel in producing faithful summaries that accurately represent the source content without input length restrictions. Nevertheless, they suffer from inherent readability limitations. On the other hand, our empirical study on the abstractive-based summarization method, i.e., GPT-4, reveals that GPT-4 can generate coherent and concise summaries but presents limitations in terms of informativeness and faithfulness. We introduce APIDocBooster, an extract-then-abstract framework that seamlessly fuses the advantages of both extractive (i.e., enabling faithful summaries without length limitation) and abstractive summarization (i.e., producing coherent and concise summaries). APIDocBooster consists of two stages: (1) \textbf{C}ontext-aware \textbf{S}entence \textbf{S}ection \textbf{C}lassification (CSSC) and (2) \textbf{UP}date \textbf{SUM}marization (UPSUM). CSSC classifies API-relevant information collected from multiple sources into API documentation sections. UPSUM first generates extractive summaries distinct from the original API documentation and then generates abstractive summaries guided by extractive summaries through in-context learning. To enable automatic evaluation of APIDocBooster, we construct the first dataset for API document augmentation. Our automatic evaluation results reveal that each stage in APIDocBooster outperforms its baselines by a large margin. Our human evaluation also demonstrates the superiority of APIDocBooster over GPT-4 and shows that it improves informativeness, relevance, and faithfulness by 13.89\%, 15.15\%, and 30.56\%, respectively.

cs.SE↗

Analytical Prediction and Numerical Verification of Stress Concentration Profile Around an In-situ Tow Break in Resin-impregnated Filament-wound Composites

A new empirical analytical approach is developed for predicting the stress concentration profile around an in-situ tow break in filament-wound composites. A shear-lag analysis is firstly performed to solve for the perturbational axial displacement of the broken tow and resultant debonding lengths. Solution of stress field caused by tangential load on the surface of a elastic half space is then utilized in combination with superposition concepts to obtain the overload magnitudes in the neighboring tows. Subsequently, high-fidelity finite element analysis on a representative uni-directional laminate model under different stress states is performed, and excellent overall agreement is observed between analytical and numerical predictions. The proposed method takes into account essential aspects such as transversely isotropic material properties, in-situ stress states and their effect on the interfacial frictional forces in the debonded interfaces, and thus provides a convenient way to evaluate the stress concentration factors in damaged filament-wound composites. In addition, this approach can be applied to yield auxiliary failure evaluation criteria for statistical strength prediction or finite element modeling of filament-wound composites or similar structures.

physics.app-ph↗

The Devil is in the Tails: How Long-Tailed Code Distributions Impact Large Language Models

Learning-based techniques, especially advanced Large Language Models (LLMs) for code, have gained considerable popularity in various software engineering (SE) tasks. However, most existing works focus on designing better learning-based models and pay less attention to the properties of datasets. Learning-based models, including popular LLMs for code, heavily rely on data, and the data's properties (e.g., data distribution) could significantly affect their behavior. We conducted an exploratory study on the distribution of SE data and found that such data usually follows a skewed distribution (i.e., long-tailed distribution) where a small number of classes have an extensive collection of samples, while a large number of classes have very few samples. We investigate three distinct SE tasks and analyze the impacts of long-tailed distribution on the performance of LLMs for code. Our experimental results reveal that the long-tailed distribution has a substantial impact on the effectiveness of LLMs for code. Specifically, LLMs for code perform between 30.0\% and 254.0\% worse on data samples associated with infrequent labels compared to data samples of frequent labels. Our study provides a better understanding of the effects of long-tailed distributions on popular LLMs for code and insights for the future development of SE automation.

cs.SE↗

Quantum Computing for Solid Mechanics and Structural Engineering -- a Demonstration with Variational Quantum Eigensolver

Variational quantum algorithms exploit the features of superposition and entanglement to optimize a cost function efficiently by manipulating the quantum states. They are suitable for noisy intermediate-scale quantum (NISQ) computers that recently became accessible to the worldwide research community. Here, we implement and demonstrate the numerical processes on the 5-qubit and 7-qubit quantum processors on the IBM Qiskit Runtime platform. We combine the commercial finite-element-method (FEM) software ABAQUS with the implementation of Variational Quantum Eigensolver (VQE) to establish an integrated pipeline. Three examples are used to investigate the performance: a hexagonal truss, a Timoshenko beam, and a plane-strain continuum. We conduct parametric studies on the convergence of fundamental natural frequency estimation using this hybrid quantum-classical approach. Our findings can be extended to problems with many more degrees of freedom when quantum computers with hundreds of qubits become available in the near future.

quant-ph↗

Are We Ready to Embrace Generative AI for Software Q&A?

Stack Overflow, the world's largest software Q&A (SQA) website, is facing a significant traffic drop due to the emergence of generative AI techniques. ChatGPT is banned by Stack Overflow after only 6 days from its release. The main reason provided by the official Stack Overflow is that the answers generated by ChatGPT are of low quality. To verify this, we conduct a comparative evaluation of human-written and ChatGPT-generated answers. Our methodology employs both automatic comparison and a manual study. Our results suggest that human-written and ChatGPT-generated answers are semantically similar, however, human-written answers outperform ChatGPT-generated ones consistently across multiple aspects, specifically by 10% on the overall score. We release the data, analysis scripts, and detailed results at https://anonymous.4open.science/r/GAI4SQA-FD5C.

cs.SE↗

Global regularity in the Monge-Ampère obstacle problem

In this paper, we establish the global $W^{2,p}$ estimate for the Monge-Ampère obstacle problem: $(Du)_{\sharp}fχ{_{\{u>\frac{1}{2}|x|^2\}}}=g$, where $f$ and $g$ are positive continuous functions supported in disjoint bounded $C^2$ uniformly convex domains $\overlineΩ$ and $\overline{Ω^*}$, respectively. Furthermore, we assume that $\int_Ωf\geq \int_{Ω^*}g$. The main result shows that $Du:\overline U\rightarrow\overline{Ω^*}$, where $ U=\{u>\frac{1}{2}|x|^2\}$, is a $W^{1, p}$ diffeomorphism for any $p\in(1,\infty)$. Previously, it was only known to be a continuous homeomorphism according to Caffarelli and McCann \cite{CM}. It is worth noting that our result is sharp, as we can construct examples showing that even with the additional assumption of smooth densities, the optimal map $Du$ is not Lipschitz. This obstacle problem arises naturally in optimal partial transportation.

math.AP↗

Improving structural damage tolerance and fracture energy via bamboo-inspired void patterns

Bamboo has a functionally-graded microstructure that endows it with a combination of desirable properties, such as high failure strain, high toughness, and a low density. As a result, bamboo has been widely used in load-bearing structures. In this work, we study the use of bamboo-inspired void patterns to geometrically improve the failure properties of structures made from brittle polymers. We perform finite element analysis and experiments on 3D-printed structures to quantify the effect of the shape and spatial distribution of voids on the fracture behavior. The introduction of periodic, uniformly distributed voids in notched bend specimens leads to a 15-fold increase in the work of fracture relative to solid specimens. Adding a gradient to the pattern of voids leads to a cumulative 55-fold improvement in the work of fracture. Mechanistically, the individual voids result in crack blunting, which suppresses crack initiation, while neighboring voids redistribute stresses throughout the sample to enable large deformation before failure. In addition, we conduct qualitative, low-energy impact experiments on PMMA plates with laser-cut void patterns, illustrating the broader potential for this strategy to improve damage tolerance and energy absorption in a wide range of materials systems.

physics.app-ph↗