arXiv Science⌕ Search

arXiv subjects

Yandong Bai

Publications and source records attributed to Yandong Bai.

At least 19 recordsLinked to original sources

R2QRec: Learning Recommendation Queries from Retrieval Feedback

Query-based recommendation separates expressing user needs from locating matching items. Its central learning problem is how to turn item interactions into effective retrieval requests when interaction logs do not annotate queries. We present R2QRec, which uses a fixed retrieval system to construct query supervision and evaluate recommendation outcomes. Retrieval verification first selects generated expressions that recover observed items as supervised fine tuning targets, allowing retrieval behavior to determine the target wording. Policy refinement then evaluates generated query sets by the observed item's rank in their fused recommendation list. Log-rank feedback distinguishes outcomes beyond the recommendation cutoff, while a KL penalty constrains policy change relative to the supervised reference. The stages have distinct roles: verification identifies expressions to imitate, and policy refinement improves the combined ranking produced by newly generated queries. Only the query generator is trained; the retriever and item index remain fixed, and no query annotations or learned reward model are required. Across three public datasets, R2QRec achieves state-of-the-art overall recommendation performance among the evaluated methods. Extensive experiments demonstrate the effectiveness of the proposed design and its generalization across generators and domains.

cs.IR↗

HeadEdit: Calibrating Language Model Behavior Through the Frozen Unembedding Matrix

Alignment does not eliminate behavioral errors in language models. Models may still refuse benign requests, call unnecessary tools, or yield to false user claims. Current methods mitigate such errors as a computation problem, and rarely explore if the desired behavior is already encoded in the model's representation. Motivated by the observation that behavior-relevant information remains linearly decodable from the final hidden state even when the resulting logits produce the undesired behavior, we introduce HeadEdit, a gradient-free method that calibrates model behavior through the unembedding matrix. HeadEdit extracts a low-rank behavioral subspace from paired completions and uses each prompt's coordinates within it to generate a vocabulary-wide correction, thereby implementing implicitly adaptive steering without manually specified target tokens or parameter updates. HeadEdit improves all nine experimental settings across three tasks and three model families, with negligible inference overhead and no systematic loss of general capabilities. It also reveals a connection to gradient-based alignment. HeadEdit's low-dimensional representation partly predicts how preference tuning changes output logits on unseen prompts. The subspace learned from the model can also be reused after tuning, improving performance without re-extracting or retuning. These results show that HeadEdit provides a practical, lightweight, and interpretable way to calibrate model behavior through the unembedding matrix.

cs.CL↗

Look Before You Select: Rethinking Vocabulary Sparsification in On-Policy Distillation

On-policy distillation (OPD) uses teacher correction on student-generated responses. Full-vocabulary correction can provide important corrections even for tokens that the student assigns low probability, but backpropagating through all token logits becomes memory-intensive for long sequences. Existing memory-saving approaches estimate corrections from sampled tokens or restrict supervision to the student's TopK tokens, introducing sampling noise or changing the full-vocabulary correction. We introduce \textbf{SparseOPD}, which uses full-vocabulary teacher correction to determine which corrections matter before selecting the token logits to differentiate. SparseOPD first constructs the full-vocabulary correction without retaining its backward graph, then selects tokens by correction magnitude rather than student probability. Signed residual compensation preserves the total promoting and suppressing correction mass, while correction-aware budget allocation distributes the sparse support across positions. Finally, the update backpropagates only through the selected token logits. Across six task--scale settings spanning mathematics, chemistry QA, and multimodal reasoning, SparseOPD outperforms Sampled Token and TopK in task-average accuracy and matches or exceeds Full Vocabulary. Gradient cosine similarity reaches 99\% on 4B mathematics, while 8K full-parameter profiling shows 70.5\% lower backward memory.

cs.CL↗

Towards a strengthening of the second neighborhood conjecture

A longstanding conjecture of Seymour, called Seymour's second neighborhood conjecture, states that every oriented graph $D$ contains a vertex $x$ with $|N^{++}_D(x)|\geq |N^{+}_D(x)|$. The conjecture was verified in a few special classes of oriented graphs, and it remains open for general oriented graphs. We study a stronger property, asking for a vertex $x$ such that there exists a complete matching from $N^+_D(x)$ to $N^{++}_D(x)$. We prove that this stronger version holds for every oriented graph with minimum out-degree at most $5$, and also for every $5$-anti-transitive oriented graph. This implies that every oriented planar graph satisfies the stronger version.

