arXiv Science⌕ Search

arXiv subjects

Shuyang Xiang

Publications and source records attributed to Shuyang Xiang.

14 recordsLinked to original sources

NoHairCache: Calibrate-Once KV Cache Eviction with One Power-Law Exponent

The decay exponent $α$ in KV-cache eviction is an intrinsic property of the model: calibrated once on a single corpus, it transfers directly across domains. Attention-based accumulation (H2O) and recency-based sliding windows (StreamingLLM) are two dominant eviction frameworks, often treated as unrelated, but we show that they are the two endpoints of a single power-law family: by scoring each token as $s_i = A_i \cdot (t-i)^{-α}$, where $A_i$ is cumulative attention and $α$ controls the age penalty, H2O and StreamingLLM correspond to $α=0$ and $α\to\infty$, respectively (with StreamingLLM additionally hard-coding an attention-sink patch). The no-hair mechanism of \citet{xiang2026nohair} bounds the admissible range of $α$, and the measured exponents agree: calibrating once on WikiText yields $[0.556, 0.822]$ for a representative model (Qwen2.5-1.5B-Instruct). The per-model ranges are consistent across five models (410M--1.5B) and independently match the optimal regions from perplexity sweeps. \textsc{NoHairCache} achieves the lowest perplexity across three datasets (WikiText, PG19, and arXiv) without per-dataset tuning, outperforming both H2O and StreamingLLM ($p < 0.05$ on all three datasets, with $0.06$--$0.10$ PPL gains over StreamingLLM at budget $512$). On downstream four-way multiple-choice QA, it matches or outperforms StreamingLLM across all nine (task, budget) cells, retaining $98.2\%$ of full-cache accuracy on NarrativeQA at $25\%$ retention versus $91.1\%$ for StreamingLLM; per-cell McNemar tests are not significant, so QA is corroborating only. We release our calibration script and drop-in scorer upon publication.

cs.CL↗

A Conditional No-Hair Theorem for Transformers: How Language Models Forget Their Prompt

A black hole retains only a few conserved charges of the matter it formed from. We are inspired to make the analogy and we ask how much an autoregressive transformer retains of its prompt after generating $t$ tokens. For two prompts followed by the same continuation, the difference of their hidden states decays approximately as a power law $t^{-α}$, where $α=1$ is the rate at which a fixed prompt's share of uniform attention shrinks. Beyond the first layers, trained models forget faster ($α\approx0.55$--$0.7$) than untrained ones of the same architecture ($α\approx0.2$--$0.5$). For finite-depth pre-LN softmax transformers with bounded attention logits and non-degenerate pre-norm activations, we prove that this offset is $O\big(P(\log t)^{L-1}/t\big)$ for prompt length $P$ and depth $L$: the prompt's direct influence is diluted as the context grows, and \emph{relay} through continuation tokens adds only logarithmic factors. Conditional on the generated text, the prompt's influence on the next token thus vanishes. The bound fixes only the asymptotic shape and is uninformative at the lengths we measure in trained networks; an exactly solvable linear relay model shows that it cannot be improved and accounts for the untrained curves. Cancelling the dilution with a logit bias on the prompt stops the decay early in training, and training suppresses relay by about one billion tokens, before attention sinks form. A toolkit that measures $α$ for any Hugging Face causal language model is publicly available.

cs.AI↗

Paragraph Boundaries Are Not White Space:Compression Depth as the Signature of Hierarchical Structure

Standard positional encodings treat position as a one-dimensional reading-order coordinate, but reading order alone does not determine hierarchical textual structure. We use a hierarchical rotary positional encoding (hRoPE) that represents paragraph, sentence, and token indices as separate channels, hold the token sequence fixed, intervene on the paragraph coordinate $p_1$, and measure cross-paragraph attention with a token-distance-exact estimator. Attention is compressed in every corpus, but compression alone is not diagnostic of true structure: an architecturally identical channel with density-matched random labels is compressed too. What distinguishes real structure is the depth of compression: the real-versus-random depth gap is resolvable in two of three corpora and not in the third, and real-structure depth varies more strongly across corpora than the control's. Comparing eight corpus-only quantities across three constructs (lexical persistence, paragraph length, embedding-based coherence), none fully reproduces the cross-corpus ordering of depth, though embedding-based coherence comes closest. At the paragraph level that relation transfers as a common slope, but with the opposite sign to the corpus-level ranking: controlling for length, diversity, and position, paragraphs with more similar neighbors compress less deeply, with no detectable slope difference between any pair of corpora, while length, lexical-diversity, and position effects remain corpus-specific. Compression depth, not its location, is the reproducible signature of genuine paragraph structure in our setting.

cs.CL↗

One Image, No Tokens: A Controlled Study of Glyph-Based Chinese Language Modeling

