SearcharxivSearch

arXiv subjects

Shuang Sun

Publications and source records attributed to Shuang Sun.

At least 19 recordsLinked to original sources

Sharp edge-spectral supersaturation for odd cycles

Let \(G\) be a graph with \(m\) edges and adjacency spectral radius\(\rho(G)\), and let \(N(C_{2k+1},G)\) denote the number of copies of \(C_{2k+1}\) in \(G\). For each fixed integer \(k\ge 2\), define \( g_k(m):=\frac{k-1+\sqrt{4m-k^2+1}}{2}. \) Li, Zhai and Shu [European J. Combin., 2024] determined the spectral extremal threshold for odd cycles by proving that, for all sufficiently large \(m\), every \(C_{2k+1}\)-free graph \(G\) with \(m\) edges satisfies \(\rho(G)\le g_k(m)\). We establish the asymptotically sharp supersaturation counterpart of their result. More precisely, for every fixed integer \(k\ge 2\), we prove that \[ \inf_{\substack{e(G)=m\\ \rho(G)>g_k(m)}} \frac{N(C_{2k+1},G)}{m^k} = \frac{\lceil k^2/2\rceil (k-1)!}{(k+1)^k}+o(1) \qquad\text{as }m\to\infty. \] Thus every \(m\)-edge graph whose spectral radius exceeds the \(C_{2k+1}\)-free threshold contains at least \[ \Big( \frac{\lceil k^2/2\rceil (k-1)!}{(k+1)^k}-o(1) \Big)m^k \] copies of \(C_{2k+1}\), and the leading constant is asymptotically best possible. In particular, taking \(k=2\), we obtain if \( \rho(G)>\frac{1+\sqrt{4m-3}}{2}\) then \( N(C_5,G)\ge \left(\frac{2}{9}-o(1)\right)m^2, \) with the constant \(2/9\) being asymptotically optimal. This answers a question of Chen, Li and Tang concerning the existence and the largest possible value of a constant \(C>0\) for which the same spectral condition guarantees at least \(Cm^2\) copies of \(C_5\). More generally, our result resolves a recent problem of Li, Lin, Liu and Zhang on spectral supersaturation for odd cycles. The proof combines spectral stability and resolvent analysis with estimates for odd spectral moments and a careful treatment of non-injective closed walks.

math.CO

GlyphAnchor: Enhancing Visual Text Rendering via Position-Anchored Glyph Priors

Rendering accurate text remains difficult for image generation and editing models, especially when the target contains long, complex, and densely arranged text or rare characters. Existing approaches either improve native text rendering through stronger backbones and data-centric training without explicit glyph priors, or incorporate glyph priors through specialized designs that remain insufficiently accurate and robust under challenging scenarios. We introduce GlyphAnchor, a novel text-rendering enhancement method for both text-to-image and image-editing diffusion transformer models. GlyphAnchor enhances the backbone with lightweight glyph patch conditions whose positions are anchored to the target image through the model's native positional encoding. We train this capability with staged supervised finetuning and further refine it with text-aware post-training to improve robustness. We also introduce InfoTextBench, a benchmark for evaluating text-rich visual text rendering in both generation and editing settings. Experiments across multiple backbones and benchmarks, including long, complex, and densely arranged text and rare character scenarios, show that GlyphAnchor consistently improves text fidelity while preserving overall image quality.

cs.CV

Every fork-free graph is perfectly weight divisible

A graph $G$ is \emph{perfectly weight divisible} if, for every positive integral weight function on $V(G)$ and every induced subgraph $H$ of $G$ with at least one edge, the vertex set $V(H)$ can be partitioned into two sets $A$ and $B$ such that $H[A]$ is perfect and the maximum weight of a clique in $H[B]$ is smaller than the maximum weight of a clique in $H$. Perfect divisibility and its weighted form provide a natural approach to polynomial $\chi$-boundedness. A \emph{fork}, also known as a \emph{chair}, is the graph obtained from a claw by subdividing one of its edges once. In this paper, we prove that every fork-free graph is perfectly weight divisible. As a consequence, we confirm a conjecture of Sivaraman that every fork-free graph is perfectly divisible.

math.CO

