SearcharxivSearch

arXiv subjects

Yiheng Shen

Publications and source records attributed to Yiheng Shen.

At least 19 recordsLinked to original sources

Quality over Quantity: Diversity-Aware Data Selection for Efficient Verilog Code Generation

Large Language Models (LLMs) have shown remarkable potential in Verilog code generation, yet existing datasets contain con siderable noise and redundancy. Prior data selection methods address only isolated quality aspects, neglect the global diversity of the training set, and cannot capture Verilog-specific structural semantics. To bridge this gap, we propose VeriSelector, the first data selection framework for Verilog code generation that jointly optimizes quality and diversity. We formulate the selec tion problem as a constrained bi-objective subset selection problem and solve it via a three-stage approximation. For quality, a multi-granularity pipeline first verifies functional correctness through testbench simulation and then filters misaligned samples via Instruction-Following Difficulty (IFD) scoring. For diversity, 109-dimensional Verilog-specific structural features (AST, CFG, and Netlist) are fused with textual embeddings for clustering-based diversity modeling. A proportional adaptive sampling strat egy then allocates per-cluster quotas guided by IFD ranks, with a provable distribution preservation guarantee. Experiments on three LLMs and three benchmarks show that VeriSelector outperforms full-dataset training and state-of-the-art baselines us ing only 20%-25% of the data, achieving Performance Retention Rates above 118% and reducing training time by over 80%. Notably, VeriSelector improves average Pass@1 by 18.49%-29.43% over full-dataset training and by 1.36%-7.95% over the best-performing baseline across all evaluated models.

cs.AR

Large Language Model for Verilog Code Generation: Literature Review and the Road Ahead

Code generation has emerged as a critical research area at the intersection of Software Engineering (SE) and Artificial Intelligence (AI), attracting significant attention from both academia and industry. Within this broader landscape, Verilog, as a representative hardware description language (HDL), plays a fundamental role in digital circuit design and verification, making its automated generation particularly significant for Electronic Design Automation (EDA). Consequently, recent research has increasingly focused on applying Large Language Models (LLMs) to Verilog code generation, particularly at the Register Transfer Level (RTL), exploring how these AI-driven techniques can be effectively integrated into hardware design workflows. Despite substantial research efforts have explored LLM applications in this domain, a comprehensive survey synthesizing these developments remains absent from the literature. This review fill addresses this gap by providing a systematic literature review of LLM-based methods for Verilog code generation, examining their effectiveness, limitations, and potential for advancing automated hardware design. The review encompasses research work from conferences and journals in the fields of SE, AI, and EDA, encompassing 70 papers published on venues, along with 32 high-quality preprint papers, bringing the total to 102 papers. By answering four key research questions, we aim to (1) identify the LLMs used for Verilog generation, (2) examine the datasets and metrics employed in evaluation, (3) categorize the techniques proposed for Verilog generation, and (4) analyze LLM alignment approaches for Verilog generation. Based on our findings, we have identified a series of limitations of existing studies. Finally, we have outlined a roadmap highlighting potential opportunities for future research endeavors in LLM-assisted hardware design.

cs.AR

Dense Language Generation Made Simple: Deterministic, Randomized, and Multi-Order Algorithms

Language generation in the limit is a theoretical framework for studying how a generator can learn to produce new valid strings from a stream of positive examples. In this model, an adversary chooses an unknown language from a countable family and enumerates its elements in an arbitrary order, while the generator must eventually output only elements of the language that have not yet appeared in the enumeration. Reliable generation is thus formalized through two eventual guarantees: validity and novelty relative to the observed data. To further quantify the breadth of the generator's outputs, Kleinberg and Wei (FOCS 2025, STOC 2026) introduced lower density as a measure of output coverage. Given an order representing the importance or relevance of possible outputs, lower density is the asymptotic lower bound, as $n$ grows, on the fraction of the first $n$ elements of the target language that the generator outputs before they appear in the data. Kleinberg and Wei showed that $1/2$ is the optimal lower-density guarantee for deterministic algorithms. We develop a simple and unified framework for obtaining optimal lower-density guarantees. We first give a deterministic algorithm that recovers the optimal guarantee of $1/2$ with a significantly simpler analysis than prior work. We then demonstrate the flexibility of our framework through two extensions. First, against an oblivious adversary, randomization raises the optimal guarantee to $1-1/e$. Second, for any finite collection of orders, the optimal deterministic and randomized guarantees can be achieved simultaneously with respect to every order, so accommodating multiple notions of importance or relevance entails no loss in the optimal guarantee.

