Search arXiv⌕ Search

arXiv subjects

Jinjie Liu

Publications and source records attributed to Jinjie Liu.

At least 19 recordsLinked to original sources

Understanding the Impact of Tolerance Threshold in Automated GPU Kernel Optimization

GPU kernel optimization is increasingly driven by standardized benchmarks and autonomous kernel agents. To assess correctness, these benchmarks and agents commonly use differential testing, accepting an optimized kernel when its outputs remain within a predefined tolerance threshold of the reference outputs. However, how discrepancies accepted by these tests affect model behavior during inference remains poorly understood. In this paper, we investigate this question through real kernel replacements and controlled perturbations. We first integrate 1,160 published optimized kernel implementations from CUDA-L1 and the KernelBench leaderboard into 13 real-world models across three numerical precisions. Across 2,739 replacement evaluations, 55.28% produce at least one output change. Although accuracy changes are usually small, 11 evaluations incur accuracy drops greater than 50%. In the most severe case, Gemma-4-E4B's accuracy on MMLU falls from 67.0% to 5.5%. We then conduct 6,928 controlled perturbation evaluations to examine how numerical discrepancies affect model behavior. The effects depend on numerical precision, operator, and dataset. For Gemma-4-12B on MMLU in FP16, perturbations of the same magnitude change outputs for 73.6% of model inputs when applied to post_attention_rmsnorm, but cause no output changes when applied to lm_head. Our findings show that passing kernel-level tests does not prevent substantial and varied changes in model behavior. We hope our research findings can inspire the community to further explore correctness criteria in future kernel benchmarks and optimization agents.

cs.LG↗

Depletion Capture and Rayleigh--Onsager Dynamics in Receptor-Mediated Endocytosis

Receptor-mediated endocytosis requires a particle to approach a membrane in a crowded extracellular environment, form ligand-receptor bonds, and wrap the membrane against bending, tension, and cytoskeletal viscoelastic resistance. We develop a two-stage theory. The capture stage uses the exact ideal hard-sphere Asakura--Oosawa sphere-plane excluded-volume geometry. The wrapping stage combines a spherical-cap coordinate, a quadratic single-mode free energy, a standard linear solid with one internal strain variable, and a two-variable Rayleigh--Onsager (RO) gradient flow. The creep compliance is mapped exactly onto a long-time spring in parallel with a Maxwell branch, preserving both the creep retardation and stress relaxation times. The free energy is strictly convex by its Hessian convexity, and the linear wrapping system has two real negative eigenvalues and an explicit double-exponential solution. Two independent arguments establish strict monotonicity for positive initial drive: the irreducible Metzler structure with its positive semigroup and the interlacing of Laplace poles with positive velocity residues. The first-passage equation has a unique finite root below the unconstrained long-time limit. Normal-cone conditions specify the projected dynamics on $0\le x\le2$, and the projected system retains the Lyapunov inequality of the unconstrained gradient flow. From the same free energy we derive long-time adhesion thresholds, the threshold-minimizing radius, the finite-size window, and the critical cell modulus. The $95\%$ spherical-area criterion is treated as an operational near-complete threshold, with $90\%$, $95\%$, and $99\%$ compared. The capture analysis includes the exact overlap volume, depletion force, Carnahan--Starling pressure rescaling, Stokes approach time, and Brenner wall-drag correction.

cond-mat.soft↗

Entropy-Driven Initiation and Cytoskeletal Viscoelasticity in Endocytosis: An Onsager Variational Framework