math.CO↗

Cycle lengths in graphs of given minimum degree

We prove that if $G$ is a 2-connected graph with minimum degree at least $k\geqslant 4$, then (1) $G$ contains $k$ cycles whose lengths form an arithmetic progression with common difference one or two, unless $G\cong K_{k+1}$ or $K_{k,n-k}$; (2) $G$ contains cycles of lengths $\ell$ modulo $k$ for all even $\ell$, unless $G\cong K_{k+1}$ or $K_{k,n-k}$; (3) $G$ contains cycles of lengths $\ell$ modulo $k$ for all $\ell$, unless $G\cong K_{k+1}$ or $G$ is bipartite. In addition, we show that if $k$ is even and $G$ is 2-connected with minimum degree at least $k-1$ and order at least $k+2$, then $G$ contains cycles of lengths $\ell$ modulo $k$ for all even $\ell$. As a corollary, we determine the maximum number of edges in a graph that does not contain a cycle of length divisible by $k$ for all odd $k$.

math.CO↗

Typical intersecting families are trivial

We study the counting problem for non-uniform intersecting families in extremal set theory. Let $J(n,k)$ denote the number of intersecting families $\mathcal{F}\subset 2^{[n]}$ such that every member of $\mathcal{F}$ has size at most $k$. Extending recent counting results for uniform intersecting families, we prove that for $n\ge 2k+2+2\sqrt{k \log k}$ and $k \rightarrow +\infty$, \[ J(n,k) =(n+o(1)) 2^{\sum_{i=1}^{k} \binom{n-1}{i-1}}. \] This result reveals that typical non-uniform intersecting families of bounded size are trivial, i.e., almost all such families share a common fixed element.

math.CO↗

On 2-connected graphs without cycles of length 1 modulo 3

Burr and Erdős conjectured in 1976 that for all integers $k>\ell\geq 0$ such that $k\mathbb{Z}+\ell$ contains an even integer, every $n$-vertex graph without cycles of length $\ell$ modulo $k$ has at most a linear number of edges in $n$. Bollobás confirmed the conjecture in 1977, and Erdős further asked for the exact extremal number. To the best of our knowledge, this problem has been solved only for all residues when $k\leq 4$, and for $\ell\in \{0,2\}$ when $k\geq 5$ is odd. In particular, Bai {\it et al.} [arXiv:2503.03504] proved that if $G$ is an $n$-vertex graph with no cycles of length $1$ modulo $3$, then $e(G)\le \frac{5}{3}(n-1)$, and when $9\mid (n-1)$ the equality holds if and only if each block of $G$ is isomorphic to the Petersen graph. Note that for $n> 18$ every extremal graph contains a cut-vertex. In this paper, we investigate the 2-connected setting and determine the maximum number of edges in a 2-connected graph with no cycles of length $1$ modulo $3$. Our results provide a sharp extremal bound and a complete characterization of the extremal graphs, revealing structural differences from the general case. Combining this with the result of Bai {\it et al.}, we also obtain a complete characterization of all extremal graphs in the general setting, including the cases where $9\nmid (n-1)$. Finally, we determine the maximum number of edges in a $2$-connected graph with no cycles of length $2$ modulo $4$, whose extremal graphs differ substantially from those in the general setting. Consequently, the extremal numbers for $2$-connected graphs with no cycle of a fixed length modulo $k$ are now determined for all $k\leq 4$.

math.CO↗

Cross-intersecting families with covering number constraints