cs.DS

What drives performance in molecular MPNNs? An operator-level factorial benchmark

Message-passing neural networks (MPNNs) are widely used for molecular property prediction, but their deployment as monolithic architectures makes it difficult to identify how specific message-passing operators affect performance. We present an operator-level factorial benchmark that decomposes 2D molecular MPNNs into the three families of message-seed initialization, node-edge fusion, and node update operators. The resulting 84 configurations are benchmarked on ten MoleculeNet datasets under a shared experimental setup and statistical analysis protocol. Across this controlled design, performance variation is associated primarily with message construction rather than update complexity. Message-seed initialization shows significant family-level effects for both regression and classification, node-edge fusion shows a significant family-level effect for regression with descriptive advantages for concatenation-based mixing, and the update family shows no statistically supported effect for either endpoint family. A representation probe into the Quinethazone molecule further demonstrates that concatenation-based mixing can better differentiate chemically distinct heteroatoms and withstand oversmoothing than Hadamard gating. Representative configurations selected separately for classification and regression recover competitive performance relative to established molecular graph neural network (GNN) baselines, ranking numerically best on eight of ten benchmark datasets. These empirical results are interpreted through concise mechanistic analyses of representative node-edge fusion and update operators. Our findings provide empirical design heuristics for molecular MPNNs by turning model design from a search over monolithic architectures into a targeted assessment of where and how chemical information enters the message-passing pipeline.

cond-mat.mtrl-sci

The Price of Competitive Information Disclosure

In many decision-making scenarios, individuals strategically choose what information to disclose to optimize their own outcomes. It is unclear whether such strategic information disclosure can lead to good societal outcomes. To address this question, we consider a competitive Bayesian persuasion model in which multiple agents selectively disclose information about their qualities to a principal, who aims to choose the candidates with the highest qualities. Using the price-of-anarchy framework, we quantify the inefficiency of such strategic disclosure. We show that the price of anarchy is at most a constant when the agents have independent quality distributions, even if their utility functions are heterogeneous. This result provides the first theoretical guarantee on the limits of inefficiency in Bayesian persuasion with competitive information disclosure.

cs.GT

Anharmonic thermodynamics redefines metastability and parent phases in ferroelectric HfO2

Hafnia (HfO2) is a silicon-compatible dielectric material, yet stabilizing its desired but metastable ferroelectric phase remains challenging. Phase stability predictions by density functional theory (DFT) have provided crucial guidance, but most simulations neglected or only treated finite temperature effects with (quasi-)harmonic approximation due to high computational cost of DFT. Here, we develop a machine learning force field and perform thermodynamic calculations for HfO2 using self-consistent phonon theory to address growing evidence of anharmonicity. Our results reveal that the ferroelectric orthorhombic phase oIII exhibits metastability below 0.1kBT under most conditions within the simulated regime of temperature and pressure (600 K <= T <= 1500 K and 0 <= p <= 7.5 GPa), contradicting previous harmonic predictions of metastability above 1500 K at ambient pressure. We further report evidence for temperature- and pressure-dependent ferroelectric parent phase despite efforts to identify a universal one. This study highlights the importance of anharmonicity and provides an effective approach for its treatment in the design of HfO2-based ferroelectrics.

cond-mat.mtrl-sci

Auditing for Core Stability in Participatory Budgeting

We consider the participatory budgeting problem where each of $n$ voters specifies additive utilities over $m$ candidate projects with given sizes, and the goal is to choose a subset of projects (i.e., a committee) with total size at most $k$. Participatory budgeting mathematically generalizes multiwinner elections, and both have received great attention in computational social choice recently. A well-studied notion of group fairness in this setting is core stability: Each voter is assigned an "entitlement" of $\frac{k}{n}$, so that a subset $S$ of voters can pay for a committee of size at most $|S| \cdot \frac{k}{n}$. A given committee is in the core if no subset of voters can pay for another committee that provides each of them strictly larger utility. This provides proportional representation to all voters in a strong sense. In this paper, we study the following auditing question: Given a committee computed by some preference aggregation method, how close is it to the core? Concretely, how much does the entitlement of each voter need to be scaled down by, so that the core property subsequently holds? As our main contribution, we present computational hardness results for this problem, as well as a logarithmic approximation algorithm via linear program rounding. We show that our analysis is tight against the linear programming bound. Additionally, we consider two related notions of group fairness that have similar audit properties. The first is Lindahl priceability, which audits the closeness of a committee to a market clearing solution. We show that this is related to the linear programming relaxation of auditing the core, leading to efficient exact and approximation algorithms for auditing. The second is a novel weakening of the core that we term the sub-core, and we present computational results for auditing this notion as well.

