Search arXiv⌕ Search

arXiv subjects

Weilin Li

Publications and source records attributed to Weilin Li.

At least 19 recordsLinked to original sources

When the Peg Breaks: Modeling and Measuring Stablecoin Depeg Losses across DeFi

Stablecoins and pegged coins are integrated deep into DeFi: pledged as collateral in lending markets, paired on AMMs, reached through vaults that lend to those markets, and held in the reserves of other coins. When such a coin loses its peg, these connections carry the loss to parties who never held it, and make it larger. Prior studies of depegs trace the coin's price, its holders' flows and causes. We give, to our knowledge, the first systematic study of how DeFi integration spreads and enlarges the losses of a depeg: we model the places a coin reaches as a graph of DeFi protocols, and derive for each kind of connection who loses and how much. The largest term arises in lending markets that fix the coin's oracle price at par: anyone can buy the coin cheaply, borrow real assets against it and never repay, leaving the loss with the lenders (oracle arbitrage). Empirically, we studied the depeg events over the last three years. 34 stablecoins and pegged tokens over USD 10M market cap depegged. In 15 depeg events, lending markets kept pricing the coin above the market, and these events caused a total loss of USD 686.8M: 66% fell on lenders who never held the coin, 27% on holders, 5% on borrowers and 2% on AMM liquidity providers. Every term of the bound is public chain state, so a coin's worst case can be computed before its depeg. Among the 30 largest of the pegged coins listed in lending markets, a fall to half of par would result in a loss from USD 291.2M (mETH) to USD 52.83B (USDT), and would cost the coin's lenders up to USD 1.05B (wstETH).

cs.CR↗

The Pairing Bias: Pricing and Liquidity Distortions in Graph-Structured Markets

Unlike stock markets, where every asset is quoted in the local currency, on-chain AMM markets are graph-structured. A token can be paired with any other token, and its USD price is derived through intermediate tokens (its hubs, such as ETH). Market-data platforms and traders still rely on standard metrics such as market cap, which ignore how tokens are paired and thus distort measured value and risk. We call this distortion the pairing bias, which takes three forms. (1) Risk import: a token imports its hub's volatility. (2) Exit sharing: tokens that share a hub compete for its liquidity when sold. (3) Value backflow: buying a token raises its hub's price. Issuers and platforms, who choose the pairings, can exploit these biases. We quantify the pairing bias on Ethereum, Base and BSC. On Ethereum, 76.3% of float market cap outside ETH, BTC and stablecoins is priced through a non-USD hub, and ETH's price accounts for 77.1% of the daily variation in the market cap of ETH-paired tokens. When a hub's holders sell alongside its paired tokens, shared exits cut the tokens' proceeds by up to a further 44.3%. On two platform hubs priced on chain, purchases of their paired tokens came with rises in the hubs' prices. We propose topology-aware valuation, which bounds realizable value and reports hub exposures.

q-fin.TR↗

A Portfolio Underwriting AMM for Tail Liquidity in Rare-Event Prediction Markets

Prediction market prices are read as probability forecasts, but for rare events they are expensive to back: selling a claim on a low-probability outcome locks nearly its full payout as collateral, so block-sized depth is scarce. Pooling the capital alone does not solve this: a price-bounded, never-default provider serves at most $O(K)$ claims per reserve $K$. To lift this ceiling, we introduce puAMM, an AMM that sells rare-event claims on $n$ markets and underwrites their aggregate liability with one shared reserve, given a joint distribution of outcomes. Two CVaR protections define the mechanism: premiums must cover the average payout over the worst $σ_2$-fraction of outcomes, and premiums plus reserve must cover it over the rarer $σ_1$-fraction, while traders bear a proportional haircut with probability at most $σ_1$. It is provably the frontier of the two protections, and it certifies $Ω(\sqrt{n})K$ notional per reserve $K$ across $n$ independent rare-event markets, with markup vanishing as $n$ grows. Numerical experiments show that at $(n,p)=(100,0.02)$ one reserve dollar backs 55.34 dollars of claims, 54.2 times the full-collateral ceiling, and that leverage tracks how rarely rare events coincide, not merely how rare they are. On Polymarket order books outside the most liquid quartile, where 10K shares cost 6.6 times the mid, puAMM is the cheaper or only venue in 64% of markets at 10K shares and in nearly every market at 100K. A replay on 907 rare-event markets is consistent with independence and shows no insolvency.

cs.GT↗