Modern language models generally represent text as sequences of discrete token embeddings, an assumption deeply rooted in current practice but rarely questioned. We challenge this representation, especially for Chinese, by replacing index-based token embeddings entirely with a single rasterized image of the character sequence, processed by a vision encoder composed of a shared ResNet and a shallow Vision Transformer. To isolate the role of input representation, we construct a dual-branch controlled framework in which both a Vision-based model and an index-based baseline share an identical decoder backbone, training objective, optimizer, and data curriculum. Any performance difference is therefore attributable to the input modality only. Across all tested decoder backbones, the Vision-based model consistently outperforms the baseline, reaching a peak accuracy of 0.429 versus 0.355 for the index-based baseline---a 21\% relative improvement---while converging in about half the number of training epochs. The advantage emerges especially within the first five epochs (under 21\% of total data) and persists under moderate character corruption: the corrupted Vision model matches the \emph{clean} index-based baseline. Ablation studies reveal that the advantage requires both spatially coherent input and a ViT encoder with 2D positional encodings. A cross-script comparison on English shows the advantage does not transfer directly to alphabetic writing systems, suggesting that the uniform visual density and radical structure of Chinese characters are enabling conditions. These findings suggest that transformers are more modality-agnostic than commonly assumed, and that discrete tokenization is not a fundamental requirement for Chinese language modeling.

cs.CV↗

Physics-informed token transformer methodology for nonlinear balance laws. I. Schwarzschild--Burgers fluid flows

We introduce a Physics-Informed Token Transformer (PITT) methodology for nonlinear hyperbolic balance laws in one space dimension, using piecewise steady-state profiles for the representation of approximate weak solutions. The method combines symbolic equation tokenization, a Fourier neural operator encoder, an explicit Rankine--Hugoniot law for shock motion, and a learned correction term. For clarity, we present it here for the relativistic Schwarzschild--Burgers equation, a scalar model for spherically symmetric fluid flows on a Schwarzschild background. For this model the steady-state invariant and the generalized Riemann solutions are explicit, and they can therefore be built into the neural evolution. In particular, the leading discontinuities are advanced by the analytical jump condition, while the learned part reconstructs smooth regions, rarefaction fans, geometric dependence, and finite-resolution effects. The method is designed to locate wave fronts accurately and to preserve the relevant steady states. We test our PITT method on moving shocks, stationary shocks, rarefaction waves, and compare it with a standard high-order finite-volume approximation. We also analyze the standard Burgers limit (when the Schwarzschild mass tends to zero). The Rankine--Hugoniot prior plays the dominant role in these tests, while equation tokenization gives a systematic additional gain. The method is relevant for problems involving geometric effects and/or complex shock-wave dynamics, and is used here to study the long-time dynamics of perturbations of steady-state solutions. In particular, we exhibit an asymptotic law of propagation for the shock location of perturbed steady-state flows.

math.NA↗

Hot-Start Chinese Language Modeling:Visual Glyphs Accelerate Sample-Efficient Learning

In this work, we study whether rendering Chinese characters as visual glyph images, rather than discrete token IDs as mainstream LLMs do, providing an inductive bias for character-level language modeling. Our central finding gives a double-edged insight: visual inputs produce a pronounced hot-start effect, more than doubling early-stage accuracy within the first epoch (at 0.4% of total training steps) (12.3% visual inputs vs. 5.8% index-based baseline), yet both approaches converge to essentially identical final accuracy (39%). This pattern holds across resolutions as low as 8x8 pixels, partial cropping up to 50%, and model scales from 110M to 1.78B parameters. The mechanism we identify is that glyph rendering pre-encodes radical-based structure into embedding space before any training (cosine similarity 0.27 vs. 0.002 for random embeddings), enabling faster alignment but not higher final capacity. Our results clarify both the promise and fundamental limitation of visual representations as inductive biases for Chinese language modeling.

cs.CV↗

Physics-Informed Neural Networks for the Relativistic Burgers Equation in the Exterior of a Schwarzschild Black Hole

We introduce a Physics-Informed Neural Networks(PINN) to solve a relativistic Burgers equation in the exterior domain of a Schwarzschild black hole. Our main contribution is a PINN architecture that is able to simulate shock wave formations in such curved spacetime, by training a shock-aware network block and introducing a Godunov-inspired residuals in the loss function. We validate our method with numerical experiments with different kinds of initial conditions. We show its ability to reproduce both smooth and discontinuous solutions in the context of general relativity.

math.NA↗

Embedded corrector problems for homogenization in linear elasticity

In this article, we extend the study of embedded corrector problems, that we have previously introduced in the context of the homogenization of scalar diffusive equations, to the context of homogenized elastic properties of materials. This extension is not trivial and requires mathematical arguments specific to the elasticity case. Starting from a linear elasticity model with highly-oscillatory coefficients, we introduce several effective approximations of the homogenized tensor. These approximations are based on the solution to an embedded corrector problem, where a finite-size domain made of the linear elastic heterogeneous material is embedded in a linear elastic homogeneous infinite medium, the constant elasticity tensor of which has to be appropriately determined. The approximations we provide are proven to converge to the homogenized elasticity tensor when the size of the embedded domain tends to infinity. Some particular attention is devoted to the case of isotropic materials.

math.AP↗

Boundary integral equations for isotropic linear elasticity