A Study of Cursorrules Files in GitHub Open Source Projects

Prompts are the primary mechanism for communicating with AI agents, and they directly influence the quality and reliability of AI-generated code. As AI-assisted programming becomes widely adopted, modern tools increasingly combine dynamic conversational prompts with static configuration-like prompt files. Despite the growing focus on prompt engineering, prior research has primarily focused on conversational prompts, while prompt files remain understudied. To address this gap, we conduct an empirical study of configuration prompt files in Cursor, a widely used AI-assisted code editor. We collect and analyze over 12,110 .cursorrules files from 11,427 GitHub repositories to characterize their distribution, evolution, and maintenance. Complementing this, we perform qualitative analysis on a random sample of 65 prompt files and develop a 65-code codebook capturing how developers express programming intent, project context, engineering practices, and security considerations. Our results show that .cursorrules files emerged rapidly from mid-2024. Their adoption is concentrated in small-scale, low-activity, single-maintainer repositories, suggesting toy projects rather than professional development. The content of prompt files is dominated by guidance on code quality and engineering practices, project structure and configuration, and maintainability, while security-related content appears less frequently. Our analysis shows that there is a continuity of themes and topics between the now-legacy .cursorrules files and the current standard .mdc files.

cs.SE

CalibForge: Adversarial Solver Calibration for Scaling Learnable Terminal Tasks

Training terminal agents requires executable and verifiable tasks that are not merely solvable, but appropriately challenging for learning. Executable validation establishes feasibility, yet does not reveal how a task behaves relative to a given solver setting. In this paper, we present CalibForge, an autonomous terminal-task synthesis system that uses verified solver behavior to revise candidate tasks through adversarial solver calibration. Multi-solver calibration targets disagreement within a heterogeneous solver pool, whereas contrastive solver calibration targets a designated strong-pass/weak-fail relation; both operationalize a solver-relative learnable zone anchored in demonstrated solvability. Using CalibForge, we construct 5,431 calibrated terminal tasks. Our ablations show that both strategies yield more effective supervision than authoring and validation alone or ordinary single-solver feedback. Models trained on the full collection achieve 32.58% and 47.57% on Terminal-Bench 2.0. The largest improvements over the corresponding base model reach 24.71 percentage points on Terminal-Bench 2.0, 27.68 points on SWE-bench Pro, and 30.04 points on Doc2Repo. Together, these results support solver-relative learnability as a practical target for constructing effective and transferable agent training data.

cs.LG

Optimal coloring of $\{\mathrm{cap},\mathrm{even\ hole}\}$-free graphs with no short odd holes

A \emph{hole} is an induced cycle of length at least four, and an \emph{even hole} is a hole of even length. A \emph{cap} is obtained from a hole by adding a vertex adjacent to exactly two consecutive vertices of the hole. Chen, Xu, and Xu proved that every $\{\mathrm{cap},\mathrm{even\ hole}\}$-free graph $G$ satisfies $\chi(G)\leq \left\lceil\frac{5}{4}\omega(G)\right\rceil$, and improved this bound to $\chi(G)\leq \left\lceil\frac{7}{6}\omega(G)\right\rceil$ when $5$-holes are also excluded. They asked whether, for every integer $q\geq3$, every $\{\mathrm{cap},\mathrm{even\ hole}\}$-free graph $G$ with no odd hole of length at most $2q-1$ satisfies $$ \chi(G)\leq \left\lceil\frac{2q+1}{2q}\omega(G)\right\rceil. $$ We answer this question affirmatively and show that the bound is sharp for every $q\geq3$.

math.CO

Asymptotic Uniformity of Permanents of Random Matrices over Finite Fields of Odd Characteristic