Formalizing the Intrinsic Dimension of Objective Landscapes by a Generalized Notion of Co-dimension

In this work, we formalize the concept of intrinsic dimension of objective landscapes introduced in Li et al. (2018), which measures the structural complexity of learning problems by training along randomly generated subspaces. We define the intrinsic dimension of a set $Θ\subset\mathbb{R}^p$ as the minimal dimension $d_{\mathrm{int}}(Θ)$ such that a random plane of dimension $d_{\mathrm{int}}(Θ)$ in $\mathbb{R}^p$ intersects $Θ$ with probability one. We show that it is a generalized notion of co-dimension that depends on the global geometry of $Θ$. We study mathematical properties of the intrinsic dimension and develop techniques to estimate the intrinsic dimension of sets $Θ$ that arise in learning problems. More specifically, we derive upper and/or lower bounds where $Θ$ is the set of optimal parameters in student-teacher settings with shallow and deep ReLU networks, including finite and infinite sample cases, and with and without regularization. We discuss how our theory leads to novel types of generalization bounds, thereby showing that the intrinsic dimension is a measure of learning complexity. Our results connect techniques from seemingly different areas of machine learning research such as classification of symmetries of ReLU networks and stochastic geometry.

stat.ML↗

A sharp analysis of Root-MUSIC: locations of correct and extraneous roots

Root-MUSIC is a spectral estimation algorithm that approximates the unknown signal frequencies by constructing a high-degree polynomial and finding a subset of roots which are closest to the complex unit circle. Previous works found asymptotic expectation formulas for the performance of Root-MUSIC under the implicit assumption that the aforementioned root selection criterion does not select extraneous roots -- those which are unrelated to the correct parameters. This paper removes the need for this assumption by showing all extraneous roots lie outside an annulus of a certain thickness and therefore are not selected by the algorithm. This paper also provides sharp and non-asymptotic error bounds for the correct roots in terms of fundamental model parameters. All results hold under a natural separation condition on the correct signal frequencies and are applicable in both the single- and multi-snapshot models. Numerical simulations confirm our theory. The main mathematical insight of this paper is a geometric property of the Root-MUSIC polynomial: its correct roots are highly stable to noise while its extraneous roots must lie outside of an annulus.

eess.SP↗

Optimal structured approximation of Fourier subspaces, Toeplitz matrices, and exponential sums

This paper studies three structured approximation problems: (1) Recovering the range of a Fourier matrix from a single observation, (2) Recovering a corrupted low-rank Toeplitz/Hankel matrix, and (3) Recovering a finite exponential sum from noisy samples. All three problems are computationally challenging because their structural constraints are difficult to enforce directly. We show that all three tasks can be solved efficiently and optimally by applying the Gradient-MUSIC algorithm for spectral estimation. To provide an example, for a rank-$r$ Toeplitz matrix $T\in {\mathbb C}^{n\times n}$ that satisfies a regularity assumption and is corrupted by an arbitrary $E\in {\mathbb C}^{n\times n}$ such that $\|E\|_2\leq αn$, our algorithm outputs a Toeplitz matrix $T_\sharp$ of rank exactly $r$ such that $\|T-T_\sharp\|_2 \leq C \|E\|_2$, where $C,α>0$ are absolute constants. This performance guarantee is minimax optimal in $n$, $r$, and $\|E\|_2$. For the other two structured approximation problems, we also provide algorithms that are minimax optimal in the number of samples, rank/sparsity, and noise level. At the heart of this paper is a quantitative transference principle which shows how to convert computational methods and theory for spectral estimation into corresponding methods and theory for the other three problems.

cs.IT↗

Optimality of Gradient-MUSIC for spectral estimation

We introduce the Gradient-MUSIC algorithm for estimating the unknown frequencies and amplitudes of a nonharmonic signal from noisy time samples. While the classical MUSIC algorithm performs a computationally expensive search over a fine grid, Gradient-MUSIC is significantly more efficient and eliminates the need for discretization over a fine grid by using optimization techniques. It coarsely scans the 1D landscape to find initialization simultaneously for all frequencies followed by parallelizable local refinement via gradient descent. We also analyze its performance when the noise level is sufficiently small and the signal frequencies are separated by at least $8π/m$, where $π/m$ is the standard resolution of this problem. Even though the 1D landscape is nonconvex, we prove a global convergence result for Gradient-MUSIC: coarse scanning provably finds suitable initialization and gradient descent converges at a linear rate. In addition to convergence results, we also upper bound the error between the true signal frequencies and amplitudes with those found by Gradient-MUSIC. For example, if the noise has $\ell^\infty$ norm at most $\varepsilon$, then the frequencies and amplitudes are recovered up to error at most $C\varepsilon/m$ and $C\varepsilon$ respectively for a universal $C>0$, which are minimax optimal in $m$, $\varepsilon$, and number of frequencies. Our theory can also handle stochastic noise with performance guarantees under nonstationary independent Gaussian noise. Our main approach is a comprehensive geometric analysis of the landscape, a perspective that has not been explored before.