cs.GT

Fair Multi-agent Persuasion with Submodular Constraints

We study the problem of selection in the context of Bayesian persuasion. We are given multiple agents with hidden values (or quality scores), to whom resources must be allocated by a welfare-maximizing decision-maker. An intermediary with knowledge of the agents' values seeks to influence the outcome of the selection by designing informative signals and providing tie-breaking policies, so that when the receiver maximizes welfare over the resulting posteriors, the expected utilities of the agents (where utility is defined as allocation times value) achieve certain fairness properties. The fairness measure we will use is majorization, which simultaneously approximately maximizes all symmetric, monotone, concave functions of the utilities. We consider the general setting where the allocation to the agents needs to respect arbitrary submodular constraints, as given by the corresponding polymatroid. We present a signaling policy that, under a mild bounded rationality assumption on the receiver, achieves a logarithmically approximate majorized policy in this setting. The approximation ratio is almost best possible, and that significantly outperforms generic results that only yield linear approximations. A key component of our result is a structural characterization showing that the vector of agent utilities for a given signaling policy defines the base polytope of a different polymatroid, a result that may be of independent interest. In addition, we show that an arbitrarily good additive approximation to this vector can be produced in (weakly) polynomial time via the multiplicative weights update method.

cs.GT

Sliding and superlubric moiré twisting ferroelectric transition in HfO2

Despite progress in HfO2 thin-film ferroelectrics, issues like high coercive fields persist, and the dynamics of twisted ferroelectricity remain largely unexplored. Here, we explore how sliding and twisting in bilayer HfO2 enables low barrier switching. Among 144 sliding configurations, two exhibit strong in-plane polarization (2360 pC/m) with a low switching barrier of 9.57 meV/f.u. Twisting generates polar textures associated with moiré patterns, which drive ferroelectricity via a soft zone-center mode, as revealed by machine-learning-assisted first-principles calculations. The in-plane (out-of-plane) polarization values for HfO2 at twist angles of 21.79°, 27.80°, and 46.83° are 430 (5.82), 367 (2.20), and 1057 (0.03) pC/m, respectively. For 21.79° and 27.80° twisting, switching barriers drop to 1.74 and 0.18 meV/f.u., indicating superlubric-like transitions. Notably, the 46.83° twisted bilayer shows an almost barrier-free polar evolution (0.03 meV /f.u.), attributed to sharply enhanced zone-center phonon linewidths. Our findings establish a moiré-engineered switching route for 2D ferroelectrics.

cond-mat.mtrl-sci

The Limits of Interval-Regulated Price Discrimination

In this paper, we study third-degree price discrimination in a model first presented by Bergemann, Brooks, and Morris [2015]. Since such price discrimination might create market segments with vastly different posted prices, we consider regulating these prices, specifically, by restricting them to lie within an interval. Given a price interval, we consider segmentations of the market where a seller, who is oblivious to the existence of such regulation, still posts prices within the price interval. We show the following surprising result: For any market and price interval where such segmentation is feasible, there is always a different segmentation that optimally transfers all excess surplus to the consumers. In addition, we characterize the entire space of buyer and seller surplus that is achievable by such segmentation, including maximizing seller surplus, and simultaneously minimizing buyer and seller surplus. A key technical challenge is that the classical segmentation method of Bergemann, Brooks, and Morris [2015] fails under price constraints. To address this, we develop three intuitive but fundamentally distinct segmentation constructions, each tailored to a different surplus objective. These constructions maintain different invariants, reflect different economic intuitions, and collectively form the core of our regulated surplus characterization.

econ.TH

First Passage Percolation with Queried Hints

Solving optimization problems leads to elegant and practical solutions in a wide variety of real-world applications. In many of those real-world applications, some of the information required to specify the relevant optimization problem is noisy, uncertain, and expensive to obtain. In this work, we study how much of that information needs to be queried in order to obtain an approximately optimal solution to the relevant problem. In particular, we focus on the shortest path problem in graphs with dynamic edge costs. We adopt the $\textit{first passage percolation}$ model from probability theory wherein a graph $G'$ is derived from a weighted base graph $G$ by multiplying each edge weight by an independently chosen random number in $[1, ρ]$. Mathematicians have studied this model extensively when $G$ is a $d$-dimensional grid graph, but the behavior of shortest paths in this model is still poorly understood in general graphs. We make progress in this direction for a class of graphs that resemble real-world road networks. Specifically, we prove that if $G$ has a constant continuous doubling dimension, then for a given $s-t$ pair, we only need to probe the weights on $((ρ\log n )/ ε)^{O(1)}$ edges in $G'$ in order to obtain a $(1 + ε)$-approximation to the $s-t$ distance in $G'$. We also generalize the result to a correlated setting and demonstrate experimentally that probing improves accuracy in estimating $s-t$ distances.