Let $q$ be an odd prime power, and let $A_n=(a_{ij})\in\mathbb F_q^{n\times n}$ be a random matrix whose entries are independent and uniformly distributed on $\mathbb F_q$. The permanent of $A_n$ is defined by $\operatorname{per}(A_n)=\sum_{\sigma\in S_n}\prod_{i=1}^n a_{i,\sigma(i)}$, where $S_n$ denotes the symmetric group on $[n]$. Ghasemi, Gross, and Kopparty conjectured the zero-mass asymptotic $\Pr[\operatorname{per}(A_n)=0]=1/q+o(1)$ for every fixed odd prime power $q$, and Hunter, Kwan, and Sauermann subsequently stated its equivalent full-distribution formulation: for every fixed $q$ and every $x\in\mathbb F_q$, \[ \lim_{n\to\infty}\Pr[\operatorname{per}(A_n)=x]=\frac1q. \] In this paper, we prove this conjecture. More precisely, we prove that there is an absolute constant $C>0$ such that \[\frac12\sum_{x\in\mathbb F_q}\left|\Pr[\operatorname{per}(A_n)=x]-\frac1q\right|\le C\frac{\log n}{n}\] for every odd prime power $q$ and every $n\ge 7$. The estimate is uniform in $q$, so the conclusion remains valid for every sequence $q=q(n)$ of odd prime powers.

math.CO

Nanbeige4.2-3B: Unlocking Agentic Capabilities in a Compact Model

We present Nanbeige4.2-3B, a compact general agentic model with 3B non-embedding parameters. It delivers strong performance across code-agent, office-agent, and complex tool-use tasks while maintaining highly competitive reasoning capabilities in mathematics, coding, and science. Nanbeige4.2-3B is pretrained from scratch on 28T tokens with a Looped Transformer that reuses the layer stack to increase capacity without adding parameters. For SFT data and trajectory construction, we expand the diversity of executable environments, task assets, and agentic scaffolds through real-world deployment and large-scale synthesis. Our RL pipeline applies mixed-mode RLHF over Think and Non-Think responses to improve overall model quality and reduce failure cases, length-controlled reasoning RL to balance accuracy and reasoning efficiency, and agentic RL with outcome and process rewards to stabilize long-horizon training. Extensive evaluations show that Nanbeige4.2-3B outperforms larger models, including Qwen3.5-9B and Gemma4-12B, across diverse agentic benchmarks while remaining competitive on reasoning and alignment tasks. Performance with OpenClaw further supports its use as a compact local personal assistant.

cs.AI

Compactness of abundance in asymmetric hypergraph removal lemmas

Fix an integer $r\ge 2$ and a finite simple $r$-uniform hypergraph $F$ with at least one edge and no isolated vertices. An $n$-vertex $r$-graph is $\epsilon$-far from being $F$-free if at least $\epsilon n^r$ edges must be deleted to destroy every copy of $F$. A finite $r$-graph $H$ is $F$-abundant if there are constants $c,C>0$ such that every sufficiently large $\epsilon$-far host contains at least $c\epsilon^C n^{v(H)}$ labelled copies of $H$. A family is $F$-abundant when one member has this lower bound in each host, although the member may depend on the host and on $\epsilon$, while $c$ and $C$ are common to the family. We prove that every abundant family contains an abundant member. We prove the analogous coloured theorem for $F$-partite hosts containing edge-disjoint part-respecting copies of $F$ such that every vertex lies in at least $\epsilon n^{r-1}$ of them. The case $r=2$ yields the coloured and uncoloured graph compactness theorems, answers Question 5.2 of Gir\~ao, Hurley, Illingworth and Michel, and proves their Conjecture 5.1 [J. Lond. Math. Soc., 2024]. We also obtain an explicit bound $\lfloor 2r(C+1)\rfloor$ for the order of the non-isolated core of a selected witness. Moreover, we give several applications. For example, we construct translation-invariant linear systems from abundant coloured hypergraphs, obtain a square-root bound for an equation associated with a cycle of bounded length, give a one-sided tester based on one fixed graph when distance from the property gives a polynomial lower bound on distance from being $F$-free, and prove that no algorithm decides whether a family of finite simple graphs enumerated by a Turing machine is $K_3$-abundant.

math.CO

AdvancedMathBench: A Benchmark Suite for Advanced Mathematical Proof Generation and Verification