cs.IT↗

Multidimensional Gradient-MUSIC: A Global Nonconvex Optimization Framework for Optimal Resolution

We develop a multidimensional version of Gradient-MUSIC for estimating the frequencies of a nonharmonic signal from noisy samples. The guiding principle is that frequency recovery should be based only on the signal subspace determined by the data. From this viewpoint, the MUSIC functional is an economical nonconvex objective encoding the relevant information, and the problem becomes one of understanding the geometry of its perturbed landscape. Our main contribution is a general structural theory showing that, under explicit conditions on the measurement kernel and the perturbation of the signal subspace, the perturbed MUSIC function is an admissible optimization landscape: suitable initial points can be found efficiently by coarse thresholding, gradient descent converges to the relevant local minima, and these minima obey quantitative error bounds. Thus the theory is not merely existential; it provides a constructive global optimization framework for multidimensional optimal resolution. We verify the abstract conditions in detail for two canonical sampling geometries: discrete samples on a cube and continuous samples on a ball. In both cases we obtain uniform, nonasymptotic recovery guarantees under deterministic as well as stochastic noise. In particular, for lattice samples in a cube of side length $4m$, if the true frequencies are separated by at least $β_d/m$ and the noise has $\ell^\infty$ norm at most $\varepsilon$, then Gradient-MUSIC recovers the frequencies with error at most \[ C_d \frac{\varepsilon}{m}, \] where $C_d, β_d>0$ depend only on the dimension. This scaling is minimax optimal in $m$ and $\varepsilon$. Under stationary Gaussian noise, the error improves to \[ C_d\frac{σ\sqrt{\log(m)}}{m^{1+d/2}}. \] This is the noisy super-resolution scaling: (see paper for rest of abstract)

math.OC↗

An explicit spectral decomposition of the ADRT

The approximate discrete Radon transform (ADRT) is a hierarchical multiscale approximation of the Radon transform. In this paper, we factor the ADRT into a product of linear transforms that resemble convolutions and derive an explicit spectral decomposition of each factor. We further show that this implies -- for data lying in the range of the ADRT -- that the transform of an $N \times N$ image can be formally inverted with complexity $\mathcal{O}(N^2 \log^2 N)$. We numerically test the accuracy of the inverse on images of moderate size and find that it is competitive with existing iterative algorithms in this special regime.

math.NA↗

Concerning the stability of exponential systems and Fourier matrices

Fourier matrices naturally appear in many applications and their stability is closely tied to performance guarantees of algorithms. The starting point of this article is a result that characterizes properties of an exponential system on a union of cubes in $\mathbb{R}^d$ in terms of a general class of Fourier matrices and their extreme singular values. This relationship is flexible in the sense that it holds for any dimension $d$, for many types of exponential systems (Riesz bases, Riesz sequences, or frames) and for Fourier matrices with an arbitrary number of rows and columns. From there, we prove new stability results for Fourier matrices by exploiting this connection and using powerful stability theorems for exponential systems. This paper provides a systematic exploration of this connection and suggests some natural open questions.

math.CA↗

Subspace and DOA estimation under coarse quantization

We study direction-of-arrival (DOA) estimation from coarsely quantized data. We focus on a two-step approach which first estimates the signal subspace via covariance estimation and then extracts DOA angles by the ESPRIT algorithm. In particular, we analyze two stochastic quantization schemes which use dithering: a one-bit quantizer combined with rectangular dither and a multi-bit quantizer with triangular dither. For each quantizer, we derive rigorous high probability bounds for the distances between the true and estimated signal subspaces and DOA angles. Using our analysis, we identify scenarios in which subspace and DOA estimation via triangular dithering qualitatively outperforms rectangular dithering. We verify in numerical simulations that our estimates are optimal in their dependence on the smallest non-zero eigenvalue of the target matrix. The resulting subspace estimation guarantees are equally applicable in the analysis of other spectral estimation algorithms and related problems.