Receptor-mediated endocytosis requires a particle to approach the cell membrane to within a few nanometers before ligand--receptor binding can occur. Existing continuum models often start from an already established contact and do not explicitly describe how crowding particles on the extracellular side influence the distribution of the particle near the membrane. We examine entropic depletion forces as one possible nonspecific contribution to this initial approach. For ideal depletants, the Asakura--Oosawa excluded-volume construction gives an exact depletion potential for the planar geometry before contact. The potential and force vanish continuously at the onset of excluded-volume overlap. This interaction provides a possible contribution to membrane proximity before specific binding, while its extension to curved wrapping geometries requires additional approximation. Within a reduced continuum model, we combine depletion attraction, ligand--receptor binding, membrane deformation, and cytoskeletal viscoelastic dissipation. The viscoelastic contact is formulated through a hereditary integral and a standard linear solid. The kinetic model gives a conditional minimum ligand density for complete engulfment, a finite particle-size window, and a stiffness-dependent upper limit. When the stationary radius lies inside the domain of finite positive wrapping times, the estimated wrapping time has a minimum at a radius that decreases with increasing binding energy density. At fixed viscosity and other independent parameters, the same time approximation predicts slower wrapping as cell stiffness increases. The two positive roots defining the size window merge at a limiting parameter value, which characterizes closure of the admissible size interval. Depletion attraction is interpreted as one possible contribution to particle-membrane association, alongside electrostatic interactions

cond-mat.soft↗

Trident: Unifying Guarded Dispatch and Host Execution for PyTorch Triton Workloads

User-written Triton kernels enable high-performance GPU computation within PyTorch, but their end-to-end latency can remain dominated by host-side orchestration, especially when device execution is short. Although torch.compile can generate native host wrappers for captured graphs, each invocation still passes through runtime-managed specialization lookup, guard evaluation, and preparation before reaching the wrapper. We present Trident, a compiler backend that removes this recurring overhead from the specialization cache-hit path. Trident introduces the Specialization Cache Module (SCM), which compiles guarded specialization selection, argument and execution-environment preparation, and host execution for multiple specializations into a single executable module. An invocation enters the SCM once, remains in compiled code when a specialization matches, and returns to Python only when a new specialization must be compiled. Built on Torch-MLIR, Trident lowers guards and host-side orchestration to native code while retaining calls to optimized runtime implementations of supported ATen operators. Our evalu- ation on two LLMs shows that Trident achieves up to a 1.47x speedup in model-level end-to-end latency over eager execution and up to 1.68x over torch.compile.

cs.LG↗

Energy-superconvergent Explicit Runge--Kutta Time Discretizations

This paper investigates the energy conservation properties of explicit Runge--Kutta (RK) time discretizations for autonomous skew-symmetric systems. For linear problems, we present a general framework for constructing RK methods in which the energy-accuracy order significantly exceeds the number of stages. Specifically, for an $s$-stage, $p$-th order RK method (where $p$ is even), we prove that the energy accuracy can reach up to order $2s-p+1$. Utilizing this framework, we derive several energy-superconvergent methods, including five- to seven-stage algorithms with energy accuracy up to the eleventh order, and establish their corresponding strong stability criteria. The methods are validated on a range of benchmark problems, including harmonic oscillators, integro-differential equations in peridynamics, and the Maxwell equations. Furthermore, we extend the energy-superconvergent framework to autonomous nonlinear systems with amplitude-dependent frequencies. By deriving fifth-order energy conditions for three-stage, second-order methods, we develop the RK325 algorithm. The performance of RK325 is demonstrated for a broad range of problems, including Euler's equations for rigid body dynamics, the nonlinear Schrödinger equation, the Korteweg--de Vries (KdV) equation, Burgers' equation, and the Landau--Lifshitz equation. Additionally, we develop four-stage, second-order methods (RK427) and five-stage, fourth-order methods (RK547), all of which achieve seventh-order energy accuracy for the cubic nonlinear case. Finally, the performance of RK547 method is illustrated using the nonlinear Maxwell--Kerr system.

math.NA↗

BugScope: Learn to Find Bugs Like Human