Large language models (LLMs) have achieved remarkable performance on high-school and olympiad-style mathematics, yet their capabilities on advanced mathematics remain poorly understood. Existing benchmarks, however, fall short in both scope and evaluation granularity: they provide limited disciplinary coverage and often rely on final-answer correctness or coarse judgments, leaving the validity of the reasoning process inadequately assessed. To bridge this gap, we introduce AdvancedMathBench, a benchmark suite designed to evaluate advanced mathematical reasoning capabilities. Its core proof-generation benchmark, ProverBench, contains 296 problems spanning undergraduate and doctoral qualifying-exam levels. To provide reliable evaluation of the proofs, we develop a dedicated automatic verification pipeline trained on large-scale expert annotations to produce both correctness verdicts and fine-grained assessments of proof errors, which exhibits strong agreement with human experts on held-out proof trajectories. We further introduce VerifierBench, consisting of 888 model-generated proof trajectories paired with expert ground truth, to evaluate whether models can correctly judge proof validity and provide sound verification rationales. Experiments show that AdvancedMathBench remains challenging for frontier models. On proof generation, the best-performing model, GPT-5.5-xhigh, achieves only 75.8 and 66.1 on the UGD and QE splits, respectively, indicating substantial room for improvement on advanced mathematical proof construction. On proof verification, the best model attains a Balanced F1 of only 65.1, and models generally exhibit low true negative rates, suggesting that critical error detection remains a major bottleneck.

cs.CL

A Single-Exponential Erd\H{o}s--Hajnal Bound for Graphs of Bounded VC-Dimension

A homogeneous set in a graph is a clique or a stable set. The Erd\H{o}s--Hajnal conjecture states that, for every graph $H$, there exists $c>0$ such that every $H$-free graph on $n$ vertices has a homogeneous set of size at least $n^c$. Nguyen, Scott and Seymour proved that for every $d>0$, graphs of VC-dimension at most $d$ have the Erd\H{o}s--Hajnal property, confirming a conjecture of Fox, Pach and Suk. In particular, they showed that every such $n$-vertex graph contains a homogeneous set of size at least $n^{\eta_d}$ for some $\eta_d\ge 2^{-2^{O(d)}}$. In this paper, we give a sharper quantitative bound on the homogeneous sets in graphs of VC-dimension at most $d$, showing that one may take $ \eta_d\ge (Cd)^{-d}, $ where $C$ is an absolute constant. Equivalently, every graph $G$ of VC-dimension at most $d$ satisfies \[ \max\{\omega(G),\alpha(G)\}\ge |G|^{(Cd)^{-d}}. \] Our proof refines the iterative sparsification method of Nguyen, Scott and Seymour. The main enhancement is to apply the VC-dimension assumption directly, which gives a more efficient induction and thus improves the dependence on $d$. We also derive quantitative consequences for polynomial R\"odl subgraphs, hypergraph Ramsey bounds under bounded VC-dimension, induced-free and viral formulations, tournaments, NIP and semi-algebraic graphs, Boolean combinations of relations of bounded VC-dimension, graphs whose adjacency matrices have bounded rank, graphs of bounded sign-rank, and graphs defined by dot-product threshold representations.

math.CO

Proofs of Two Conjectures of Alon on Subgraph Counts

All graphs considered are finite with no isolated vertices. Let $N(m,H)$ be the maximum number of subgraphs of a graph $G$ isomorphic to $H$, taken over all graphs $G$ with $m$ edges. Alon proved that $N(m,H)=\Theta_H(m^{\gamma(H)})$, where $\gamma(H)=(|V(H)|+D(H))/2$ and $D(H)=\max_{S\subseteq V(H)}(|S|-|N_H(S)|)$, and conjectured [Conjecture 1, Isr. J. Math., 1986] that limit of $N(m,H)/m^{\gamma(H)}$ exists as $m\to\infty$. We prove this conjecture and identify the limit as $\lambda(H)=\Lambda(H)/|\operatorname{Aut}(H)|$, where $\Lambda(H)$ is characterized by a variational problem over finite cores. We also resolve another conjecture of Alon [Conjecture 2, Isr. J. Math., 1986], which stated that if $H$ is a disjoint union of stars, then for every $m$ an extremal graph attaining $N(m,H)$ may be chosen to be a disjoint union of stars.

math.CO

Tight Bound for Nikiforov's Spectral Even-Cycle Conjecture