This articles first investigates boundary integral operators for the three-dimensional isotropic linear elasticity of a biphasic model with piecewise constant Lamé coefficients in the form of a bounded domain of arbitrary shape surrounded by a background material. In the simple case of a spherical inclusion, the vector spherical harmonics consist of eigenfunctions of the single and double layer boundary operators and we provide their spectra. Further, in the case of many spherical inclusions with isotropic materials, each with its own set of Lamé parameters, we propose an integral equation and a subsequent Galerkin discretization using the vector spherical harmonics and apply the discretization to several numerical test cases.

math.NA↗

Existence theory for well-balanced Euler model

We study the initial value problem for a kind of Euler equation with a source term. Our main result is the existence of a globally-in-time weak solution whose total variation is bounded on the the domain of definition, allowing the existence of shock waves. Our proof relies on a well-balanced random choice method called Glimm method which preserves the fluid equilibria and we construct a sequence of approximate weak solutions which converges to the exact weak solution of the initial value problem, based on the construction of exact solutions of the generalized Riemann problem associated with initially piecewise steady state solutions.

math.AP↗

An embedded corrector problem for homogenization. Part II: Algorithms and discretization

This contribution is the numerically oriented companion article of the work [E. Cancès, V. Ehrlacher, F. Legoll, B. Stamm and S. Xiang, arxiv preprint 1807.05131]. We focus here on the numerical resolution of the embedded corrector problem introduced in [E. Cancès, V. Ehrlacher, F. Legoll and B. Stamm, CRAS 2015; E. Cancès, V. Ehrlacher, F. Legoll, B. Stamm and S. Xiang, arxiv preprint 1807.05131] in the context of homogenization of diffusion equations. Our approach consists in considering a corrector-type problem, posed on the whole space, but with a diffusion matrix which is constant outside some bounded domain. In [E. Cancès, V. Ehrlacher, F. Legoll, B. Stamm and S. Xiang, arxiv preprint 1807.05131], we have shown how to define three approximate homogenized diffusion coefficients on the basis of the embedded corrector problems. We have also proved that these approximations all converge to the exact homogenized coefficients when the size of the bounded domain increases. We show here that, under the assumption that the diffusion matrix is piecewise constant, the corrector problem to solve can be recast as an integral equation. In case of spherical inclusions with isotropic materials, we explain how to efficiently discretize this integral equation using spherical harmonics, and how to use the fast multipole method (FMM) to compute the resulting matrix-vector products at a cost which scales only linearly with respect to the number of inclusions. Numerical tests illustrate the performance of our approach in various settings.

math.NA↗

An embedded corrector problem for homogenization. Part I: Theory

This article is the first part of a two-fold study, the objective of which is the theoretical analysis and numerical investigation of new approximate corrector problems in the context of stochastic homogenization. We present here three new alternatives for the approximation of the homogenized matrix for diffusion problems with highly-oscillatory coefficients. These different approximations all rely on the use of an embedded corrector problem (that we previously introduced in [Cancès, Ehrlacher, Legoll and Stamm, C. R. Acad. Sci. Paris, 2015]), where a finite-size domain made of the highly oscillatory material is embedded in a homogeneous infinite medium whose diffusion coefficients have to be appropriately determined. The motivation for considering such embedded corrector problems is made clear in the companion article [Cancès, Ehrlacher, Legoll, Stamm and Xiang, in preparation], where a very efficient algorithm is presented for the resolution of such problems for particular heterogeneous materials. In the present article, we prove that the three different approximations we introduce converge to the homogenized matrix of the medium when the size of the embedded domain goes to infinity.

math.NA↗

Weakly regular fluid flows with bounded variation on the domain of outer communication of a Schwarzschild black hole spacetime. A numerical study

We study the dynamical behavior of compressible fluids evolving on the outer domain of communication of a Schwarzschild background. To this end, we design several numerical methods which take the Schwarzschild geometry into account and we treat, both, the relativistic Burgers equation and the relativistic Euler system under the assumption that the flow is spherically symmetric. All the schemes we construct are proven to be well-balanced and therefore to preserve the family of steady state solutions for both models. They enable us to study the nonlinear stability of fluid equilibria, and in particular to investigate the behavior of the fluid near the blackhole horizon. We state and numerically demonstrate several conjectures about the late-time behavior of perturbations of steady solutions.

math.AP↗

Weakly regular fluid flows with bounded variation on a Schwarzschild background

We study the global dynamics of isothermal fluids evolving in the domain of outer communication of a Schwarzschild black hole. We first formulate the initial value problem within a class of weak solutions with bounded variation (BV), possibly containing shock waves. We then introduce a version of the random choice method and establish a global-in-time existence theory for the initial value problem within the proposed class of weakly regular fluid flows. The initial data may have arbitrary large bounded variation and can possibly blow up near the horizon of the black hole. Furthermore, we study the class of possibly discontinuous, equilibrium solutions and design a version of the random choice method in which these fluid equilibria are exactly preserved. This leads us to a nonlinear stability property for fluid equilibria under small perturbations with bounded variation. Furthermore, we can also encompass several limiting regimes (stiff matter, non-relativistic flows, extremal black hole) by letting the physical parameters (mass of the black hole, light speed, sound speed) reach extremal values.

math.AP↗