Two families $\mathcal{F}$ and $\mathcal{G}$ are cross-intersecting if every set in $\mathcal{F}$ intersects every set in $\mathcal{G}$. The covering number $τ(\mathcal{F})$ of a family $\mathcal{F}$ is the minimum size of a set that intersects every member of $\mathcal{F}$. In 1992, Frankl and Tokushige determined the maximum of $|\mathcal{F}| + |\mathcal{G}|$ for cross-intersecting families $\mathcal{F} \subset \binom{[n]}{a}$ and $\mathcal{G} \subset \binom{[n]}{b}$ that are non-empty (covering number at least 1) and also characterized the extremal configurations. This seminar result was recently extended by Frankl (2024) and Frankl and Wang (2025) to cases where both families are non-trivial (covering number at least 2), and where one is non-empty and the other non-trivial, respectively. In this paper, we establish a unified stability hierarchy for cross-intersecting families under general covering number constraints. We determine the maximum of $|\mathcal{F}| + |\mathcal{G}|$ for cross-intersecting families $\mathcal{F} \subset \binom{[n]}{a}$ and $\mathcal{G} \subset \binom{[n]}{b}$ with the following covering number constraints: (1) $τ(\mathcal{F}) \geq s$ and $τ(\mathcal{G}) \geq t$; (2) $τ(\mathcal{F}) = s$ and $τ(\mathcal{G}) \geq t \geq 2$; (3) $τ(\mathcal{F}) \geq s$ and $τ(\mathcal{G}) = t$; (4) $τ(\mathcal{F}) = s$ and $τ(\mathcal{G}) = t$; provided $a \geq b + t - 1$ and $n \geq \max\{a + b, bt\}$. The corresponding extremal families achieving the upper bounds are also characterized.

math.CO↗

Who You Are Matters: Bridging Topics and Social Roles via LLM-Enhanced Logical Recommendation

Recommender systems filter contents/items valuable to users by inferring preferences from user features and historical behaviors. Mainstream approaches follow the learning-to-rank paradigm, which focus on discovering and modeling item topics (e.g., categories), and capturing user preferences on these topics based on historical interactions. However, this paradigm often neglects the modeling of user characteristics and their social roles, which are logical confounders influencing the correlated interest and user preference transition. To bridge this gap, we introduce the user role identification task and the behavioral logic modeling task that aim to explicitly model user roles and learn the logical relations between item topics and user social roles. We show that it is possible to explicitly solve these tasks through an efficient integration framework of Large Language Model (LLM) and recommendation systems, for which we propose TagCF. On the one hand, TagCF exploits the (Multi-modal) LLM's world knowledge and logic inference ability to extract realistic tag-based virtual logic graphs that reveal dynamic and expressive knowledge of users, refining our understanding of user behaviors. On the other hand, TagCF presents empirically effective integration modules that take advantage of the extracted tag-logic information, augmenting the recommendation performance. We conduct both online experiments and offline experiments with industrial and public datasets as verification of TagCF's effectiveness, and we empirically show that the user role modeling strategy is potentially a better choice than the modeling of item topics. Additionally, we provide evidence that the extracted logic graphs are empirically a general and transferable knowledge that can benefit a wide range of recommendation tasks. Our code is available in https://github.com/Code2Q/TagCF.

cs.IR↗

On graphs without cycles of length 1 modulo 3

Burr and Erdős conjectured in 1976 that for every two integers $k>\ell\geqslant 0$ satisfying that $k\mathbb{Z}+\ell$ contains an even integer, an $n$-vertex graph containing no cycles of length $\ell$ modulo $k$ can contain at most a linear number of edges on $n$. Bollobás confirmed this conjecture in 1977 and then Erdős proposed the problem of determining the exact value of the maximum number of edges in such a graph. For the above $k$ and $\ell$, define $c_{\ell,k}$ to be the least constant such that every $n$-vertex graph with at least $c_{\ell,k}\cdot n$ edges contains a cycle of length $\ell$ modulo $k$. The precise (or asymptotic) values of $c_{\ell,k}$ are known for very few pairs $\ell$ and $k$. In this paper, we precisely determine the maximum number of edges in a graph containing no cycles of length 1 modulo 3. In particular, we show that every $n$-vertex graph with at least $\frac{5}{3}(n-1)$ edges contains a cycle of length 1 modulo 3, unless $9|(n-1)$ and each block of the graph is a Petersen graph. As a corollary, we obtain that $c_{1,3}=\frac{5}{3}$. This is the last remaining class modulo $k$ for $1\leqslant k\leqslant 4$.

math.CO↗

Vertex-disjoint cycles of different lengths in tournaments