Nikiforov conjectured that, for every fixed $k\ge2$ and all sufficiently large $n$, the unique $n$-vertex $C_{2k+2}$-free graph with maximum adjacency spectral radius is $S^+_{n,k}$, where $S_{n,k}=K_k\vee\overline K_{n-k}$ and $S^+_{n,k}$ is obtained from $S_{n,k}$ by adding one edge inside the independent part. Cioab\u{a}, Desai and Tait proved this conjecture for $n\ge k^{O(k)}$. Later, Li and Ning raised the problem of determining the optimal exponent $\gamma=\gamma(k)$ such that the same conclusion holds for $n\ge \Omega(k^{\gamma(k)})$. We prove a stronger uniform theorem for Nikiforov's matrices $A_\alpha(G)=\alpha D(G)+(1-\alpha)A(G)$. More precisely, for every $\epsilon>0$ there are constants $C_\epsilon$ and $k_\epsilon$ such that for all $0\le\alpha\le1-\epsilon$, $k\ge k_\epsilon$ and $n\ge C_\epsilon k$, every $n$-vertex $C_{2k+2}$-free graph $G$ satisfies $\rho_\alpha(G)\le\rho_\alpha(S^+_{n,k})$, with equality if and only if $G\cong S^+_{n,k}$. In particular, the case $\alpha=0$ answers the problem of Li and Ning, and the $A_\alpha$-spectral even-cycle threshold is linear in $k$, uniformly for all $\alpha$ bounded away from $1$. Our proof introduces a weighted rooted Erd\H{o}s--Gallai type path lemma, which may be of independent interest in Perron-vector methods for spectral extremal graph problems. The same method also yields asymptotically tight $A_\alpha$-spectral bounds for two local forbidden-subgraph families, namely $(K_1\vee P_\ell)$-free graphs and $F_s$-free graphs, where $F_s$ denotes the friendship graph.

math.CO

Local Tur\'an inequalities for walks and the spectral radius

Nikiforov's well-known spectral Tur\'an inequality for walks states that, for every graph $G$ with clique number $\omega(G)$, $\lambda^r(G)\le w_r(G)(1-1/\omega(G))$, where $\lambda(G)$ is the largest eigenvalue of the adjacency matrix of $G$, and $w_r(G)$ is the number of walks with $r$ vertices in $G$. For $r=1$, this is Wilf's inequality; for $r=2$, it gives Nikiforov's spectral Tur\'an theorem. Recently, Liu and Ning proved local versions of these two inequalities, strengthening both Wilf's inequality and Nikiforov's spectral Tur\'an theorem. It is natural to ask whether Nikiforov's spectral Tur\'an inequality for walks also admits a local strengthening. Motivated by this question, Kannan, Kumar, and Pragada conjectured the vertex-local bound $\lambda^r(G)\le \sum_{v\in V(G)} w_r(v)(1-1/c_G(v))$, where $w_r(v)$ denotes the number of walks with $r$ vertices starting at $v$, and $c_G(v)$ is the maximum order of a clique containing $v$. This conjecture is important because it gives the most natural local form of Nikiforov's spectral Tur\'an inequality for walks. In this paper, we confirm this conjecture. More precisely, for $r\ge 2$, we prove the stronger edge-local inequality $$\lambda^r(G) \le \sum_{uv\in E(G)} \frac{c_G(uv)-1}{c_G(uv)} \bigl(w_{r-1}(u)+w_{r-1}(v)\bigr),$$ where $c_G(uv)$ is the maximum order of a clique containing the edge $uv$. Our result implies Nikiforov's spectral Tur\'an inequality for walks and unifies several local spectral extremal results of Liu and Ning. We also determine all extremal graphs for both the edge-local and vertex-local inequalities. The main new ingredient is a Markov-chain estimate whose transition matrix is constructed from a Perron vector of $A(G)$; this estimate carries the local edge coefficient through walks of arbitrary length.

math.CO

ClawGym: A Scalable Framework for Building Effective Claw Agents

