SearcharxivSearch

arXiv subjects

Tzu-Wei Yang

Publications and source records attributed to Tzu-Wei Yang.

12 recordsLinked to original sources

ECO: An LLM-Driven Efficient Code Optimizer for Warehouse Scale Computers

With the end of Moore's Law, optimizing code for performance has become paramount for meeting ever-increasing compute demands, particularly in hyperscale data centers where even small efficiency gains translate to significant resource and energy savings. Traditionally, this process requires significant programmer effort to identify optimization opportunities, modify the code to implement the optimization, and carefully deploy and measure the optimization's impact. Despite a significant amount of work on automating program edits and promising results in small-scale settings, such performance optimizations have remained elusive in large real-world production environments, due to the scale, high degree of complexity, and reliability required. This paper introduces ECO (Efficient Code Optimizer), a system that automatically refactors source code to improve performance at scale. To achieve these performance gains, ECO searches through historical commits at scale to create a dictionary of performance anti-patterns that these commits addressed. These anti-patterns are used to search for similar patterns in a code base of billions of lines of code, pinpointing other code segments with similar potential optimization opportunities. Using a fine-tuned LLM, ECO then automatically refactors the code to generate and apply similar edits. Next, ECO verifies the transformed code, submits it for code review, and measures the impact of the optimization in production. Currently deployed on Google's hyperscale production fleet, this system has driven >25k changed lines of production code, across over 6.4k submitted commits, with a >99.5% production success rate. Over the past year, ECO has consistently resulted in significant performance savings every quarter. On average, the savings produced per quarter are equivalent to over 500k normalized CPU cores.

cs.SE

Forward-backward stochastic differential equations with monotone functionals and mean field games with common noise

In this paper, we consider a system of forward-backward stochastic differential equations (FBSDEs) with monotone functionals. We show the existence and uniqueness of such a system by the method of continuation similarly to Peng and Wu (1999) for classical FBSDEs and obtain estimates under conditional probability. As applications, we prove the well-posedness result for a mean field FBSDE with conditional law and show the existence of a decoupling function. In addition, we show that mean field games with common noise are uniquely solvable under a linear controlled process with convex and weak-monotone cost functions and prove that the optimal control is in a feedback form depending only on the current state and conditional law.

math.PR

Mean Field Model for Collective Motion Bistability

We consider the Czirók model for collective motion of locusts along a one-dimensional torus. In the model, each agent's velocity locally interacts with other agents' velocities in the system, and there is also exogenous randomness to each agent's velocity. The interaction tends to create the alignment of collective motion. By analyzing the associated nonlinear Fokker-Planck equation, we obtain the condition for the existence of stationary order states and the conditions for their linear stability. These conditions depend on the noise level, which should be strong enough, and on the interaction between the agent's velocities, which should be neither too small, nor too strong. We carry out the fluctuation analysis of the interacting system and describe the large deviation principle to calculate the transition probability from one order state to the other. Numerical simulations confirm our analytical findings.

math.AP

Asymptotic Analysis of Mean Field Games with Small Common Noise

In this paper, we consider a mean field game (MFG) model perturbed by small common noise. Our goal is to give an approximation of the Nash equilibrium strategy of this game using a solution from the original no common noise MFG whose solution can be obtained through a coupled system of partial differential equations. We characterize the first order approximation via linear mean-field forward-backward stochastic differential equations whose solution is a centered Gaussian process with respect to the common noise. The first order approximate strategy can be described as follows: at time $t \in [0,T]$, applying the original MFG optimal strategy for a sub game over $[t,T]$ with the initial being the current state and distribution. We then show that this strategy gives an approximate Nash equilibrium of order $ε^2$.

math.PR

Limit order trading with a mean reverting reference price

Optimal control models for limit order trading often assume that the underlying asset price is a Brownian motion since they deal with relatively short time scales. The resulting optimal bid and ask limit order prices tend to track the underlying price as one might expect. This is indeed the case with the model of Avellaneda and Stoikov (2008), which has been studied extensively. We consider here this model under the condition when the underlying price is mean reverting. Our main result is that when time is far from the terminal, the optimal price for bid and ask limit orders is constant, which means that it does not track the underlying price. Numerical simulations confirm this behavior. When the underlying price is mean reverting, then for times sufficiently far from terminal, it is more advantageous to focus on the mean price and ignore fluctuations around it. Mean reversion suggests that limit orders will be executed with some regularity, and this is why they are optimal. We also explore intermediate time regimes where limit order prices are influenced by the inventory of outstanding orders. The duration of this intermediate regime depends on the liquidity of the market as measured by specific parameters in the model.

q-fin.TR

A reduced-form model for level-1 limit order books