Bermond and Thomassen conjectured in 1981 that every digraph with minimum outdegree at least $2k-1$ contains $k$ vertex-disjoint cycles,here $k$ is a positive integer. Lichiardopol conjectured in 2014 that for every positive integer $k$ there exists an integer $g(k)$ such that every digraph with minimum outdegree at least $g(k)$ contains $k$ vertex-disjoint cycles of different lengths. Recently, Chen and Chang proved in [J. Graph Theory 105 (2) (2024) 297-314] that for $k\geqslant 3$ every tournament with minimum outdegree at least $2k-1$ contains $k$ vertex-disjoint cycles in which two of them have different lengths. Motivated by the above two conjectures and related results, we investigate vertex-disjoint cycles of different lengths in tournaments, and show that when $k\geqslant 5$ every tournament with minimum outdegree at least $2k-1$ contains $k$ vertex-disjoint cycles in which three of them have different lengths. In addition, we show that every tournament with minimum outdegree at least $6$ contains three vertex-disjoint cycles of different lengths and the minimum outdegree condition is sharp. This answers a question proposed by Chen and Chang.

math.CO↗

Characterizing and recognizing exact-distance squares of graphs

For a graph $G=(V,E)$, its exact-distance square, $G^{[\sharp 2]}$, is the graph with vertex set $V$ and with an edge between vertices $x$ and $y$ if and only if $x$ and $y$ have distance (exactly) $2$ in $G$. The graph $G$ is an exact-distance square root of $G^{[\sharp 2]}$. We give a characterization of graphs having an exact-distance square root, our characterization easily leading to a polynomial-time recognition algorithm. We show that it is NP-complete to recognize graphs with a bipartite exact-distance square root. These two results strongly contrast known results on (usual) graph squares. We then characterize graphs having a tree as an exact-distance square root, and from this obtain a polynomial-time recognition algorithm for these graphs. Finally, we show that, unlike for usual square roots, a graph might have (arbitrarily many) non-isomorphic exact-distance square roots which are trees.

math.CO↗

Rainbow triangles in arc-colored tournaments

Let $T_{n}$ be an arc-colored tournament of order $n$. The maximum monochromatic indegree $Δ^{-mon}(T_{n})$ (resp. outdegree $Δ^{+mon}(T_{n})$) of $T_{n}$ is the maximum number of in-arcs (resp. out-arcs) of a same color incident to a vertex of $T_{n}$. The irregularity $i(T_{n})$ of $T_{n}$ is the maximum difference between the indegree and outdegree of a vertex of $T_{n}$. A subdigraph $H$ of an arc-colored digraph $D$ is called rainbow if each pair of arcs in $H$ have distinct colors. In this paper, we show that each vertex $v$ in an arc-colored tournament $T_{n}$ with $Δ^{-mon}(T_n)\leqΔ^{+mon}(T_n)$ is contained in at least $\frac{δ(v)(n-δ(v)-i(T_n))}{2}-[Δ^{-mon}(T_{n})(n-1)+Δ^{+mon}(T_{n})d^+(v)]$ rainbow triangles, where $δ(v)=\min\{d^+(v), d^-(v)\}$. We also give some maximum monochromatic degree conditions for $T_{n}$ to contain rainbow triangles, and to contain rainbow triangles passing through a given vertex. Finally, we present some examples showing that some of the conditions in our results are best possible. Keywords: arc-colored tournament, rainbow triangle, maximum monochromatic indegree (outdegree), irregularity

math.CO↗

Safe sets in digraphs

A non-empty subset $S$ of the vertices of a digraph $D$ is called a {\it safe set} if \begin{itemize} \item[(i)] for every strongly connected component $M$ of $D-S$, there exists a strongly connected component $N$ of $D[S]$ such that there exists an arc from $M$ to $N$; and \item[(ii)] for every strongly connected component $M$ of $D-S$ and every strongly connected component $N$ of $D[S]$, we have $|M|\leq |N|$ whenever there exists an arc from $M$ to $N$. \end{itemize} In the case of acyclic digraphs a set $X$ of vertices is a safe set precisely when $X$ is an {\it in-dominating set}, that is, every vertex not in $X$ has at least one arc to $X$. We prove that, even for acyclic digraphs which are traceable (have a hamiltonian path) it is NP-hard to find a minimum cardinality in-dominating set. Then we show that the problem is also NP-hard for tournaments and give, for every positive constant $c$, a polynomial algorithm for finding a minimum cardinality safe set in a tournament on $n$ vertices in which no strong component has size more than $c\log{}(n)$. Under the so called Exponential Time Hypothesis (ETH) this is close to best possible in the following sense: If ETH holds, then, for every $ε>0$ there is no polynomial time algorithm for finding a minimum cardinality safe set for the class of tournaments in which the largest strong component has size at most $\log^{1+ε}(n)$. We also discuss bounds on the cardinality of safe sets in tournaments.