Claw-style environments support multi-step workflows over local files, tools, and persistent workspace states. However, scalable development around these environments remains constrained by the absence of a systematic framework, especially one for synthesizing verifiable training data and integrating it with agent training and diagnostic evaluation. To address this challenge, we present ClawGym, a scalable framework that supports the full lifecycle of Claw-style personal agent development. Concretely, we construct ClawGym-SynData, a diverse dataset of 13.5K filtered tasks synthesized from persona-driven intents and skill-grounded operations, paired with realistic mock workspaces and hybrid verification mechanisms. We then train a family of capable Claw-style models, termed ClawGym-Agents, through supervised fine-tuning on black-box rollout trajectories, and further explore reinforcement learning via a lightweight pipeline that parallelizes rollouts across per-task sandboxes. To support reliable evaluation, we further construct ClawGym-Bench, a benchmark of 200 instances calibrated through automated filtering and human-LLM review. Relevant resources have been released at https://github.com/ClawGym.

cs.CL

On the structures of {diamond, bowtie}-free graphs that do not contain an induced subdivision of $K_4$

A graph is $\mathrm{ISK}_4$-free if it contains no induced subdivision of $K_4$. L\'ev\^eque et al. [\emph{J. Combin. Theory Ser. B} \textbf{102} (2012) 924--947] conjectured that all $\mathrm{ISK}_4$-free graphs are 4-colorable. Chen et al. [\emph{J. Graph Theory} \textbf{96} (2021) 554--577] proved that $\{\mathrm{ISK}_4, \mathrm{diamond}, \mathrm{bowtie}\}$-free graphs are 4-colorable and asked whether such graphs are 3-colorable, where a diamond is $K_4$ minus one edge and a bowtie consists of two triangles sharing a vertex. In this paper, we characterize the structures of $\{\mathrm{ISK}_4, \mathrm{diamond}, \mathrm{bowtie}\}$-free graphs and prove that such graphs are 3-colorable, which answers a question of Chen et al. [\emph{J. Graph Theory} \textbf{96} (2021) 554--577] affirmatively and extends a result of Chudnovsky et al. [\emph{J. Graph Theory} \textbf{92} (2019) 67--95]. Furthermore, our structural theorem yields a polynomial-time algorithm for decomposing $\{\mathrm{ISK}_4, \mathrm{diamond}, \mathrm{bowtie}\}$-free graphs, and consequently a polynomial-time algorithm for coloring this class of graphs.

math.CO

On the Borodin--Kostochka conjecture for graphs with large maximum degree

The Borodin--Kostochka conjecture states that every graph $G$ with maximum degree $\Delta(G)\ge 9$ satisfies $\chi(G)\le \max\{\omega(G),\Delta(G)-1\}$. In this paper, we verify this conjecture for graphs with sufficiently large maximum degree. More precisely, we prove that every graph $G$ with maximum degree $\Delta \ge 5.3\times 10^6$ and clique number $\omega(G)<\Delta$ satisfies $\chi(G)\le \Delta-1$. This improves a longstanding result of Reed.

math.CO

FireRed-Image-Edit-1.0 Technical Report

We present FireRed-Image-Edit, a diffusion transformer for instruction-based image editing that achieves state-of-the-art performance through systematic optimization of data curation, training methodology, and evaluation design. We construct a 1.6B-sample training corpus, comprising 900M text-to-image and 700M image editing pairs from diverse sources. After rigorous cleaning, stratification, auto-labeling, and two-stage filtering, we retain over 100M high-quality samples balanced between generation and editing, ensuring strong semantic coverage and instruction alignment. Our multi-stage training pipeline progressively builds editing capability via pre-training, supervised fine-tuning, and reinforcement learning. To improve data efficiency, we introduce a Multi-Condition Aware Bucket Sampler for variable-resolution batching and Stochastic Instruction Alignment with dynamic prompt re-indexing. To stabilize optimization and enhance controllability, we propose Asymmetric Gradient Optimization for DPO, DiffusionNFT with layout-aware OCR rewards for text editing, and a differentiable Consistency Loss for identity preservation. We further establish REDEdit-Bench, a comprehensive benchmark spanning 15 editing categories, including newly introduced beautification and low-level enhancement tasks. Extensive experiments on REDEdit-Bench and public benchmarks (ImgEdit and GEdit) demonstrate competitive or superior performance against both open-source and proprietary systems. To support future research, our code, models, and benchmark suite are publicly available at https://github.com/FireRedTeam/FireRed-Image-Edit/ .

cs.CV