cs.IT↗

Nonharmonic multivariate Fourier transforms and matrices: condition numbers and hyperplane geometry

Consider an operator that takes the Fourier transform of a discrete measure supported in $\mathcal{X}\subset[-\frac 12,\frac 12)^d$ and restricts it to a compact $Ω\subset\mathbb{R}^d$. We provide lower bounds for its smallest singular value when $Ω$ is either a closed ball of radius $m$ or closed cube of side length $2m$, and under different types of geometric assumptions on $\mathcal{X}$. We first show that if distances between points in $\mathcal{X}$ are lower bounded by a $δ$ that is allowed to be arbitrarily small, then the smallest singular value is at least $Cm^{d/2} (mδ)^{λ-1}$, where $λ$ is the maximum number of elements in $\mathcal{X}$ contained within any ball or cube of an explicitly given radius. This estimate communicates a localization effect of the Fourier transform. While it is sharp, the smallest singular value behaves better than expected for many $\mathcal{X}$, including when we dilate a generic set by parameter $δ$. We next show that if there is a $η$ such that, for each $x\in\mathcal{X}$, the set $\mathcal{X}\setminus\{x\}$ locally consists of at most $r$ hyperplanes whose distances to $x$ are at least $η$, then the smallest singular value is at least $C m^{d/2} (mη)^r$. For dilations of a generic set by $δ$, the lower bound becomes $C m^{d/2} (mδ)^{\lceil (λ-1)/d\rceil }$. The appearance of a $1/d$ factor in the exponent indicates that compared to worst case scenarios, the condition number of nonharmonic Fourier transforms is better than expected for typical sets and improve with higher dimensionality.

math.NA↗

Enhancing Smart Contract Security Analysis with Execution Property Graphs

Smart contract vulnerabilities have led to significant financial losses, with their increasing complexity rendering outright prevention of hacks increasingly challenging. This trend highlights the crucial need for advanced forensic analysis and real-time intrusion detection, where dynamic analysis plays a key role in dissecting smart contract executions. Therefore, there is a pressing need for a unified and generic representation of smart contract executions, complemented by an efficient methodology that enables the modeling and identification of a broad spectrum of emerging attacks. We introduce Clue, a dynamic analysis framework specifically designed for the Ethereum virtual machine. Central to Clue is its ability to capture critical runtime information during contract executions, employing a novel graph-based representation, the Execution Property Graph. A key feature of Clue is its innovative graph traversal technique, which is adept at detecting complex attacks, including (read-only) reentrancy and price manipulation. Evaluation results reveal Clue's superior performance with high true positive rates and low false positive rates, outperforming state-of-the-art tools. Furthermore, Clue's efficiency positions it as a valuable tool for both forensic analysis and real-time intrusion detection.

cs.CR↗

Multiscale estimates for the condition number of non-harmonic Fourier matrices

This paper studies the extreme singular values of non-harmonic Fourier matrices. Such a matrix of size $m\times s$ can be written as $Φ=[ e^{-2πi j x_k}]_{j=0,1,\dots,m-1, k=1,2,\dots,s}$ for some set $\mathcal{X}=\{x_k\}_{k=1}^s$. Its condition number controls the stability of inversion, which is of great importance to super-resolution and nonuniform Fourier transforms. Under the assumption $m\geq 6s$ and without any restrictions on $\mathcal{X}$, the main theorems provide explicit lower bounds for the smallest singular value $σ_s(Φ)$ in terms of distances between elements in $\mathcal{X}$. More specifically, distances exceeding an appropriate scale $τ$ have modest influence on $σ_s(Φ)$, while the product of distances that are less than $τ$ dominates the behavior of $σ_s(Φ)$. These estimates reveal how the multiscale structure of $\mathcal{X}$ affects the condition number of Fourier matrices. Theoretical and numerical comparisons indicate that the main theorems significantly improve upon classical bounds and recover the same rate for special cases but with relaxed assumptions.

math.NA↗

Uniform Approximation by Polynomials with Integer Coefficients via the Bernstein Lattice