Software auditing is an increasingly critical task in the era of rapid code generation. While LLM-based auditors have demonstrated strong potential, their effectiveness remains limited by misalignment with the highly complex, domain-specific nature of bug detection. In this work, we introduce BugScope, a framework that mirrors how human auditors learn specific bug patterns from representative examples and apply this knowledge during code auditing. BugScope structures auditing into three steps: seed identification, context retrieval, and bug detection, and aligns LLMs to each step by analyzing real bug reports and mutated examples, and distilling concise, reusable guidelines. On a curated dataset of 33 real-world bugs from 21 widely used open-source projects, BugScope achieves 86.05\% precision and 87.88\% recall, corresponding to an F1 score of 0.87. By comparison, leading industrial tools such as Claude Code (with Claude Opus 4.6) and Cursor BugBot achieve F1 scores of only 0.51 and 0.43, respectively. Beyond benchmarks, large-scale evaluation on real-world projects such as the Linux kernel uncovered 184 previously unknown bugs, of which 78 have already been fixed and 7 explicitly confirmed by developers. Our code is available at https://github.com/jinyaoguo/BugScope

cs.SE↗

FluidML: Fast and Memory Efficient Inference Optimization

Machine learning models deployed on edge devices have enabled numerous exciting new applications, such as humanoid robots, AR glasses, and autonomous vehicles. However, the computing resources available on these edge devices are not catching up with the ever-growing number of parameters in these models. As the models become bigger and more complicated, the novel yet sophisticated structure challenges the inference runtime optimization. We present FluidML, a generic runtime memory management and optimization framework that can flexibly transform the model execution blueprint to achieve faster and more memory-efficient inference. Evaluations across different platforms show that FluidML can consistently reduce the end-to-end inference latency by up to 25.38% for popular language models and reduce peak memory usage by up to 41.47%, compared to state-of-the-art approaches. FluidML is of ~30K line of codes, built for general-purpose usage, and will be released as an open-source inference runtime optimization framework to the community.

cs.LG↗

Copositivity criteria of a class of fourth order 3-dimensional symmetric tensors

In this paper, we mainly dicuss the non-negativity conditions for quartic homogeneous polynomials with 3 variables, which is the analytic conditions of copositivity of a class of 4th order 3-dimensional symmetric tensors. For a 4th order 3-dimensional symmetric tensor with its entries $1$ or $-1$, an analytic necessary and sufficient condition is given for its strict copositivity with the help of the properties of strictly semi-positive tensors. And by means of usual maxi-min theory, a necessary and sufficient condition is established for copositivity of such a tensor also. Applying these conclusions to a general 4th order 3-dimensional symmetric tensor, the analytic conditions are successfully obtained for verifying the (strict) copositivity, and these conditions can be very easily parsed and validated. Moreover, several (strict) inequalities of ternary quartic homogeneous polynomial are established by means of these analytic conditions.

math.OC↗

AutoPCF: Efficient Product Carbon Footprint Accounting with Large Language Models

The product carbon footprint (PCF) is crucial for decarbonizing the supply chain, as it measures the direct and indirect greenhouse gas emissions caused by all activities during the product's life cycle. However, PCF accounting often requires expert knowledge and significant time to construct life cycle models. In this study, we test and compare the emergent ability of five large language models (LLMs) in modeling the 'cradle-to-gate' life cycles of products and generating the inventory data of inputs and outputs, revealing their limitations as a generalized PCF knowledge database. By utilizing LLMs, we propose an automatic AI-driven PCF accounting framework, called AutoPCF, which also applies deep learning algorithms to automatically match calculation parameters, and ultimately calculate the PCF. The results of estimating the carbon footprint for three case products using the AutoPCF framework demonstrate its potential in achieving automatic modeling and estimation of PCF with a large reduction in modeling time from days to minutes.

cs.AI↗

ST-SVD Factorization and s-Diagonal Tensors