cs.CC↗

Uniform sets in a family with restricted intersections

Let $\mathcal{F}$ be a family of subsets of $[n]=\{1,\ldots,n\}$ and let $L$ be a set of nonnegative integers. The family $\mathcal{F}$ is \emph{$L$-intersecting} if $|F\cap F'|\in L$ for every two distinct members $F,F'\in\mathcal{F}$; and $\mathcal{F}$ is $k$-uniform if all its members have the same size $k$. A large variety of problems and results in extremal set theory concern on $k$-uniform $L$-intersecting families. Many attentions are paid to finding the maximum size of a family among all $k$-uniform $L$-intersecting families with prescribed $n,k$ and $L$. In this paper, from another point of view, we propose and investigate the problem of estimating the maximum size of a member in a family among all uniform $L$-intersecting families with size $m$, here $n,m$ and $L$ are prescribed. Our results aim to find out more precise relations of $n,m,k$ and $L$.

math.CO↗

A note on hypergraph colorings

Let $t\geqslant 2$ and $s\geqslant 1$ be two integers. Define a $(t,s)$-coloring of a hypergraph to be a coloring of its vertices using $t$ colors such that each color appears on each edge at least $s$ times. In this note, we provide a sufficient condition for the existence of a $(t,s)$-coloring of a hypergraph by using the symmetric lopsided version of Lovász Local Lemma. Our result generalizes several known results on hypergraph colorings.

math.CO↗

Connected $k$-factors in bipartite graphs

Let $k,l$ be two positive integers. An $S_{k,l}$ is a graph obtained from disjoint $K_{1,k}$ and $K_{1,l}$ by adding an edge between the $k$-degree vertex in $K_{1,k}$ and the $l$-degree vertex in $K_{1,l}$. An {\em $S_{k,l}$-free} graph is a graph containing no induced subgraph isomorphic to $S_{k,l}$. In this note, we show that, for any positive integers $k,l$ with $2\leqslant k\leqslant l$, there exists a constant $c=c(k,l)$ such that every connected balanced $S_{k,l}$-free bipartite graph with minimum degree at least $c$ contains a connected $k$-factor.

math.CO↗

On the number of vertex-disjoint cycles in digraphs

Let $k$ be a positive integer. Bermond and Thomassen conjectured in 1981 that every digraph with minimum outdegree at least $2k-1$ contains $k$ vertex-disjoint cycles. It is famous as one of the one hundred unsolved problems selected in [Bondy, Murty, Graph Theory, Springer-Verlag London, 2008]. Lichiardopol, Por and Sereni proved in [SIAM J. Discrete Math. 23 (2) (2009) 979-992] that the above conjecture holds for $k=3$. Let $g$ be the girth, i.e., the length of the shortest cycle, of a given digraph. Bang-Jensen, Bessy and Thomassé conjectured in [J. Graph Theory 75 (3) (2014) 284-302] that every digraph with girth $g$ and minimum outdegree at least $\frac{g}{g-1}k$ contains $k$ vertex-disjoint cycles. Thomassé conjectured around 2005 that every oriented graph (a digraph without 2-cycles) with girth $g$ and minimum outdegree at least $h$ contains a path of length $h(g-1)$, where $h$ is a positive integer. In this note, we first present a new shorter proof of the Bermond-Thomassen conjecture for the case of $k=3$, and then we disprove the conjecture proposed by Bang-Jensen, Bessy and Thomassé. Finally, we disprove the even girth case of the conjecture proposed by Thomassé.

math.CO↗