cs.DS

Decoding lithium's subtle phase stability with a machine learning force field

Understanding the phase stability of elemental lithium (Li) is crucial for optimizing its performance in lithium-metal battery anodes, yet this seemingly simple metal exhibits complex polymorphism that requires proper accounting for quantum and anharmonic effects to capture the subtleties in its flat energy landscape. Here we address this challenge by developing an accurate graph neural network-based machine learning force field and performing efficient self-consistent phonon calculations for bcc-, fcc-, and 9R-Li under near-ambient conditions, incorporating quantum, phonon renormalization and thermal expansion effects. Our results reveal the important role of anharmonicity in determining Li's thermodynamic properties. The free energy differences between these phases, particularly fcc- and 9R-Li are found to be only a few meV/atom, explaining the experimental challenges in obtaining phase-pure samples and suggesting a propensity for stacking faults and related defect formation. fcc-Li is confirmed as the ground state at zero temperature and pressure, and the predicted bcc-fcc phase boundary qualitatively matches experimental phase transition lines, despite overestimation of the transition temperature and pressure slope. These findings provide crucial insights into Li's complex polymorphism and establish an effective computational approach for large-scale atomistic simulations of Li in more realistic settings for practical energy storage applications.

cond-mat.mtrl-sci

Fair Division via the Cake-Cutting Share

In this paper, we consider the classic fair division problem of allocating $m$ divisible items to $n$ agents with linear valuations over the items. We define novel notions of fair shares from the perspective of individual agents via the cake-cutting process. These shares generalize the notion of proportionality by taking into account the valuations of other agents via constraints capturing envy. We study what fraction (approximation) of these shares are achievable in the worst case, and present tight and non-trivial approximation bounds as a function of $n$ and $m$. In particular, we show a tight approximation bound of $Θ(\sqrt{n})$ for various notions of such shares. We show this bound via a novel application of dual fitting, which may be of independent interest. We also present a bound of $O(m^{2/3})$ for a strict notion of share, with an almost matching lower bound. We further develop weaker notions of shares whose approximation bounds interpolate smoothly between proportionality and the shares described above. We finally present empirical results showing that our definitions lead to more reasonable shares than the standard fair share notion of proportionality.

cs.GT

Majorized Bayesian Persuasion and Fair Selection

We address the fundamental problem of selection under uncertainty by modeling it from the perspective of Bayesian persuasion. In our model, a decision maker with imperfect information always selects the option with the highest expected value. We seek to achieve fairness among the options by revealing additional information to the decision maker and hence influencing its subsequent selection. To measure fairness, we adopt the notion of majorization, aiming at simultaneously approximately maximizing all symmetric, monotone, concave functions over the utilities of the options. As our main result, we design a novel information revelation policy that achieves a logarithmic-approximation to majorization in polynomial time. On the other hand, no policy, regardless of its running time, can achieve a constant-approximation to majorization. Our work is the first non-trivial majorization result in the Bayesian persuasion literature with multi-dimensional information sets.

cs.GT

Automatic Smart Contract Comment Generation via Large Language Models and In-Context Learning

The previous smart contract code comment (SCC) generation approaches can be divided into two categories: fine-tuning paradigm-based approaches and information retrieval-based approaches. However, for the fine-tuning paradigm-based approaches, the performance may be limited by the quality of the gathered dataset for the downstream task and they may have knowledge-forgetting issues. While for the information retrieval-based approaches, it is difficult for them to generate high-quality comments if similar code does not exist in the historical repository. Therefore we want to utilize the domain knowledge related to SCC generation in large language models (LLMs) to alleviate the disadvantages of these two types of approaches. In this study, we propose an approach SCCLLM based on LLMs and in-context learning. Specifically, in the demonstration selection phase, SCCLLM retrieves the top-k code snippets from the historical corpus by considering syntax, semantics, and lexical information. In the in-context learning phase, SCCLLM utilizes the retrieved code snippets as demonstrations, which can help to utilize the related knowledge for this task. We select a large corpus from a smart contract community Etherscan.io as our experimental subject. Extensive experimental results show the effectiveness of SCCLLM when compared with baselines in automatic evaluation and human evaluation.