A third order real tensor is mapped to a special f-diagonal tensor by going through Discrete Fourier Transform (DFT), standard matrix SVD and inverse DFT. We call such an f-diagonal tensor an s-diagonal tensor. An f-diagonal tensor is an s-diagonal tensor if and only if it is mapped to itself in the above process. The third order tensor space is partitioned to orthogonal equivalence classes. Each orthogonal equivalence class has a unique s-diagonal tensor. Two s-diagonal tensors are equal if they are orthogonally equivalent. Third order tensors in an orthogonal equivalence class have the same tensor tubal rank and T-singular values. Four meaningful necessary conditions for s-diagonal tensors are presented. Then we present a set of sufficient and necessary conditions for s-diagonal tensors. Such conditions involve a special complex number. In the cases that the dimension of the third mode of the considered tensor is $2, 3$ and $4$, we present direct sufficient and necessary conditions which do not involve such a complex number.

math.NA↗

Strengthening and Weakening by Dislocations in Monolayer MoS2

Dislocations govern the properties of any crystals. Yet, how dislocation of pentagonheptagon (5|7) in grain boundaries (GBs) affects the mechanical properties of two-dimensional MoS2 crystals remains poorly known. Using atomistic simulations and continuum disclination dipole model, we show that, depending on the tilt angle and 5|7 dislocation arrangement, MoS2 GB strength can be enhanced or reduced with tilt angle. For zigzag-tilt GBs primarily composed of Mo5|7+S5|7 dislocations, GB strength monotonically increases as the square of tilt angle. For armchair-tilt GBs with Mo5|7 or S5|7 dislocations, however, the trend of GB strength breaks down as 5|7 dislocations are non-evenly spaced. Moreover, mechanical failure initiates at the bond shared by 5|7 rings, in contrast to graphene where failure occurs at the bond shared by 6|7 rings. This work provides new insights into mechanical design of synthetic transition metal dichalcogenide crystals via dislocation engineering.

cond-mat.mtrl-sci↗

Mechanical Ductile Detwinning in CH3NH3PbI3 Perovskite

Twin boundaries (TBs) were identified to show conflicting positive/negative effects on the physical properties of CH3NH3PbI3 perovskite, but their roles on the mechanical properties are pending. Herein, tensile characteristics of a variety of TB-dominated bicrystalline CH3NH3PbI3 perovskites are explored using molecular simulations. TB-contained CH3NH3PbI3 are classified into four types from their tensile ductile detwinning characteristics. Type I is characterized by smooth loading flow stressstrain responses, originating from relatively uniform stress distribution induced gradual amorphization at TB region. Types II and III are represented by sudden drop of loading stresses but then distinct ductile flow stress-strain curves, resulting from limited and large-area amorphizations of TB-involved structures, respectively. However, Type IV is highlighted by double apparent peaks in the loading curve followed by ductile flow response, coming from stress-concentration of localization-to-globalization at TB structure, as well as amorphization. This study provides critical insights into mechanics of CH3NH3PbI3 perovskites, and offers that TB engineering is a promising strategy to design mechanically robust hybrid organic-inorganic perovskites-based device systems

cond-mat.mtrl-sci↗

Elasticity $\mathscr{M}$-tensors and the Strong Ellipticity Condition

In this paper, we establish two sufficient conditions for the strong ellipticity of any fourth-order elasticity tensor and investigate a class of tensors satisfying the strong ellipticity condition, the elasticity $\mathscr{M}$-tensor. The first sufficient condition is that the strong ellipticity holds if the unfolding matrix of this fourth-order elasticity tensor can be modified into a positive definite one by preserving the summations of some corresponding entries. Second, an alternating projection algorithm is proposed to verify whether an elasticity tensor satisfies the first condition or not. Besides, the elasticity $\mathscr{M}$-tensor is defined with respect to the M-eigenvalues of elasticity tensors. We prove that any nonsingular elasticity $\mathscr{M}$-tensor satisfies the strong ellipticity condition by employing a Perron-Frobenius-type theorem for M-spectral radii of nonnegative elasticity tensors. Other equivalent definitions of nonsingular elasticity $\mathscr{M}$-tensors are also established.

math-ph↗

A New Class of Positive Semi-definite Tensors