One popular approach to model the limit order books dynamics of the best bid and ask at level-1 is to use the reduced-form diffusion approximations. It is well known that the biggest contributing factor to the price movement is the imbalance of the best bid and ask. We investigate the data of the level-1 limit order books of a basket of stocks and study the numerical evidence of drift, correlation, volatility and their dependence on the imbalance. Based on the numerical discoveries, we develop a nonparametric discrete model for the dynamics of the best bid and ask, which can be approximated by a reduced-form model with analytical tractability that can fit the empirical data of correlation, volatilities and probability of price movement simultaneously.

q-fin.TR

Consensus Convergence with Stochastic Effects

We consider a stochastic, continuous state and time opinion model where each agent's opinion locally interacts with other agents' opinions in the system, and there is also exogenous randomness. The interaction tends to create clusters of common opinion. By using linear stability analysis of the associated nonlinear Fokker-Planck equation that governs the empirical density of opinions in the limit of infinitely many agents, we can estimate the number of clusters, the time to cluster formation and the critical strength of randomness so as to have cluster formation. We also discuss the cluster dynamics after their formation, the width and the effective diffusivity of the clusters. Finally, the long term behavior of clusters is explored numerically. Extensive numerical simulations confirm our analytical findings.

cs.SI

A risk analysis for a system stabilized by a central agent

We formulate and analyze a multi-agent model for the evolution of individual and systemic risk in which the local agents interact with each other through a central agent who, in turn, is influenced by the mean field of the local agents. The central agent is stabilized by a bistable potential, the only stabilizing force in the system. The local agents derive their stability only from the central agent. In the mean field limit of a large number of local agents we show that the systemic risk decreases when the strength of the interaction of the local agents with the central agent increases. This means that the probability of transition from one of the two stable quasi-equilibria to the other one decreases. We also show that the systemic risk increases when the strength of the interaction of the central agent with the mean field of the local agents increases. Following the financial interpretation of such models and their behavior given in our previous paper (Garnier, Papanicolaou and Yang, SIAM J. Fin. Math. 4, 2013, 151-184), we may interpret the results of this paper in the following way. From the point of view of systemic risk, and while keeping the perceived risk of the local agents approximately constant, it is better to strengthen the interaction of the local agents with the central agent than the other way around.

q-fin.MF

Asymptotics for a Class of Self-Exciting Point Processes

In this paper, we study a class of self-exciting point processes. The intensity of the point process has a nonlinear dependence on the past history and time. When a new jump occurs, the intensity increases and we expect more jumps to come. Otherwise, the intensity decays. The model is a marriage between stochasticity and dynamical system. In the short-term, stochasticity plays a major role and in the long-term, dynamical system governs the limiting behavior of the system. We study the law of large numbers, central limit theorem, large deviations and asymptotics for the tail probabilities.

math.PR

Large deviations for a mean field model of systemic risk

We consider a system of diffusion processes that interact through their empirical mean and have a stabilizing force acting on each of them, corresponding to a bistable potential. There are three parameters that characterize the system: the strength of the intrinsic stabilization, the strength of the external random perturbations, and the degree of cooperation or interaction between them. The latter is the rate of mean reversion of each component to the empirical mean of the system. We interpret this model in the context of systemic risk and analyze in detail the effect of cooperation between the components, that is, the rate of mean reversion. We show that in a certain regime of parameters increasing cooperation tends to increase the stability of the individual agents but it also increases the overall or systemic risk. We use the theory of large deviations of diffusions interacting through their mean field.

q-fin.RM

Probability of Failure in Hypersonic Engines Using Large Deviations

We consider a reduced order model of an air-breathing hypersonic engine with a time-dependent stochastic inflow that may cause the failure of the engine. The probability of failure is analyzed by the Freidlin-Wentzell theory, the large deviation principle for finite dimensional stochastic differential equations. We compute the asymptotic failure probability by numerically solving the constrained optimization related to the large deviation problem. A large-deviation-based importance sampling suggested by the most probable inflow perturbation is also implemented to compute the probability of failure of the engine. The numerical simulations show that the importance sampling method is much more efficient than the basic Monte Carlo method.

math.PR

Anomalous Shock Displacement Probabilities for a Perturbed Scalar Conservation Law

We consider an one-dimensional conservation law with random space-time forcing and calculate using large deviations the exponentially small probabilities of anomalous shock profile displacements. Under suitable hypotheses on the spatial support and structure of random forces, we analyze the scaling behavior of the rate function, which is the exponential decay rate of the displacement probabilities. For small displacements we show that the rate function is bounded above and below by the square of the displacement divided by time. For large displacements the corresponding bounds for the rate function are proportional to the displacement. We calculate numerically the rate function under different conditions and show that the theoretical analysis of scaling behavior is confirmed. We also apply a large-deviation-based importance sampling Monte Carlo strategy to estimate the displacement probabilities. We use a biased distribution centered on the forcing that gives the most probable transition path for the anomalous shock profile, which is the minimizer of the rate function. The numerical simulations indicate that this strategy is much more effective and robust than basic Monte Carlo.

math.PR