Let $\mathscr{C}_\mathbb{Z}([0,1])$ be the metric space of real-valued continuous functions on $[0,1]$ with integer values at $0$ and $1$, equipped with the uniform (supremum) metric $d_\infty$. It is a classical theorem in approximation theory that the ring $\mathbb{Z}[X]$ of polynomials with integer coefficients, when considered as a set of functions on $[0,1]$, is dense in $\mathscr{C}_\mathbb{Z}([0,1])$. In this paper, we offer a strengthening of this result by identifying a substantially small subset $\bigcup_n \mathscr{B}_n$ of $\mathbb{Z}[X]$ which is still dense in $\mathscr{C}_\mathbb{Z}([0,1])$. Here $\mathscr{B}_n$, which we call the ``Bernstein lattice,'' is the lattice generated by the polynomials $$p_{n,k}(x) := \binom{n}{k} x^k(1-x)^{n-k}, ~~k=0,\dots,n.$$ Quantitatively, we show that for any $f \in \mathscr{C}_\mathbb{Z}([0,1])$, $$d_\infty(f, \mathscr{B}_n) \leq \frac{9}{4} ω_f(n^{-1/3}) + 2 n^{-1/3}, ~~n \geq 1,$$ where $ω_f$ stands for the modulus of continuity of $f$. We also offer a more general bound which can be optimized to yield better decay of approximation error for specific classes of continuous functions.

math.NT↗

Unmasking Role-Play Attack Strategies in Exploiting Decentralized Finance (DeFi) Systems

The rapid growth and adoption of decentralized finance (DeFi) systems have been accompanied by various threats, notably those emerging from vulnerabilities in their intricate design. In our work, we introduce and define an attack strategy termed as Role-Play Attack, in which the attacker acts as multiple roles concurrently to exploit the DeFi system and cause substantial financial losses. We provide a formal definition of this strategy and demonstrate its potential impacts by revealing the total loss of \$435.1M caused by 14 historical attacks with applying this pattern. Besides, we mathematically analyzed the attacks with top 2 losses and retrofitted the corresponding attack pattern by concrete execution, indicating that this strategy could increase the potential profit for original attacks by \$3.34M (51.4%) and \$3.76M (12.0%), respectively.

cs.CR↗

Approximation of functions with one-bit neural networks

The celebrated universal approximation theorems for neural networks roughly state that any reasonable function can be arbitrarily well-approximated by a network whose parameters are appropriately chosen real numbers. This paper examines the approximation capabilities of one-bit neural networks -- those whose nonzero parameters are $\pm a$ for some fixed $a\not=0$. One of our main theorems shows that for any $f\in C^s([0,1]^d)$ with $\|f\|_\infty<1$ and error $\varepsilon$, there is a $f_{NN}$ such that $|f(\boldsymbol{x})-f_{NN}(\boldsymbol{x})|\leq \varepsilon$ for all $\boldsymbol{x}$ away from the boundary of $[0,1]^d$, and $f_{NN}$ is either implementable by a $\{\pm 1\}$ quadratic network with $O(\varepsilon^{-2d/s})$ parameters or a $\{\pm \frac 1 2 \}$ ReLU network with $O(\varepsilon^{-2d/s}\log (1/\varepsilon))$ parameters, as $\varepsilon\to0$. We establish new approximation results for iterated multivariate Bernstein operators, error estimates for noise-shaping quantization on the Bernstein basis, and novel implementation of the Bernstein polynomials by one-bit quadratic and ReLU neural networks.

cs.LG↗

Approximation with one-bit polynomials in Bernstein form

We prove various theorems on approximation using polynomials with integer coefficients in the Bernstein basis of any given order. In the extreme, we draw the coefficients from $\{ \pm 1\}$ only. A basic case of our results states that for any Lipschitz function $f:[0,1] \to [-1,1]$ and for any positive integer $n$, there are signs $σ_0,\dots,σ_n \in \{\pm 1\}$ such that $$\left |f(x) - \sum_{k=0}^n σ_k \, \binom{n}{k} x^k (1-x)^{n-k} \right | \leq \frac{C (1+|f|_{\mathrm{Lip}})}{1+\sqrt{nx(1-x)}} ~\mbox{ for all } x \in [0,1].$$ More generally, we show that higher accuracy is achievable for smoother functions: For any integer $s\geq 1$, if $f$ has a Lipschitz $(s{-}1)$st derivative, then approximation accuracy of order $O(n^{-s/2})$ is achievable with coefficients in $\{\pm 1\}$ provided $\|f \|_\infty < 1$, and of order $O(n^{-s})$ with unrestricted integer coefficients, both uniformly on closed subintervals of $(0,1)$ as above. Hence these polynomial approximations are not constrained by the saturation of classical Bernstein polynomials. Our approximations are constructive and can be implemented using feedforward neural networks whose weights are chosen from $\{\pm 1\}$ only.

cs.IT↗