In this paper, a new class of positive semi-definite tensors, the MO tensor, is introduced. It is inspired by the structure of Moler matrix, a class of test matrices. Then we focus on two special cases in the MO-tensors: Sup-MO tensor and essential MO tensor. They are proved to be positive definite tensors. Especially, the smallest H-eigenvalue of a Sup-MO tensor is positive and tends to zero as the dimension tends to infinity, and an essential MO tensor is also a completely positive tensor.

math.SP↗

An Irreducible Function Basis of Isotropic Invariants of A Third Order Three-Dimensional Symmetric Tensor

In this paper, we present an eleven invariant isotropic irreducible function basis of a third order three-dimensional symmetric tensor. This irreducible function basis is a proper subset of the Olive-Auffray minimal isotropic integrity basis of that tensor. The octic invariant and a sextic invariant in the Olive-Auffray integrity basis are dropped out. This result is of significance to the further research of irreducible function bases of higher order tensors.

math-ph↗

Isotropic Polynomial Invariants of the Hall Tensor

The Hall tensor emerges from the study of the Hall effect, an important magnetic effect observed in electric conductors and semiconductors. The Hall tensor is third order and three dimensional, whose first two indices are skew-symmetric. In this paper, we investigate the isotropic polynomial invariants of the Hall tensor by connecting it with a second order tensor via the third order Levi-Civita tensor. We propose a minimal isotropic integrity basis with 10 invariants for the Hall tensor. Furthermore, we prove that this minimal integrity basis is also an irreducible isotropic function basis of the Hall tensor.

math-ph↗

Scattering of a short electromagnetic pulse from a Lorentz-Duffing film: theoretical and numerical analysis

We combine scattering theory, Fourier, traveling wave and asymptotic analyses together with numerical simulations to present interesting and practically useful properties of femtosecond pulse interaction with thin films. The dispersive material is described by a single resonance Lorentz model and its nonlinear extension with a cubic Duffing-type nonlinearity. A key feature of the Lorentz dielectric function is that its real part becomes negative between its zero and its pole, generating a forbidden region. We illustrate numerically the linear interaction of the pulse with the film using both scattering theory and Fourier analysis. Outside this region we show the generation of a sequence of pulses separated by round trips in the Fabry-Perot cavity due to multiple reflections. When the pulse spectrum is inside the forbidden region, we observe total reflection. Near the pole of the dielectric function, we demonstrate the slowing down of the pulse (group velocity tending to zero) in the medium that behaves as a high-Q cavity. We use the combination of analysis and simulations in the linear regime to validate the delta function approximation of the thin layer; this collapses the forbidden region to a single resonant point of the spectrum. We also study the single cycle pulse interaction with a thin film and show three distinct types of reflection: half-pulse, sinusoidal wave train and cosine wavelet. Finally we analyze the influence of a strong nonlinearity and observe that the film switches from reflecting to trasparent.

physics.optics↗

Modified Iterated Crank-Nicolson Method with Improved Accuracy

The iterated Crank-Nicolson (ICN) method is a successful numerical algorithm in numerical relativity for solving partial differential equations. The $θ$-ICN method is the extension of the original ICN method where $θ$ is the weight when averaging the predicted and corrected values. It has better stability when $θ$ is chosen to be larger than 0.5, but the accuracy is reduced since the $θ$-ICN method is second order accurate only when $θ$ = 0.5. In this paper, we propose two modified $θ$-ICN algorithms that have second order of convergence rate when $θ$ is not 0.5, based on two different ways to choose the weight $θ$. The first approach employs two geometrically averaged $θ$s in two iterations within one time step, and the second one uses arithmetically averaged $θ$s for two consecutive time steps while $θ$ remains the same in each time step. The stability and second order accuracy of our methods are verified using stability and truncation error analysis and are demonstrated by numerical examples on linear and semi-linear hyperbolic partial differential equations and Burgers' equation.

math.NA↗