cs.SE

APICom: Automatic API Completion via Prompt Learning and Adversarial Training-based Data Augmentation

Based on developer needs and usage scenarios, API (Application Programming Interface) recommendation is the process of assisting developers in finding the required API among numerous candidate APIs. Previous studies mainly modeled API recommendation as the recommendation task, which can recommend multiple candidate APIs for the given query, and developers may not yet be able to find what they need. Motivated by the neural machine translation research domain, we can model this problem as the generation task, which aims to directly generate the required API for the developer query. After our preliminary investigation, we find the performance of this intuitive approach is not promising. The reason is that there exists an error when generating the prefixes of the API. However, developers may know certain API prefix information during actual development in most cases. Therefore, we model this problem as the automatic completion task and propose a novel approach APICom based on prompt learning, which can generate API related to the query according to the prompts (i.e., API prefix information). Moreover, the effectiveness of APICom highly depends on the quality of the training dataset. In this study, we further design a novel gradient-based adversarial training method {\atpart} for data augmentation, which can improve the normalized stability when generating adversarial examples. To evaluate the effectiveness of APICom, we consider a corpus of 33k developer queries and corresponding APIs. Compared with the state-of-the-art baselines, our experimental results show that APICom can outperform all baselines by at least 40.02\%, 13.20\%, and 16.31\% in terms of the performance measures EM@1, MRR, and MAP. Finally, our ablation studies confirm the effectiveness of our component setting (such as our designed adversarial training method, our used pre-trained model, and prompt learning) in APICom.

cs.SE

Fair Price Discrimination

A seller is pricing identical copies of a good to a stream of unit-demand buyers. Each buyer has a value on the good as his private information. The seller only knows the empirical value distribution of the buyer population and chooses the revenue-optimal price. We consider a widely studied third-degree price discrimination model where an information intermediary with perfect knowledge of the arriving buyer's value sends a signal to the seller, hence changing the seller's posterior and inducing the seller to set a personalized posted price. Prior work of Bergemann, Brooks, and Morris (American Economic Review, 2015) has shown the existence of a signaling scheme that preserves seller revenue, while always selling the item, hence maximizing consumer surplus. In a departure from prior work, we ask whether the consumer surplus generated is fairly distributed among buyers with different values. To this end, we aim to maximize welfare functions that reward more balanced surplus allocations. Our main result is the surprising existence of a novel signaling scheme that simultaneously $8$-approximates all welfare functions that are non-negative, monotonically increasing, symmetric, and concave, compared with any other signaling scheme. Classical examples of such welfare functions include the utilitarian social welfare, the Nash welfare, and the max-min welfare. Such a guarantee cannot be given by any consumer-surplus-maximizing scheme -- which are the ones typically studied in the literature. In addition, our scheme is socially efficient, and has the fairness property that buyers with higher values enjoy higher expected surplus, which is not always the case for existing schemes.

cs.GT

Fair Multiwinner Elections with Allocation Constraints

We consider the multiwinner election problem where the goal is to choose a committee of $k$ candidates given the voters' utility functions. We allow arbitrary additional constraints on the chosen committee, and the utilities of voters to belong to a very general class of set functions called $β$-self bounding. When $β=1$, this class includes XOS (and hence, submodular and additive) utilities. We define a novel generalization of core stability called restrained core to handle constraints and consider multiplicative approximations on the utility under this notion. Our main result is the following: If a smooth version of Nash Welfare is globally optimized over committees within the constraints, the resulting committee lies in the $e^β$-approximate restrained core for $β$-self bounding utilities and arbitrary constraints. As a result, we obtain the first constant approximation for stability with arbitrary additional constraints even for additive utilities (factor of $e$), and the first analysis of the stability of Nash Welfare with XOS functions even with no constraints. We complement this positive result by showing that the $c$-approximate restrained core can be empty for $c<16/15$ even for approval utilities and one additional constraint. Furthermore, the exponential dependence on $β$ in the approximation is unavoidable for $β$-self bounding functions even with no constraints. We next present improved and tight approximation results for simpler classes of utility functions and simpler types of constraints. We also present an extension of restrained core to extended justified representation with constraints and show an existence result for matroid constraints. We finally generalize our results to the setting with arbitrary-size candidates and no additional constraints. Our techniques are different from previous analyses and are of independent interest.

cs.GT