betaFeedback

WorksComputer Science

f-Divergence Self-Play for Tabular Anomaly Detection via Large Language Models

Abstract

Anomaly detection in tabular data poses significant challenges due to heterogeneous feature types-mixing numerical, categorical, and textual attributes, which complicate learning meaningful representations of normality. Recent work has applied large language models (LLMs) to this problem by serializing table rows as text sequences, yet these approaches rely on one-shot supervised fine-tuning that offers limited signal to tighten the model's description of normality. We propose DiSPaT, a self-play fine-tuning framework that strengthens the model's understanding of normal data. Building on the theoretical foundation of f-divergence minimization, we derive a tight approximation connecting our training objective to reducing the distributional gap between real normal data and model-generated samples. DiSPaT operates through an alternating optimization: at each iteration, the current policy generates synthetic samples that serve as pseudo-anomalies, while a critic discriminator learns to distinguish these from real normal samples; this signal drives policy updates that progressively align the model distribution with the true normal-data distribution. Extensive experiments on diverse benchmarks demonstrate that DiSPaT consistently outperforms prior LLM-based methods, deep learning approaches, and classical unsupervised detectors for tabular anomaly detection.

Introduction

Anomaly detection (AD) aims to identify rare or abnormal instances that deviate from an underlying notion of ”normality” [12, 3]. This problem is central in high-stakes applications where anomalies may indicate fraudulent transactions, cybersecurity intrusions, safety issues, clinical outliers, or abnormal events in surveillance video [26, 2, 9, 14] (Vu et al. 2019). In practice, data in these domains are often tabular and heterogeneous: each record may mix numerical measurements, categorical attributes, and increasingly, free-form text with missing values and non-trivial cross-field dependencies. These characteristics make unsupervised detection difficult, as standard tabular AD pipelines typically assume fully structured features and either handle text only crudely or rely on heavy feature engineering that can remove useful semantics and miss complex interactions. Large language models (LLMs) have recently become an attractive foundation for mixed-type tabular AD because they can operate on a serialized representation of each row and naturally exploit the semantics of categorical values and raw text [7, 8] (Hegselmann et al. 2023). Viewed as a serialized sequence, each row can be processed by an LLM in a unified way, allowing the model to exploit the semantics of categorical values and raw text with minimal preprocessing. However, applying LLMs to unsupervised tabular AD is non-trivial. Concretely, the serialization should respect basic tabular invariances (e.g., column order), numerical fields require representations that are robust to tokenizer-induced distortions, and likelihood-based scores should be calibrated to avoid systematic bias from variable-length text.

A foundational early work that first demonstrated the practicality of applying LLMs to tabular anomaly detection is AnoLLM Tsai et al. [41]. AnoLLM serializes each row into a text template, discretizes numerical values into bins, and fine-tunes a LLM on normal data via next-token prediction. At inference time, it scores anomalies using negative log-likelihood, together with procedures to better handle mixed-type tables. Despite this progress, AnoLLM can be viewed as a one-shot SFT-style adaptation of a gener-

Proceedings of the 43rd International Conference on Machine Learning, Seoul, South Korea. PMLR 306, 2026. Copyright 2026 by the author(s). ative model to normal data, leaving a meaningful gap for unsupervised anomaly detection. Maximizing likelihood on normal training data provides only a weak signal for tightening the boundary of normality: once model fits the dominant regularities of the training corpus, further gains in separating subtle, near-normal anomalies are often limited and performance can plateau. These limitations motivate an iterative refinement mechanism that more directly reduces the mismatch between model-induced distribution and the true normal-data distribution, while remaining compatible with likelihood-based detection.

Self-play provides a principled route to such iterative refinement. Recent advances such as SPIN (Chen et al., [4] improve an SFT-initialized model by repeatedly contrasting real data with the model’s own generations: at each iteration, the current model produces synthetic samples, and the next update is driven by a discriminator-like objective that favors genuine data over model-generated counterparts, providing a learning signal without additional annotations. In unsupervised tabular AD, this provides an iterative refinement signal: a critic distinguishes real normal samples from model-generated ones, and the policy is updated so that future generations better match the normal-data distribution. Unlike SPIN, which optimizes a single fixed IPM-like divergence, we extend this idea to a broader family of ff-divergences. Different divergences induce different distribution-matching behavior—for example, KL is more mode-covering, whereas reverse KL is more mode-seeking—which is useful in anomaly detection because the geometry of the normal data manifold can vary substantially across domains. Repeating this loop can improve the quality and calibration of likelihood-based anomaly scores without requiring anomaly labels.

In this paper, we introduce DiSPaT, a Divergence-driven Self-Play framework for unsupervised Tabular anomaly detection with LLMs. DiSPaT treats each mixed-type row as a serialized token sequence and iteratively refines the model’s understanding of normality through an adversarial self-play game. Formally, we optimize the LLM to minimize the ff-divergence between the empirical distribution of normal data and the model-induced distribution. Conceptually, this is achieved via an alternating optimization loop: in the critic step, a critic contrasts real normal sequences with samples from the current policy; in the policy step, the LLM is updated using this contrastive signal so that its induced distribution moves closer to the normal-data distribution. In the final implementable objective, the critic is absorbed into an implicit log-ratio parameterization, yielding a single optimization step per iteration. Through this iterative process, the model progressively aligns its induced distribution with the true normal-data distribution. Finally, anomalies are identified based on the likelihood scores of the refined model. Our contributions are summarized as follows:

  • We propose a principled theoretical framework for unsupervised tabular anomaly detection via LLMs by reformulating the training objective as minimizing ff-divergence between normal data distribution and model’s generations. This formulation transcends the limitations of one-shot SFT, providing a mechanism that explicitly targets the distributional mismatch between model and true data manifold.

  • We introduce DiSPaT, a practical algorithm that implements this framework via a self-play loop with an implicit critic. It preserves the critic–policy interpretation while reducing each iteration to a single tractable optimization step, enabling the model to capture complex tabular dependencies without anomalous supervision.

  • Extensive evaluations on mixed-type benchmarks demonstrate that the proposed approach outperforms state-of-the-art baselines, including recent LLM-based and specialized deep anomaly detectors. Furthermore, detailed ablation studies on iteration depth and divergence choices validate the efficacy of the self-play mechanism.

Background

Problem Formulation

We study uncontaminated, unsupervised anomaly detection on tabular data. Let X∈Rn×dX \in\mathbb{R}^{n \times d} denote a training data matrix consisting solely of normal samples, where each row xi∈X\mathbf{x}_i \in\mathcal{X} for i∈{1,…,n}i \in\{1,\ldots,n\} is a sample with dd features, and xi,jx_{i,j} for j∈{1,…,d}j \in\{1,\ldots,d\} represents attributes of different types. The objective is to train an anomaly detector f:X→Rf:\mathcal{X}\to\mathbb{R} using only X\mathcal{X}. The detector assigns an anomaly score to each input, where higher values indicate a greater likelihood of being an anomaly. At evaluation time, a labeled test set D′={(xm′,ym′)}m=1MD' = \{(\mathbf{x}'_m,y'_m)\}_{m=1}^{M} with ym′∈{0,1}y'_m \in\{0,1\} is provided, and compute f(xm′)f(\mathbf{x}'_m) for each test sample. A threshold can be employed to classify whether a sample is an anomaly based on these scores.

In LLM-based anomaly detection frameworks like AnoLLM [41], each tabular row xi\mathbf{x}_i is represented as a serialized token sequence. Specifically, each feature xi,jx_{i,j} is transformed into a natural language phrase “cjc_j is E(xi,j)(x_{i,j}),” where cjc_j is column name and E(⋅)(\cdot) is an encoder for pre-processing values. After handling missing values and column names, a permutation π\pi is dynamically sampled from SdS_d during training, where SdS_d denotes the symmetric group on dd elements, i.e., the group of all permutations of the set {1,2,…,d}\{1,2,\ldots,d\} under composition1. The resulting

serialized sequence is defined as:

S(π,xi)=“cπ(1) is E(xi,π(1)),…,cπ(d) is E(xi,π(d))”S(\pi, x_i) = “c_{\pi(1)}\text{ is }E(x_i,\pi(1)), \ldots, c_{\pi(d)}\text{ is }E(x_i,\pi(d))”

The resulting set of serialized tabular strings is denoted as S={S(π,xi)∣π∈Sd,i∈{1,…,n}}S = \{S(\pi, x_i) \mid\pi\in S_d, i \in\{1, \ldots, n\}\}. For each string s∈Ss \in S, data is transformed into a token sequence (w0,w1,…,wl(s),wl(s)+1)(w_0, w_1, \ldots, w_{l(s)}, w_{l(s)+1}), where w0w_0 and wl(s)+1w_{l(s)+1} represent the beginning-of-sequence (BoS) and end-of-sequence (EoS) tokens, respectively. The fine-tuning process minimizes causal language modeling loss:

L(θ)=Es∈S[−∑k=1l(s)+1log⁡πθ(wk∣w0:k−1)](1)\mathcal{L}(\theta) = \mathbb{E}_{s \in S}\left[-\sum_{k=1}^{l(s)+1}\log\pi_\theta(w_k \mid w_{0:k-1})\right] \tag*{(1)}

where θ\theta represents the parameters of the model. Through this objective, LLM learns to predict subsequent column values based on previously observed features, leveraging its inherent semantic knowledge to capture the underlying structure of normal data. In the inference stage, anomaly score for a test sample x′x' is computed by averaging negative log-likelihood across rr different permutations:

fθ(x′)=−1r∑j=1r∑k=1l(S(πj,x′))+1log⁡πθ(wk(j)∣w0:k−1(j))(2)f_\theta(x') = -\frac{1}{r}\sum_{j=1}^{r}\sum_{k=1}^{l(S(\pi_j,x'))+1}\log\pi_\theta\left(w_k^{(j)} \mid w_{0:k-1}^{(j)}\right) \tag*{(2)}

where l(S(πj,x′))l(S(\pi_j, x')) denotes number of tokens used to encode tabular features under jj-th permutation. Here, π1,…,πr∼Sd\pi_1, \ldots, \pi_r \sim S_d denote distinct permutations of {1,2,…,d}\{1, 2, \ldots, d\}, applied consistently across all samples.

ff-Divergence

To quantify the discrepancy between two probability distributions, we utilize the family of statistical measures known as ff-divergences [5, 21]. Given two distributions PP and QQ possessing, respectively, absolutely continuous density functions pp and qq with respect to a base measure defined on the domain X\mathcal{X}, the ff-divergence is defined as:

Df(P∥Q)=∫Xq(x)f(p(x)q(x)) dx,(3)D_f(P\|Q) = \int_{\mathcal{X}} q(x)f\left(\frac{p(x)}{q(x)}\right)\,dx, \tag*{(3)}

where f:R+→Rf : \mathbb{R}^{+} \to\mathbb{R} is a convex, lower-semi continuous function satisfying f(1)=0f(1) = 0.

Self-Play Fine-Tuning

Self-Play Fine-Tuning (SPIN) [4, 46] (Le et al. 2026) is a framework designed to enhance language model performance by employing a two-player game mechanism. At iteration t+1t + 1, model from the previous iteration, πθt\pi_{\theta_t}, acts as the opponent to generate synthetic responses y′y' for a given input xx.

synthetic responses y′y' for a given input xx. Current model πθ\pi_\theta (the main player) is trained to distinguish these self-generated responses from ground-truth responses yy sampled from real data distribution Pd\mathbb{P}_d. The training objective maximizes the probabilistic gap between real and synthetic data distributions by minimizing the expected logistic loss ℓ(t)=log⁡(1+exp⁡(−t))\ell(t) = \log(1 + \exp(-t)):

LSPIN(θ)=E[ℓ(λlog⁡πθ(y∣x)πθt(y∣x)−λlog⁡πθ(y′∣x)πθt(y′∣x))](4)\mathcal{L}_{\mathrm{SPIN}}(\theta) = \mathbb{E}\left[\ell\left(\lambda\log\frac{\pi_\theta(y\mid x)}{\pi_{\theta_t}(y\mid x)}-\lambda\log\frac{\pi_\theta(y'\mid x)}{\pi_{\theta_t}(y'\mid x)}\right)\right] \tag*{(4)}

where the expectation is taken over x,y∼Pdx, y \sim\mathbb{P}_d and y′∼πθty' \sim\pi_{\theta_t}, and λ>0\lambda> 0 serves as a regularization parameter. Theoretically, the global optimum of this objective is attained if and only if the model’s policy πθ\pi_\theta fully aligns with the target distribution Pd\mathbb{P}_d, thereby facilitating iterative self-improvement without requiring additional human annotations.

Methodology

In LLM-based anomaly detection, AnoLLM [41] fine-tunes an LLM to maximize likelihood of serialized normal samples, learning a generative description of normality. However, this one-shot fine-tuning operates solely on normal instances without abnormal examples. Consequently, the learned decision boundary tends to be loose, lacking discriminative signal to tightly delineate normality. Prior work has shown that incorporating abnormal samples or limited label information during training yields a tighter description of normal data [36, 29, 6] (Le et al. 2010; Le et al. 2013). In settings where true anomalies are unavailable, we propose a self-play mechanism that synthetically generates pseudo-abnormal examples to address this limitation. Specifically, at each iteration, model-generated samples y′y' from earlier policies deviate from real normal continuations yy and therefore serve as pseudo-abnormal, or more precisely, not-normal, references. A critic contrasts these samples with real normal data, providing a discriminative signal that sharpens the model’s description of normality without requiring actual anomaly labels. As self-play progresses and y′y' moves closer to yy, the model is forced to make increasingly fine-grained distinctions near the normal data manifold, leading to a progressively tighter boundary of normality. Importantly, we do not assume that these synthetic samples approximate the unknown anomaly distribution. Their role is not to model anomalies, but to provide progressively harder not-normal references that tighten the normality boundary. This viewpoint is consistent with one-class learning: OCSVM [37] separates normal data from a single origin in feature space, even though that origin does not resemble any real anomaly. DiSPaT follows the same principle, but replaces a fixed origin with model-generated non-normal samples that evolve across iterations, yielding a richer signal for boundary refinement.

Let Pd\mathbb{P}_d denote the distribution over ground-truth normal sequences (x,y)(x,y), where xx is a context and y∼Pd(⋅∣x)y \sim\mathbb{P}_d(\cdot\mid x) is real continuation. Correspondingly, Pθ\mathbb{P}_\theta represents model-induced distribution with synthetic continuations y′∼πθ(⋅∣x)y' \sim\pi_\theta(\cdot\mid x). Our goal is to learn Pθ\mathbb{P}_\theta that closely aligns with Pd\mathbb{P}_d through iterative self-play. At each iteration, one can view a critic TT as distinguishing real sequences yy from model-generated sequences y′∼πθky' \sim\pi_{\theta_k}. The policy πθ\pi_\theta is then updated to maximize scores under this critic, thereby pushing y′y' toward yy and the distribution Pθ\mathbb{P}_\theta toward Pd\mathbb{P}_d. As we show below, this critic admits an implicit log-ratio parameterization, so the conceptual critic step and the policy step can be unified into a single optimization. This adversarial mechanism provides the discriminative learning signal absent in likelihood-only training, enabling the model to learn a tighter description of normality. This motivates our objective of minimizing the ff-divergence:

min⁡θDf(Pd,Pθ)(5)\min_\theta D_f(\mathbb{P}_d,\mathbb{P}_\theta) \tag*{(5)}

Minimizing this divergence aims to align the model’s synthetic data distribution with the true data distribution. In what follows, we present a theory to tightly approximate Df(Pd,Pθ)D_f(\mathbb{P}_d,\mathbb{P}_\theta) in Theorem 3.1.

Theorem 3.1. Given a lower semi-continuous convex function ff that is differentiable and strictly convex on the interior of its domain with Fenchel conjugate f∗f^*, and assuming Pd≪Pθ\mathbb{P}_d \ll\mathbb{P}_\theta with T∗T^* and f∗∘T∗f^* \circ T^* bounded on the support, then for any function family T\mathcal{T} we have the following inequalities:

(i)

Df(Pd,Pθ)≥max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y′))]}D_f(\mathbb{P}_d,\mathbb{P}_\theta) \ge\max_{T \in\mathcal{T}} \left\{ \mathbb{E}_{\mathbb{P}_d}[T(x,y)] - \mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y'))] \right\}

(ii)

Df(Pd,Pθ)≤max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y′))]}+d(T∗,T)D_f(\mathbb{P}_d,\mathbb{P}_\theta) \le\max_{T \in\mathcal{T}} \left\{ \mathbb{E}_{\mathbb{P}_d}[T(x,y)] - \mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y'))] \right\} + d(T^*,\mathcal{T})

where T∗(x,y)=∇f∗(pd(x,y)pθ(x,y))T^*(x,y) = \nabla f^*\left(\frac{p_d(x,y)}{p_\theta(x,y)}\right) and the distance d(T∗,T)d(T^*,\mathcal{T}) between T∗T^* and family T\mathcal{T} is defined as:

d(T∗,T):=min⁡T∈T{∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞}d(T^*,\mathcal{T}) := \min_{T \in\mathcal{T}} \left\{ \lVert T-T^* \rVert_\infty+ \lVert f^* \circ T-f^* \circ T^* \rVert_\infty\right\}

in which we define ∥G∥∞=max⁡(x,y)∣G(x,y)∣\lVert G \rVert_\infty= \max_{(x,y)} \lvert G(x,y) \rvert.

From Theorem 3.1 (proof in Appendix § 8), the gap between Df(Pd,Pθ)D_f(\mathbb{P}_d,\mathbb{P}_\theta) and the variational term max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y′))]}\max_{T \in\mathcal{T}} \{\mathbb{E}_{\mathbb{P}_d}[T(x,y)]-\mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y'))]\} is controlled by d(T∗,T)d(T^*,\mathcal{T}). Since T\mathcal{T} is parameterized by an expressive LLM, d(T∗,T)d(T^*,\mathcal{T}) is small and the variational term closely matches Df(Pd,Pθ)D_f(\mathbb{P}_d,\mathbb{P}_\theta). We therefore use it as a tractable proxy:

Df(Pd,Pθ)≈max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y′))]}(6)D_f(\mathbb{P}_d,\mathbb{P}_\theta) \approx\max_{T \in\mathcal{T}} \left\{ \mathbb{E}_{\mathbb{P}_d}[T(x,y)] - \mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y'))] \right\} \tag*{(6)}

Going back to our main problem, the main OP in (5) can be rewritten as:

min⁡θmax⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y′))]}(7)\min_\theta\max_{T \in\mathcal{T}} \left\{ \mathbb{E}_{\mathbb{P}_d}[T(x,y)] - \mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y'))] \right\} \tag*{(7)}

To further develop our theoretical framework, we consider a specific family of convex functions ff whose Fenchel conjugate f∗f^* is non-decreasing. This choice lets the monotone f∗f^* preserve the maximizer when passing from f∗(Tk(x,y′))f^*(T_k(x,y')) to Tk(x,y′)T_k(x,y') in the policy step, leading to more tractable formulations as detailed in the following derivations.

Theorem 3.2. Consider convex functions of the form:

f(u)={g(u),u≥0,+∞,u<0.(8)f(u) = \begin{cases} g(u), & u \ge0, \\ +\infty, & u < 0. \end{cases} \tag*{(8)}

where g:[0,+∞)→R∪{+∞}g:[0,+\infty) \to\mathbb{R} \cup\{+\infty\} is proper and lower semi-continuous, and differentiable and strictly convex on (0,+∞)(0,+\infty). Let g+′(0)=lim⁡u→0+g′(u)g'_+(0) = \lim_{u \to0^+} g'(u) and g∞′=lim⁡u→+∞g′(u)g'_\infty= \lim_{u \to+\infty} g'(u). For g+′(0)<v<g∞′g'_+(0) < v < g'_\infty, define g∗(v)=u∗v−g(u∗)g^*(v)=u^*v-g(u^*), where u∗>0u^*>0 is the unique solution of g′(u∗)=vg'(u^*)=v. Then the Fenchel conjugate of ff is given by:

f∗(v)={−g(0),v≤g+′(0),g∗(v),g+′(0)<v<g∞′,+∞,v>g∞′.(9)f^*(v) = \begin{cases} -g(0), & v \le g'_+(0), \\ g^*(v), & g'_+(0) < v < g'_\infty, \\ +\infty, & v > g'_\infty. \end{cases} \tag*{(9)}

where ∂g(0)\partial g(0) denotes the subdifferential of gg at 00, so g+′(0)=sup⁡∂g(0)g'_+(0)=\sup\partial g(0) (with the convention sup⁡∅=−∞\sup\varnothing=-\infty). The boundary case v=g∞′v=g'_\infty is discussed in Appendix § 8. In particular, f∗f^* is non-decreasing.

In the remainder of this section, we consider only convex functions ff of the form defined in Theorem 3.2 (proof in Appendix § 8), ensuring f∗f^* is non-decreasing. To handle min-max problem in (7), similar to GAN and ff-GAN, we conceptually alternate between critic TT and LLM policy πθ\pi_\theta as follows:

(1) Critic Update. Assume that at the current iteration kk, we have current LLM model πθk\pi_{\theta_k}, and we update critic TkT_k to maximize:

EPd[T(x,y)]−EPθk[f∗(T(x,y′))](10)\mathbb{E}_{\mathbb{P}_d}[T(x,y)]-\mathbb{E}_{\mathbb{P}_{\theta_k}}[f^*(T(x,y'))] \tag*{(10)}

In other words, we learn the critic function to optimize:

max⁡T∈T{EPd[T(x,y)]−EPθk[f∗(T(x,y′))]}=max⁡T∈T{Ex[T(x,y)−f∗(T(x,y′))]}(11)\max_{T \in\mathcal{T}} \left\{\mathbb{E}_{\mathbb{P}_{d}}[T(x,y)]-\mathbb{E}_{\mathbb{P}_{\theta_k}}[f^*(T(x,y'))]\right\} = \max_{T \in\mathcal{T}} \left\{\mathbb{E}_{x}[T(x,y)-f^*(T(x,y'))]\right\} \tag*{(11)}

where y∼Pd(⋅∣x)y \sim\mathbb{P}_{d}(\cdot\mid x) and y′∼πθk(⋅∣x)y' \sim\pi_{\theta_k}(\cdot\mid x). Instead of maximizing (11), we propose to minimize:

min⁡T∈T{Ex[ℓ(T(x,y)−f∗(T(x,y′)))]},(12)\min_{T \in\mathcal{T}} \left\{\mathbb{E}_{x}\left[\ell\left(T(x,y)-f^*(T(x,y'))\right)\right]\right\}, \tag*{(12)}

where ℓ\ell is a non-linear and decreasing function (e.g., ℓ(t)=log⁡(1+e−t)\ell(t)=\log(1+e^{-t})). First, this stabilizes the critic loss, as logistic loss is smooth and non-negative, preventing excessive growth in critic values during training. In addition, the resulting objective resembles those used in preference-optimization methods [32, 4], which have proven effective and offer tractability with stable gradient properties.

(2) Policy Update. Subsequently, we update LLM model πθ\pi_{\theta} to move Pθ\mathbb{P}_{\theta} closer to Pd\mathbb{P}_{d} by performing the outer minimization, leading to:

max⁡θEPθ[f∗(Tk(x,y′))](13)\max_{\theta}\mathbb{E}_{\mathbb{P}_{\theta}}[f^*(T_k(x,y'))] \tag*{(13)}

This updates the model to maximize f∗(Tk(x,y′))f^*(T_k(x,y')) for y′∼πθ(⋅∣x)y' \sim\pi_{\theta}(\cdot\mid x), thereby pushing synthetic samples (x,y′)(x,y') into high-score regions defined by the critic, effectively making Pθ\mathbb{P}_{\theta} converge toward Pd\mathbb{P}_{d}. Because f∗f^* is non-decreasing, raising the critic score Tk(x,y′)T_k(x,y') also raises f∗(Tk(x,y′))f^*(T_k(x,y')). This motivates replacing (13) with the KL-regularized surrogate below, whose optimum has a closed form:

max⁡π{Ex,y′∼π(⋅∣x)[Tk(x,y′)]−βEx[DKL(π(⋅∣x)∥πθk(⋅∣x))]}(14)\max_{\pi}\left\{\mathbb{E}_{x,y'\sim\pi(\cdot\mid x)}[T_k(x,y')]-\beta\mathbb{E}_{x}\left[D_{KL}\left(\pi(\cdot\mid x)\Vert\pi_{\theta_k}(\cdot\mid x)\right)\right]\right\} \tag*{(14)}

whose optimal solution is:

π∗(y′∣x)=1Z(x)πθk(y′∣x)exp⁡{β−1Tk(x,y′)}(15)\pi^*(y'\mid x)=\frac{1}{Z(x)}\pi_{\theta_k}(y'\mid x)\exp\{\beta^{-1}T_k(x,y')\} \tag*{(15)}

where Z(x)Z(x) is the partition function. From (15), it follows that for each policy πθ\pi_{\theta}, there exists Tk(x,y′∣θ)=βlog⁡πθ(y′∣x)πθk(y′∣x)+βlog⁡Z(x)T_k(x,y'\mid\theta)=\beta\log\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)}+\beta\log Z(x) such that Tk(x,y′∣θ)T_k(x,y'\mid\theta) and πθ\pi_{\theta} form the solution pair of the OP in (14). We have the following proposition.

Proposition 3.3. Consider the following OP, obtained by substituting the implicit-critic parameterization induced by (15) into the critic objective (12):

min⁡θEx[ℓ(βlog⁡πθ(y∣x)πθk(y∣x)+βlog⁡Z(x)−f∗(βlog⁡πθ(y′∣x)πθk(y′∣x)+βlog⁡Z(x)))](16)\min_{\theta}\mathbb{E}_{x}\left[\ell\left(\beta\log\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_k}(y\mid x)}+\beta\log Z(x)-f^*\left(\beta\log\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)}+\beta\log Z(x)\right)\right)\right] \tag*{(16)}

The partition function Z(x)Z(x) sums over the entire space of generated sequences and is therefore intractable to compute exactly. We thus replace (16) with the surrogate in (17), which omits βlog⁡Z(x)\beta\log Z(x) from both chosen and rejected scores:

min⁡θEx[ℓ(βlog⁡πθ(y∣x)πθk(y∣x)−f∗(βlog⁡πθ(y′∣x)πθk(y′∣x)))](17)\min_{\theta}\mathbb{E}_{x}\left[\ell\left(\beta\log\frac{\pi_{\theta}(y\mid x)}{\pi_{\theta_k}(y\mid x)}-f^*\left(\beta\log\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)}\right)\right)\right] \tag*{(17)}

This objective encourages the model to increase the likelihood of real normal samples yy while maintaining or improving upon the reference model’s generation of y′y', progressively refining the model’s understanding of the normal data distribution.

Implicit Critic Implementation. Although the derivation is presented as a critic step followed by a policy step, the final training algorithm does not require a separate inner-loop optimization for TT. Following the same principle as DPO [32] and SPIN [4], the KL-regularized policy problem in (14) yields the closed-form solution in (15), which implies:

Tk(x,y′∣θ)=βlog⁡πθ(y′∣x)πθk(y′∣x)+βlog⁡Z(x).T_k(x,y'\mid\theta)=\beta\log\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)}+\beta\log Z(x).

Hence the critic is an implicit function of the policy parameters. Substituting this parameterization back into the critic objective (12) yields (16), and omitting the partition term βlog⁡Z(x)\beta\log Z(x) gives the implementable surrogate (17). A single optimization over θ\theta thus realizes both the conceptual critic and policy updates, and Algorithm 1 accordingly performs one parameter update per iteration.

In practice, the model at iteration kk may occasionally generate synthetic samples y′y' that closely resemble true normal data. When this occurs, the probability ratio πθ(y′∣x)πθk(y′∣x)\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)} approaches 1, indicating that both the current and reference policies assign similar likelihoods to y′y'. Penalizing such samples as pseudo-anomalies would be counterproductive, as they already lie close to the normal data manifold. To address this, we apply a clamping operation:

r~ℓ=βlog⁡min⁡{πθ(y′∣x)πθk(y′∣x),1−ϵ}(18)\tilde{r}^{\ell}=\beta\log\min\left\{\frac{\pi_{\theta}(y'\mid x)}{\pi_{\theta_k}(y'\mid x)},1-\epsilon\right\} \tag*{(18)}

Algorithm 1 DiSPaT

Input: Tabular dataset X={xi}i=1nX = \{x_i\}_{i=1}^n, SFT-initialized LLM πθ0\pi_{\theta_0}, iterations TT, non-decreasing Fenchel conjugate f∗f^*, regularization β\beta, clamping threshold ϵ\epsilon

  1. for i=1,…,ni = 1, \ldots, n do

  2. &nbsp;&nbsp;Sample permutation π∼Sd\pi\sim S_d

  3. &nbsp;&nbsp;Serialize row xix_i into context-continuation pair (xi,yi)=S(π,xi)(x_i, y_i) = S(\pi, x_i)

  4. end for

  5. for t=0,…,T−1t = 0, \ldots, T - 1 do

  6. &nbsp;&nbsp;// Generate synthetic samples to serve as pseudo-abnormal

  7. &nbsp;&nbsp;for i=1,…,ni = 1, \ldots, n do

  8. &nbsp;&nbsp;&nbsp;&nbsp;Sample synthetic continuation yi′∼πθt(⋅∣xi)y'_i \sim\pi_{\theta_t}(\cdot\mid x_i)

  9. &nbsp;&nbsp;end for

  10. &nbsp;&nbsp;// Single implicit-critic update to minimize ff-divergence

  11. &nbsp;&nbsp;Compute chosen reward: ρiw←βlog⁡πθ(yi∣xi)πθt(yi∣xi)\rho_i^w \leftarrow\beta\log\frac{\pi_\theta(y_i \mid x_i)}{\pi_{\theta_t}(y_i \mid x_i)}

  12. &nbsp;&nbsp;Compute rejected reward with clamping: ρ~il←βlog⁡min⁡{πθ(yi′∣xi)πθt(yi′∣xi),1−ϵ}\tilde{\rho}_i^l \leftarrow\beta\log\min\left\{\frac{\pi_\theta(y'_i \mid x_i)}{\pi_{\theta_t}(y'_i \mid x_i)}, 1-\epsilon\right\}

  13. &nbsp;&nbsp;Update: θt+1←arg⁡min⁡θ∑i=1nℓ(ρiw−f∗(ρ~il))\theta_{t+1} \leftarrow\mathop{\arg\min}_{\theta} \sum_{i=1}^{n} \ell\left(\rho_i^w - f^*(\tilde{\rho}_i^l)\right)

  14. end for

Output: Trained model θT\theta_T

where ϵ>0\epsilon> 0 is a small threshold. This clamping effectively treats synthetic samples that are already similar to normal data as normal, avoiding over-penalization of such “good attempts” and ensuring stable optimization. The algorithm is presented in Algorithm 1. Examples of generated samples across iterations are shown in Appendix B.8.

Experiments

Datasets. Standard anomaly detection benchmarks such as ADBench [11] and the ODDS library [34] are dominated by purely numerical features. Following AnoLLM [41], that include textual, numerical, or categorical features, drawn from the ODDS library [34], a fraud detection benchmark [10], and Kaggle. To further validate the robustness of DiSPaT, we additionally evaluate on 30 numerical datasets from ODDS library. Dataset statistics for all datasets are summarized in Appendix B.7, and detailed ODDS results are reported in Appendix B.4.

Baselines. We compare DiSPaT against 12 established tabular anomaly detection methods. Classical approaches rely on techniques such as tree-based isolation, linear projection, nearest-neighbor distances, and statistical distribution modeling; these include IForest [23], PCA [39], kNN [33], and ECOD (Li et al., 2022). Deep learning methods leverage neural architectures, reconstruction-based learning, self-supervised objectives with data augmentation or contrastive learning, and generative diffusion processes; these include DeepSVDD [35], RCA [22], SLAD (Xu et al., 2023), GOAD [1], NeuTraL [31], ICL [38], DTE [24], and REPEN [28]. We also include the LLM-based method AnoLLM [41] as a baseline.

Implementation and Evaluation. We employ SmolLM-135M, SmolLM-360M, and SmolLM-1.7B as backbone LLMs, which are among the strongest publicly available open-weight small-scale models. Following AnoLLM [41], we fine-tune all models for 2000 steps (20000 steps for the Fakejob dataset) and select learning rates from {1×10−3,5×10−5}\{1 \times10^{-3}, 5 \times10^{-5}\} per dataset. We tune coefficient β\beta and clamping threshold ϵ\epsilon for each dataset via grid search. For evaluation, we follow established benchmarks [38] (Xu et al. 2023): 50% of normal data for training, with the remaining normal instances and all anomalies forming the test set. We report AUC-ROC, F1-score, and AUC-PR. Anomaly scores are computed as negative log-likelihood of serialized token sequences, averaged over r=21r = 21 random column permutations [41]. Detailed hyperparameter settings and implementation specifics are provided in Appendix B.1, and a detailed analysis of training and inference cost is given in Appendix B.2.

Main Results

In all experiments, we adopt KL divergence with f∗(v)=ev−1f^*(v) = e^v - 1, as it yields the best overall performance among the ff-divergence variants; detailed comparisons are provided in Section 4.2. Tables 1, 2 and 3 present the performance comparison on the six-dataset benchmark. DiSPaT consistently delivers the best results across all datasets and model scales. Specifically, DiSPaT improves over AnoLLM by 8.1%, 7.6%, and 5.8% in average AUC-ROC for the 135M, 360M, and 1.7B backbones, respectively. Similar improvements are observed on AUC-PR and F1 metrics: DiSPaT achieves 13.9%, 14.1%, and 7.9% improvements in AUC-PR, and 13.9%, 15.6%, and 7.9% improvements in F1 for three model sizes. Compared to classical and deep learning baselines, DiSPaT substantially outperforms the best-performing baseline across all metrics: at least 12.7% higher in AUC-ROC, 12.1% in AUC-PR, and 15.4% in F1. Additional comparisons with recent tabular anomaly detection baselines are reported in Appendix § 10.§ 3. This highlights the advantage of LLM-based approaches for tabular data that may include textual, numerical, or categorical attributes, where traditional methods require extensive feature engineering to jointly model different attribute types.

Methods\DatasetsFakejobLymphographySeismicVehicle20 NewsgroupsEcoliAverage
Classical methods
Iforest75.5%67.3%69.2%49.6%62.3%85.6%68.3%
PCA72.4%82.6%69.2%50.9%62.3%85.6%70.5%
KNN63.6%86.0%73.8%52.4%60.5%87.7%70.7%
ECOD51.2%83.0%69.2%50.9%62.0%77.6%65.7%
Deep Learning based methods
DeepSVDD56.1%89.9%71.3%50.5%59.7%88.7%69.4%
RCA62.9%91.9%72.7%53.1%54.6%88.3%70.6%
SLAD60.3%96.4%71.4%55.6%64.0%88.2%72.7%
GOAD56.6%81.7%71.7%51.2%63.0%88.1%68.7%
NeuTral54.8%84.7%68.1%50.7%65.8%86.0%68.4%
ICL69.9%82.7%71.9%50.1%67.1%88.7%71.7%
DTE54.8%90.9%71.4%51.2%60.0%82.1%68.4%
REPEN65.3%80.8%72.4%51.3%57.4%87.0%69.0%
LLM-based methods
AnoLLM (SmolLM-135M)80.0%96.8%71.2%56.9%76.6%77.7%76.5%
DiSPaT84.2%{sup}↑100.0%{sup}↑73.2%{sup}↑63.8%{sup}↑91.9%{sup}↑94.9%{sup}↑84.6%{sup}↑
AnoLLM (SmolLM-360M)81.4%99.5%74.6%55.5%75.2%80.4%77.8%
DiSPaT88.3%{sup}↑100.0%{sup}↑75.7%{sup}↑64.2%{sup}↑87.6%{sup}↑96.8%{sup}↑85.4%{sup}↑
AnoLLM (SmolLM-1.7B)80.2%99.5%74.0%56.0%77.4%79.1%77.7%
DiSPaT85.2%{sup}↑99.8%{sup}↑74.6%{sup}↑59.0%{sup}↑87.1%{sup}↑95.1%{sup}↑83.5%{sup}↑

Table 1. Detailed AUC-ROC scores (%) comparing DiSPaT against baselines on the six-dataset benchmark. Best and second-best results per dataset are highlighted in bold and underlined, respectively. Values marked with ↑ and ↓ indicate where DiSPaT improves or degrades compared to AnoLLM with the same model size. All baseline results are reported directly from [41].

Figure 1 illustrates the effect of iterative self-play training. Starting from the SFT-initialized model, performance generally improves as iterations increase, with most datasets showing gains by iteration 3. While some datasets exhibit minor fluctuations at intermediate iterations, the overall trend demonstrates that self-play progressively refines the model’s understanding of normality. These gains validate our theoretical motivation: by iteratively contrasting real normal samples with model-generated pseudo-anomalies, DiSPaT learns a tighter description of normality that one-shot fine-tuning cannot achieve. The self-play mechanism provides the discriminative signal necessary to refine the decision boundary, enabling the model to better separate abnormal, near-normal anomalies from genuine normal instances. Additional iteration analyses for F1 and AUC-PR metrics are provided in Appendix § 10.6.

Figure 1. AUC-ROC scores (%) of DiSPaT across self-play iterations on four datasets using SmolLM-135M. SFT indicates initial model, and iter-kk refers to model after kk iterations of training.

Ablation Study

Effect of ff-Divergence Choice

A key feature of the proposed DiSPaT framework is its inherent flexibility in choosing different ff-divergences through Fenchel conjugate f∗f^*. As discussed in § 3, we consider functions ff whose conjugate f∗f^* is non-decreasing. To investigate the impact of this design choice, we evaluate four representative variants:

  • Identity: f∗(v)=vf^*(v)=v

  • KL divergence: f∗(v)=ev−1f^*(v)=e^v-1

  • Reverse KL divergence: f∗(v)=−log⁡(1−v)f^*(v)=-\log(1-v)

  • Squared Hellinger distance: f∗(v)=v1−vf^*(v)=\frac{v}{1-v}

Reverse KL and Squared Hellinger require v<1v<1 for well-defined conjugates, which is satisfied by applying a clamping threshold ϵ\epsilon to the log-ratio before computing f∗f^*. Table 4 reports results. When f∗(v)=vf^{*}(v) = v, the objective reduces to original SPIN formulation [4]. While Identity improves over SFT baseline, all three ff-divergence variants achieve higher performance, with f∗(v)=ev−1f^{*}(v) = e^{v} - 1 attaining the best average scores across all metrics. These results validate our motivation for generalizing self-play to a broader family of ff-divergences: selecting an appropriate divergence measure improves learning for anomaly detection, enabling a tighter description of normality than the Identity baseline. Derivations of f∗f^{*} forms and full ablation over all six datasets are provided in Appendix § 8.§ 2 and B.5.

Table 4. Performance comparison for different ff-divergence choices on four datasets using SmolLM-135M.

f∗f^*MetricFakejobLymph.VehicleEcoliAvg.
vvROC84.2%99.3%59.0%92.3%83.7%
F134.9%83.3%16.9%44.4%44.9%
PR30.9%94.4%15.4%37.9%44.6%
ev−1e^v - 1ROC83.9%100.0%63.8%94.9%85.7%
F135.1%100.0%20.2%55.6%52.7%
PR30.7%100.0%17.5%55.6%50.5%
−log⁡(1−v)-\log(1-v)ROC84.0%100.0%60.5%93.1%84.4%
F134.6%100.0%16.8%55.6%51.8%
PR30.9%100.0%15.6%51.1%49.4%
1−v1-vROC83.8%97.7%62.8%94.9%84.8%
F134.4%83.3%23.2%55.6%49.1%
PR30.6%89.6%23.2%46.3%47.4%

Table 4.

Methods\DatasetsFakejobLymphographySeismicVehicle20 NewsgroupsEcoliAverage
Classical methods
Iforest27.4%23.3%25.1%11.0%13.7%75.6%29.4%
PCA25.6%56.7%26.6%12.4%13.3%77.8%35.4%
KNN16.3%66.7%29.1%13.5%15.6%77.8%36.5%
ECOD16.5%40.0%28.2%11.2%13.2%31.1%23.4%
Deep Learning based methods
DeepSVDD13.6%56.7%25.8%11.5%15.2%53.3%29.4%
RCA13.7%66.7%32.0%13.5%12.9%77.8%36.1%
SLAD17.5%66.7%28.5%15.5%15.9%77.8%37.0%
GOAD12.9%66.7%29.5%11.9%13.6%77.8%35.4%
NeuTral11.5%63.3%19.5%12.0%19.5%51.1%29.5%
ICL24.5%66.7%29.8%10.8%19.0%71.1%37.0%
DTE10.7%66.7%23.9%12.1%18.5%66.0%33.0%
REPEN16.4%66.7%30.6%12.6%12.4%75.6%35.7%
LLM-based methods
AnoLLM (SmolLM-135M)32.5%76.7%27.9%16.2%24.1%33.3%35.1%
DiSPaT34.9%↑100.0%↑33.5%↑20.2%↑49.8%↑55.6%↑<u>49.0%↑</u>
AnoLLM (SmolLM-360M)34.3%80.0%33.6%17.4%22.0%33.3%36.8%
DiSPaT40.8%↑100.0%↑35.9%↑<u>19.6%↓</u><u>40.1%↑</u>77.8%↑52.4%↑
AnoLLM (SmolLM-1.7B)34.4%<u>83.3%</u><u>34.1%</u>16.5%28.1%44.4%40.1%
DiSPaT<u>37.2%↑</u><u>83.3%</u>32.4%↓18.4%↑39.2%↑77.8%↑48.0%↑

Table 2. Detailed F1 scores (%) comparing DiSPaT against baselines on six-dataset benchmark. Best and second-best per dataset are highlighted in bold and underlined; ↑ and ↓ indicate where DiSPaT improves or degrades compared to AnoLLM with same model size. Baselines from [41], except AnoLLM (SmolLM-1.7B) obtained via official implementation (not reported in original paper).

Effect of Clamping threshold

Figure 2 shows AUC-ROC on SmolLM-360M as the clamping threshold ϵ\epsilon varies. Clamping prevents over-penalization of synthetic samples with probability ratio close to 1; ϵ=0\epsilon= 0 applies no clamping and can over-penalize “good” synthetic samples, while large ϵ\epsilon reduces the effective contrast between normal and synthetic samples. Moderate positive values of ϵ\epsilon yield the best performance. The results support using a moderate clamping threshold and indicate robustness to the exact value within that range. Additional analysis including F1 and AUC-PR metrics is provided in Appendix § 10.6.

Figure 2. Effect of clamping threshold on AUC-ROC scores (%) on two datasets: Ecoli and Vehicle, using SmolLM-360M.

Generalization Beyond Anomaly Detection

Although DiSPaT is motivated by anomaly detection, its core design is a general self-play refinement procedure.

To test whether the improvement over SPIN is specific to anomaly detection or reflects a broader advantage of the objective, we additionally evaluate DiSPaT in the standard SPIN alignment setting. Following the SPIN protocol, we fine-tune Qwen1.5-1.8B on 50,000 prompts randomly sampled from UltraChat200k and evaluate on the HuggingFace Open LLM Leaderboard benchmarks.

Table 5 shows that DiSPaT consistently improves over SPIN on all six benchmarks, increasing the average score from 42.26 to 43.80. These results suggest that replacing the single fixed SPIN objective with the broader ff-divergence family, together with the clamping mechanism, yields gains beyond the anomaly-detection setting. More broadly, they indicate that the self-play formulation of DiSPaT may be useful in problems where informative negative or contrastive data are limited.

Table 5. Comparison with SPIN in the standard alignment setting. We fine-tune Qwen1.5-1.8B on 50,000 UltraChat200k prompts and evaluate on HuggingFace Open LLM Leaderboard benchmarks. Results are reported as mean ± standard deviation.

BenchmarkSPINDiSPaT
ARC34.90 ± 1.3936.52 ± 1.41
TruthfulQA39.59 ± 1.4539.71 ± 1.46
Winogrande61.09 ± 1.3762.33 ± 1.37
GSM8K29.57 ± 1.2633.89 ± 1.30
HellaSwag43.66 ± 0.4945.11 ± 0.50
MMLU44.75 ± 10.0545.23 ± 9.83
Avg.42.2643.80

Table 5.

Table 3. Detailed AUC-PR scores (%) comparing DiSPaT against baselines on six-dataset benchmark. Best and second-best per dataset are highlighted in bold and <u>underlined</u>; ↑ and ↓ indicate where DiSPaT improves or degrades compared to AnoLLM with same model size. Baselines from [41], except AnoLLM (SmolLM-1.7B) obtained via official implementation (not reported in original paper).

Methods\DatasetsFakejobLymphographySeismicVehicle20 NewsgroupsEcoliAverage
Classical methods
Iforest22.7%23.2%23.5%11.2%14.6%8.6%17.3%
PCA19.4%62.4%21.6%11.7%14.3%16.0%24.2%
KNN13.8%72.0%25.6%12.3%14.8%73.9%35.4%
ECOD13.0%36.5%24.4%11.6%14.1%18.9%19.8%
Deep Learning based methods
DeepSVDD12.0%68.0%22.6%11.4%13.5%2.4%21.7%
RCA13.4%78.3%25.0%12.4%13.6%17.6%26.7%
SLAD15.0%79.5%24.1%14.0%15.9%11.0%26.6%
GOAD11.7%69.7%23.9%11.6%14.4%1.2%22.1%
NeuTral10.8%68.1%19.3%11.7%17.6%43.0%28.4%
ICL19.3%71.8%25.1%11.5%17.5%66.4%35.3%
DTE10.6%74.7%22.4%11.6%15.7%77.7%35.5%
REPEN14.6%69.7%24.9%11.8%12.6%9.3%23.8%
LLM-based methods
AnoLLM (SmolLM-135M)28.6%85.6%23.6%14.1%22.3%20.6%32.5%
DiSPaT30.9%↑100.0%↑26.9%↑17.5%↑49.4%↑53.6%↑46.4%↑
AnoLLM (SmolLM-360M)30.4%93.8%28.1%14.3%21.4%12.7%33.5%
DiSPaT36.3%↑100.0%↑29.1%↑<u>16.9%↑</u><u>37.6%↑</u>65.4%↑47.6%↑
AnoLLM (SmolLM-1.7B)<u>31.2%</u><u>97.6%</u>27.9%14.3%26.5%39.4%39.5%
DiSPaT30.0%↓<u>97.6%</u><u>28.3%↑</u>15.1%↑36.1%↑<u>77.3%↑</u><u>47.4%↑</u>

Table 3.

Conclusion

We introduce DiSPaT, a self-play fine-tuning framework for unsupervised tabular anomaly detection with LLMs. Our method uses an iterative refinement mechanism grounded in ff-divergence minimization: at each iteration, the model generates synthetic samples that serve as pseudo-anomalies, and a discriminative objective drives the policy to better

align with the true normal data distribution. This self-play loop provides the discriminative signal absent in one-shot fine-tuning approaches, enabling the model to learn a tighter description of normality. Theoretically, we establish a tight variational approximation connecting our training objective to the ff-divergence between real and model-induced distributions, providing a principled foundation for iterative self-improvement. Empirically, DiSPaT consistently outperforms AnoLLM, strong classical and deep-learning baselines, and additional recent tabular anomaly detection methods across multiple datasets, supporting the effectiveness of the proposed framework for tabular anomaly detection.

Acknowledgements

Trung Le was supported by the Air Force Office of Scientific Research under award number FA2386-25-1-4023 and the ARC Discovery Project grant DP250100262. Linh Ngo Van is funded by Vietnam National Foundation for Science and Technology Development (NAFOSTED) under grant number 102.05-2025.16.

Impact Statement

This paper presents DiSPaT, an ff-divergence self-play fine-tuning framework for improving anomaly detection in tabular data. More accurate anomaly detection may be beneficial in applications such as fraud detection, cybersecurity, and monitoring tasks, where identifying unusual patterns reliably is important. Our work is intended to advance machine learning methodology, and we do not feel there are specific negative ethical consequences that must be highlighted here.

Theory Development

All Proofs

Proof of Theorem 3.1. We now prove (i) and (ii)

(i) By definition, we have

Df(Pd,Pθ)=EPθ[f(pd(x,y)pθ(x,y))]=EPθ[max⁡t{pd(x,y)pθ(x,y)t−f∗(t)}]≥max⁡T∈TEPθ[pd(x,y)pθ(x,y)T(x,y)−f∗(T(x,y))]=max⁡T∈T∫[pθ(x,y)pd(x,y)pθ(x,y)T(x,y)−pθ(x,y)f∗(T(x,y))]dxdy=max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y))]}\begin{aligned} D_f(\mathbb{P}_d,\mathbb{P}_\theta)=\mathbb{E}_{\mathbb{P}_\theta}\left[f\left(\frac{p_d(x,y)}{p_\theta(x,y)}\right)\right]=\mathbb{E}_{\mathbb{P}_\theta}\left[\max_t\left\{\frac{p_d(x,y)}{p_\theta(x,y)}t-f^*(t)\right\}\right] \\ &\geq\max_{T\in\mathcal{T}}\mathbb{E}_{\mathbb{P}_\theta}\left[\frac{p_d(x,y)}{p_\theta(x,y)}T(x,y)-f^*(T(x,y))\right] \\ &=\max_{T\in\mathcal{T}}\int\left[p_\theta(x,y)\frac{p_d(x,y)}{p_\theta(x,y)}T(x,y)-p_\theta(x,y)f^*(T(x,y))\right]dxdy \\ &=\max_{T\in\mathcal{T}}\left\{\mathbb{E}_{\mathbb{P}_d}[T(x,y)]-\mathbb{E}_{\mathbb{P}_\theta}[f^*(T(x,y))]\right\} \end{aligned}

(ii) To find out the optimal t∗=T∗(x,y)t^*=T^*(x,y) for max⁡t{pd(x,y)pθ(x,y)t−f∗(t)}\max_t\left\{\frac{p_d(x,y)}{p_\theta(x,y)}t-f^*(t)\right\}, we consider

h(t)=pd(x,y)pθ(x,y)t−f∗(t)h(t)=\frac{p_d(x,y)}{p_\theta(x,y)}t-f^*(t)

Since ff is differentiable and strictly convex on the interior of its domain, f∗f^* is likewise differentiable with ∇f∗=(∇f)−1\nabla f^*=(\nabla f)^{-1}, and hh is concave; setting its derivative to zero yields

h′(t)=pd(x,y)pθ(x,y)−∇f∗(t)=0h'(t)=\frac{p_d(x,y)}{p_\theta(x,y)}-\nabla f^*(t)=0

Using the property of Fenchel conjugate, we obtain

t=∇f(∇f∗(t))=∇f(pd(x,y)pθ(x,y))t=\nabla f\left(\nabla f^*(t)\right)=\nabla f\left(\frac{p_d(x,y)}{p_\theta(x,y)}\right)

which leads to

T∗(x,y)=∇f(pd(x,y)pθ(x,y))T^*(x,y)=\nabla f\left(\frac{p_d(x,y)}{p_\theta(x,y)}\right)

Consequently, we obtain

Df(Pd,Pθ)−EPθ[pd(x,y)pθ(x,y)T(x,y)−f∗(T(x,y))]=EPθ[pd(x,y)pθ(x,y)(T∗(x,y)−T(x,y))−(f∗(T∗(x,y))−f∗(T(x,y)))]=EPd[T∗(x,y)−T(x,y)]−EPθ[f∗(T∗(x,y))−f∗(T(x,y))]≤∫∣T(x,y)−T∗(x,y)∣pd(x,y) dxdy+∫∣f∗(T(x,y))−f∗(T∗(x,y))∣pθ(x,y) dxdy≤∫∥T−T∗∥∞pd(x,y) dxdy+∫∥f∗∘T−f∗∘T∗∥∞pθ(x,y) dxdy=∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞\begin{aligned} D_f(\mathbb{P}_d,\mathbb{P}_\theta)-\mathbb{E}_{\mathbb{P}_\theta}\left[\frac{p_d(x,y)}{p_\theta(x,y)}T(x,y)-f^*(T(x,y))\right] \\ &=\mathbb{E}_{\mathbb{P}_\theta}\left[\frac{p_d(x,y)}{p_\theta(x,y)}\left(T^*(x,y)-T(x,y)\right)-\left(f^*(T^*(x,y))-f^*(T(x,y))\right)\right] \\ &=\mathbb{E}_{\mathbb{P}_d}\left[T^*(x,y)-T(x,y)\right]-\mathbb{E}_{\mathbb{P}_\theta}\left[f^*(T^*(x,y))-f^*(T(x,y))\right] \\ &\leq\int\left|T(x,y)-T^*(x,y)\right|p_d(x,y)\,dxdy+\int\left|f^*(T(x,y))-f^*(T^*(x,y))\right|p_\theta(x,y)\,dxdy \\ &\leq\int\left\|T-T^*\right\|_\infty p_d(x,y)\,dxdy+\int\left\|f^*\circ T-f^*\circ T^*\right\|_\infty p_\theta(x,y)\,dxdy \\ &=\left\|T-T^*\right\|_\infty+\left\|f^*\circ T-f^*\circ T^*\right\|_\infty \end{aligned}

Therefore, we have

EPθ[pd(x,y)pθ(x,y)T(x,y)−f∗(T(x,y))]−Df(Pd,Pθ)=EPθ[pd(x,y)pθ(x,y)(T(x,y)−T∗(x,y))−(f∗(T(x,y))−f∗(T∗(x,y)))]=EPd[T(x,y)−T∗(x,y)]−EPθ[f∗(T(x,y))−f∗(T∗(x,y))]≤∫∣T(x,y)−T∗(x,y)∣pd(x,y) dxdy+∫∣f∗(T(x,y))−f∗(T∗(x,y))∣pθ(x,y) dxdy≤∫∥T−T∗∥∞pd(x,y) dxdy+∫∥f∗∘T−f∗∘T∗∥∞pθ(x,y) dxdy=∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞\begin{aligned} \mathbb{E}_{\mathbb{P}_{\theta}}\left[\frac{p_d(x,y)}{p_{\theta}(x,y)}T(x,y)-f^*(T(x,y))\right]-D_f(\mathbb{P}_d,\mathbb{P}_{\theta}) \\ &=\mathbb{E}_{\mathbb{P}_{\theta}}\left[\frac{p_d(x,y)}{p_{\theta}(x,y)}\left(T(x,y)-T^*(x,y)\right)-\left(f^*(T(x,y))-f^*(T^*(x,y))\right)\right] \\ &=\mathbb{E}_{\mathbb{P}_d}\left[T(x,y)-T^*(x,y)\right]-\mathbb{E}_{\mathbb{P}_{\theta}}\left[f^*(T(x,y))-f^*(T^*(x,y))\right] \\ &\leq\int\left|T(x,y)-T^*(x,y)\right|p_d(x,y)\,dxdy+\int\left|f^*(T(x,y))-f^*(T^*(x,y))\right|p_{\theta}(x,y)\,dxdy \\ &\leq\int\left\|T-T^*\right\|_{\infty}p_d(x,y)\,dxdy+\int\left\|f^*\circ T-f^*\circ T^*\right\|_{\infty}p_{\theta}(x,y)\,dxdy \\ &=\left\|T-T^*\right\|_{\infty}+\left\|f^*\circ T-f^*\circ T^*\right\|_{\infty} \end{aligned}

This implies that

Df(Pd,Pθ)−{EPd[T(x,y)]−EPθ[f∗(T(x,y))]}≤∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞D_f(\mathbb{P}_d,\mathbb{P}_{\theta})-\left\{\mathbb{E}_{\mathbb{P}_d}[T(x,y)]-\mathbb{E}_{\mathbb{P}_{\theta}}[f^*(T(x,y))]\right\}\leq\left\|T-T^*\right\|_{\infty}+\left\|f^*\circ T-f^*\circ T^*\right\|_{\infty}

Let Tˉ∗=arg⁡min⁡T∈T∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞\bar{T}^*=\mathop{\arg\min}_{T\in\mathcal{T}}\|T-T^*\|_{\infty}+\|f^*\circ T-f^*\circ T^*\|_{\infty}. We then have the conclusion because

Df(Pd,Pθ)−max⁡T∈T{EPd[T(x,y)]−EPθ[f∗(T(x,y))]}≤Df(Pd,Pθ)−{EPd[Tˉ∗(x,y)]−EPθ[f∗(Tˉ∗(x,y))]}≤∥Tˉ∗−T∗∥∞+∥f∗∘Tˉ∗−f∗∘T∗∥∞=min⁡T∈T{∥T−T∗∥∞+∥f∗∘T−f∗∘T∗∥∞}\begin{aligned} D_f(\mathbb{P}_d,\mathbb{P}_{\theta})-\max_{T\in\mathcal{T}}\left\{\mathbb{E}_{\mathbb{P}_d}[T(x,y)]-\mathbb{E}_{\mathbb{P}_{\theta}}[f^*(T(x,y))]\right\} \\ &\leq D_f(\mathbb{P}_d,\mathbb{P}_{\theta})-\left\{\mathbb{E}_{\mathbb{P}_d}[\bar{T}^*(x,y)]-\mathbb{E}_{\mathbb{P}_{\theta}}[f^*(\bar{T}^*(x,y))]\right\} \\ &\leq\|\bar{T}^*-T^*\|_{\infty}+\|f^*\circ\bar{T}^*-f^*\circ T^*\|_{\infty} \\ &=\min_{T\in\mathcal{T}}\left\{\|T-T^*\|_{\infty}+\|f^*\circ T-f^*\circ T^*\|_{\infty}\right\} \end{aligned}

Proof of Theorem 3.2. By definition, the Fenchel conjugate of ff is:

f∗(v)=sup⁡u∈R{uv−f(u)}=sup⁡u≥0{uv−g(u)}f^*(v)=\sup_{u\in\mathbb{R}}\{uv-f(u)\}=\sup_{u\geq0}\{uv-g(u)\}

since f(u)=+∞f(u)=+\infty for u<0u<0 makes those terms irrelevant in the supremum. Let h(u)=uv−g(u)h(u)=uv-g(u) for u>0u>0; since gg is convex, hh is concave with h′(u)=v−g′(u)h'(u)=v-g'(u), and strict convexity makes g′g' strictly increasing from g+′(0)=lim⁡u→0+g′(u)=sup⁡∂g(0)g'_+(0)=\lim_{u\to0^+}g'(u)=\sup\partial g(0) to g∞′=lim⁡u→+∞g′(u)g'_{\infty}=\lim_{u\to+\infty}g'(u).

Case 1: v≤g+′(0)v\leq g'_+(0).

For every u>0u>0, strict convexity gives g′(u)>g+′(0)≥vg'(u)>g'_+(0)\geq v, so h′(u)=v−g′(u)<0h'(u)=v-g'(u)<0 and hh is strictly decreasing. The supremum is attained at u∗=0u^*=0:

f∗(v)=0⋅v−g(0)=−g(0)f^*(v)=0\cdot v-g(0)=-g(0)

Case 2: g+′(0)<v<g∞′g'_+(0)<v<g'_{\infty}.

Then vv lies in the range of g′g', so g′(u∗)=vg'(u^*)=v has a unique solution u∗>0u^*>0 with h′(u∗)=0h'(u^*)=0; since hh is concave, u∗u^* is the maximizer:

f∗(v)=sup⁡u≥0{uv−g(u)}=u∗v−g(u∗)=g∗(v)f^*(v)=\sup_{u\geq0}\{uv-g(u)\}=u^*v-g(u^*)=g^*(v)

Case 3: v≥g∞′v\geq g'_{\infty}.

This is the boundary regime referred to in Theorem 3.2. For all u>0u>0, we have g′(u)<g∞′≤vg'(u)<g'_{\infty}\leq v, so h′(u)=v−g′(u)>0h'(u)=v-g'(u)>0 and hh is strictly increasing; the supremum is therefore the limit f∗(v)=lim⁡u→+∞(uv−g(u))f^*(v)=\lim_{u\to+\infty}(uv-g(u)). If v>g∞′v>g'_{\infty}, the slope is bounded below by v−g∞′>0v-g'_{\infty}>0, so this limit is +∞+\infty. If v=g∞′v=g'_{\infty}, it equals lim⁡u→+∞(g∞′u−g(u))∈(−∞,+∞]\lim_{u\to+\infty}(g'_{\infty}u-g(u))\in(-\infty,+\infty]; hence the boundary value may be finite (e.g., g(u)=u2+1−1g(u)=\sqrt{u^2+1}-1 has g∞′=1g'_{\infty}=1 and f∗(1)=1f^*(1)=1) or +∞+\infty (as for reverse KL and squared Hellinger).

Monotonicity: For any v1<v2v_1<v_2 and u≥0u\geq0: uv1≤uv2uv_1\leq uv_2, hence uv1−g(u)≤uv2−g(u)uv_1-g(u)\leq uv_2-g(u). Taking supremum: f∗(v1)≤f∗(v2)f^*(v_1)\leq f^*(v_2).

Proof of Proposition 3.3. We first establish the closed-form optimum of the KL-regularized problem (14), then substitute the induced critic parameterization into the critic objective (12).

Fix a context xx. Restricting to the support Yx={y′:πθk(y′∣x)>0}\mathcal{Y}_x = \{y' : \pi_{\theta_k}(y' \mid x) > 0\} (outside which any finite-objective policy must vanish, since otherwise the KL term diverges), the per-context objective in (14) reads

J(π)=∑y′∈Yxπ(y′∣x)Tk(x,y′)−β∑y′∈Yxπ(y′∣x)log⁡π(y′∣x)πθk(y′∣x).J(\pi) = \sum_{y' \in\mathcal{Y}_x} \pi(y' \mid x) T_k(x,y') - \beta\sum_{y' \in\mathcal{Y}_x} \pi(y' \mid x) \log\frac{\pi(y' \mid x)}{\pi_{\theta_k}(y' \mid x)}.

Since the hypotheses of Theorem 3.1 ensure that TkT_k is bounded on the support, the normalizing constant Z(x)=∑y′∈Yxπθk(y′∣x)exp⁡(β−1Tk(x,y′))Z(x) = \sum_{y' \in\mathcal{Y}_x} \pi_{\theta_k}(y' \mid x) \exp(\beta^{-1}T_k(x,y')) satisfies Z(x)∈(0,∞)Z(x) \in(0,\infty), so the Gibbs optimum below is well defined. The reward term is linear in π\pi and the negative-entropy term is strictly convex, so JJ is strictly concave; hence over the probability simplex the first-order stationarity (KKT) condition is sufficient for optimality and the constrained maximizer is unique. Introducing a multiplier λ(x)\lambda(x) for ∑y′π(y′∣x)=1\sum_{y'} \pi(y' \mid x) = 1, the Lagrangian is

L(π,λ;x)=J(π)+λ(x)(∑y′∈Yxπ(y′∣x)−1).\mathcal{L}(\pi,\lambda;x) = J(\pi) + \lambda(x) \left(\sum_{y' \in\mathcal{Y}_x} \pi(y' \mid x) - 1\right).

Differentiating with respect to a single coordinate π(y′∣x)\pi(y' \mid x) and using the product rule on the entropy term gives the stationarity condition

Tk(x,y′)−β(log⁡π(y′∣x)πθk(y′∣x)+1)+λ(x)=0.T_k(x,y') - \beta\left(\log\frac{\pi(y' \mid x)}{\pi_{\theta_k}(y' \mid x)} + 1\right) + \lambda(x) = 0.

Solving for the log-ratio yields

log⁡π(y′∣x)πθk(y′∣x)=β−1Tk(x,y′)+β−1λ(x)−1,\log\frac{\pi(y' \mid x)}{\pi_{\theta_k}(y' \mid x)} = \beta^{-1}T_k(x,y') + \beta^{-1}\lambda(x) - 1,

and exponentiating gives π(y′∣x)∝πθk(y′∣x)exp⁡(β−1Tk(x,y′))\pi(y' \mid x) \propto\pi_{\theta_k}(y' \mid x) \exp(\beta^{-1}T_k(x,y')), which is strictly positive on Yx\mathcal{Y}_x; hence the non-negativity constraints π(y′∣x)≥0\pi(y' \mid x) \ge0 are inactive and require no additional multiplier. Enforcing normalization determines the multiplier and yields the optimum (15),

π∗(y′∣x)=1Z(x)πθk(y′∣x)exp⁡(β−1Tk(x,y′)),Z(x)=∑y′∈Yxπθk(y′∣x)exp⁡(β−1Tk(x,y′)).\pi^*(y' \mid x) = \frac{1}{Z(x)}\pi_{\theta_k}(y' \mid x)\exp(\beta^{-1}T_k(x,y')), \qquad Z(x) = \sum_{y' \in\mathcal{Y}_x} \pi_{\theta_k}(y' \mid x)\exp(\beta^{-1}T_k(x,y')).

Inverting this relation expresses the critic as an implicit function of the policy,

Tk(x,y′∣θ)=βlog⁡πθ(y′∣x)πθk(y′∣x)+βlog⁡Z(x).T_k(x,y' \mid\theta) = \beta\log\frac{\pi_\theta(y' \mid x)}{\pi_{\theta_k}(y' \mid x)} + \beta\log Z(x).

Substituting this parameterization for both the real score Tk(x,y∣θ)T_k(x,y \mid\theta) and the synthetic score Tk(x,y′∣θ)T_k(x,y' \mid\theta) into the critic objective (12) gives (16).

Instantiations of ff-Divergence

We present three choices of convex function gg that yield well-known ff-divergences, along with their Fenchel conjugates.

KL Divergence

Definition: g(u)=ulog⁡u−u+1g(u) = u \log u - u + 1 for u>0u > 0, with g(0)=1g(0) = 1.

Verification: We verify that Df(P∥Q)D_f(P\|Q) recovers the KL divergence:

Df(P∥Q)=∫q(u)⋅(p(u)q(u)log⁡p(u)q(u)−p(u)q(u)+1) du=∫p(u)log⁡p(u)q(u) du−∫p(u) du+∫q(u) du=∫p(u)log⁡p(u)q(u) du−1+1=DKL(P∥Q)\begin{aligned} D_f(P\|Q) = \int q(u) \cdot\left(\frac{p(u)}{q(u)} \log\frac{p(u)}{q(u)} - \frac{p(u)}{q(u)} + 1\right)\,du \\ &= \int p(u) \log\frac{p(u)}{q(u)}\,du - \int p(u)\,du + \int q(u)\,du \\ &= \int p(u) \log\frac{p(u)}{q(u)}\,du - 1 + 1 = D_{\mathrm{KL}}(P\|Q) \end{aligned}

Fenchel conjugate: We compute g∗(v)=sup⁡u≥0{uv−g(u)}g^*(v) = \sup_{u \ge0}\{uv - g(u)\}:

g∗(v)=sup⁡u≥0{uv−ulog⁡u+u−1}g^*(v) = \sup_{u \ge0}\{uv - u \log u + u - 1\}

Taking the derivative and setting it to zero:

ddu(uv−ulog⁡u+u−1)=v−log⁡u=0\frac{d}{du}(uv - u \log u + u - 1) = v - \log u = 0

This yields u∗=ev>0u^* = e^v > 0 for all v∈Rv \in\mathbb{R}. Substituting back:

g∗(v)=ev⋅v−evlog⁡(ev)+ev−1=ev−1g^*(v) = e^v \cdot v - e^v \log(e^v) + e^v - 1 = e^v - 1

Since g′(u)=log⁡ug'(u) = \log u, we have g+′(0)=lim⁡u→0+g′(u)=−∞g'_+(0) = \lim_{u \to0+} g'(u) = -\infty and g∞′=lim⁡u→+∞g′(u)=+∞g'_\infty= \lim_{u \to+\infty} g'(u) = +\infty, so the range of g′g' is all of R\mathbb{R} and the interior case applies for every vv. Thus:

f∗(v)=g∗(v)=ev−1,∀ v∈Rf^*(v) = g^*(v) = e^v - 1,\quad\forall\ v \in\mathbb{R}

Reverse KL divergence

Definition: g(u)=−log⁡u+u−1g(u) = -\log u + u - 1 for u>0u > 0.

Verification: We verify that Df(P∥Q)D_f(P\|Q) recovers the reverse KL divergence:

Df(P∥Q)=∫q(u)⋅(−log⁡p(u)q(u)+p(u)q(u)−1) du=−∫q(u)log⁡p(u)q(u) du+∫p(u) du−∫q(u) du=∫q(u)log⁡q(u)p(u) du+1−1=DKL(Q∥P)\begin{aligned} D_f(P\|Q) &= \int q(u) \cdot\left(-\log\frac{p(u)}{q(u)} + \frac{p(u)}{q(u)} - 1\right)\,du \\ &= -\int q(u)\log\frac{p(u)}{q(u)}\,du + \int p(u)\,du - \int q(u)\,du \\ &= \int q(u)\log\frac{q(u)}{p(u)}\,du + 1 - 1 = D_{KL}(Q\|P) \end{aligned}

Fenchel conjugate: We compute g∗(v)=sup⁡u>0{uv−g(u)}g^*(v) = \sup_{u > 0}\{uv - g(u)\}:

g∗(v)=sup⁡u>0{uv+log⁡u−u+1}g^*(v) = \sup_{u > 0}\{uv + \log u - u + 1\}

Taking the derivative and setting it to zero:

ddu(uv+log⁡u−u+1)=v+1u−1=0⇒u∗=11−v\frac{d}{du}(uv + \log u - u + 1) = v + \frac{1}{u} - 1 = 0 \quad\Rightarrow\quad u^* = \frac{1}{1-v}

This requires 1−v>01-v > 0, i.e., v<1v < 1. Substituting back:

g∗(v)=v1−v+log⁡11−v−11−v+1=−log⁡(1−v)g^*(v) = \frac{v}{1-v} + \log\frac{1}{1-v} - \frac{1}{1-v} + 1 = -\log(1-v)

Since g′(u)=−1u+1g'(u) = -\frac{1}{u} + 1, we have g+′(0)=−∞g'_+(0) = -\infty and g∞′=lim⁡u→+∞g′(u)=1g'_\infty= \lim_{u \to+\infty} g'(u) = 1, so the range of g′g' is (−∞,1)(-\infty,1). Thus:

f∗(v)=g∗(v)=−log⁡(1−v)(v<1),f∗(v)=+∞(v≥1)f^*(v) = g^*(v) = -\log(1-v)\quad(v < 1), \qquad f^*(v) = +\infty\quad(v \ge1)

Squared Hellinger distance

Definition: g(u)=(u−1)2=u−2u+1g(u) = (\sqrt{u} - 1)^2 = u - 2\sqrt{u} + 1 for $u \ge 0.

Verification: We verify that Df(P∥Q)D_f(P\Vert Q) recovers the squared Hellinger distance:

Df(P∥Q)=∫q(u)⋅(p(u)q(u)−1)2du=∫q(u)⋅(p(u)q(u)−2p(u)q(u)+1)du=∫p(u) du−2∫p(u)q(u) du+∫q(u) du=2(1−∫p(u)q(u) du)=H2(P,Q)\begin{aligned} D_f(P\Vert Q)=\int q(u)\cdot\left(\sqrt{\frac{p(u)}{q(u)}}-1\right)^2du \\ &=\int q(u)\cdot\left(\frac{p(u)}{q(u)}-2\sqrt{\frac{p(u)}{q(u)}}+1\right)du \\ &=\int p(u)\,du-2\int\sqrt{p(u)q(u)}\,du+\int q(u)\,du \\ &=2\left(1-\int\sqrt{p(u)q(u)}\,du\right)=H^2(P,Q) \end{aligned}

Fenchel conjugate: We compute g∗(v)=sup⁡u≥0{uv−g(u)}g^*(v)=\sup_{u\ge0}\{uv-g(u)\}:

g∗(v)=sup⁡u≥0{uv−u+2u−1}g^*(v)=\sup_{u\ge0}\{uv-u+2\sqrt{u}-1\}

Let s=u≥0s=\sqrt{u}\ge0, so u=s2u=s^2. The objective becomes s2v−s2+2s−1s^2v-s^2+2s-1. Taking the derivative with respect to ss:

dds(s2v−s2+2s−1)=2s(v−1)+2=0⇒s∗=11−v\frac{d}{ds}\left(s^2v-s^2+2s-1\right)=2s(v-1)+2=0\quad\Rightarrow\quad s^*=\frac{1}{1-v}

This requires 1−v>01-v>0, i.e., v<1v<1, ensuring s∗>0s^*>0. Thus u∗=(s∗)2=1(1−v)2u^*=(s^*)^2=\frac{1}{(1-v)^2}. Substituting back:

g∗(v)=v(1−v)2−1(1−v)2+21−v−1=v1−vg^*(v)=\frac{v}{(1-v)^2}-\frac{1}{(1-v)^2}+\frac{2}{1-v}-1=\frac{v}{1-v}

Since g′(u)=1−1ug'(u)=1-\frac{1}{\sqrt{u}}, we have g+′(0)=−∞g'_+(0)=-\infty and g∞′=lim⁡u→+∞g′(u)=1g'_\infty=\lim_{u\to+\infty}g'(u)=1, so the range of g′g' is (−∞,1)(-\infty,1). Thus:

f∗(v)=g∗(v)=v1−v(v<1),f∗(v)=+∞(v≥1)f^*(v)=g^*(v)=\frac{v}{1-v}\quad(v<1),\qquad f^*(v)=+\infty\quad(v\ge1)

Additional Experiment Result

Implementation and Hyperparameter Details

We employ SmolLM-135M, SmolLM-360M, and SmolLM-1.7B as backbone LLMs, which are among the strongest open-weight small-scale models. All models are fine-tuned using the AdamW optimizer (Loshchilov & Hutter, [25]) with a linear warmup schedule. Training runs for 2000 steps across most datasets; Fakejob posts requires 20000 steps due to longer convergence time. The learning rate is selected from {1×10−3,5×10−5}\{1\times10^{-3}, 5\times10^{-5}\} per dataset. All experiments are conducted on 2×2\timesNVIDIA A100 and 2×2\timesNVIDIA L40 GPUs. For each dataset, we tune the coefficient β\beta and the clamping threshold ϵ\epsilon via grid search over the same search space: {0.02,0.05,0.2,0.5,0.8}\{0.02, 0.05, 0.2, 0.5, 0.8\}. We construct a validation set using 10% of the normal training samples together with an equal number of pseudo-anomalies generated by the model, and select (β,ϵ)(\beta,\epsilon) by AUC-ROC on this validation set. This procedure remains fully unsupervised, as it does not use any real anomaly labels.

Following established benchmarks ([38] (Xu et al. 2023)), we construct training and test sets by randomly sampling 50% of normal data for training; the test set comprises the remaining normal instances and all ground-truth anomalies. For the 20 Newsgroups dataset, we follow the configuration outlined in ADBench (Han et al., [11]): we use six top-level categories (computer, recreation, science, miscellaneous, politics, and religion), conduct six experiments with each category as normal and the others as anomalies (downsampled to 5% of total instances), and report average performance across the six experiments.

We report the model performance using Area Under the Receiver Operating Characteristic Curve (AUC-ROC), F1-score and Area Under the Precision-Recall Curve (AUC-PR). Anomaly scores are computed as negative log-likelihood of serialized token sequences under the fine-tuned model, averaged over r=21r=21 random column permutations (Tsai et al., [41]).

Training and Inference Cost

DiSPaT introduces additional training cost relative to AnoLLM because each self-play iteration evaluates log-probabilities under both the current policy and the reference policy, and trains on both real and synthetic samples. This overhead is expected and is not specific to our method; it is the standard cost of DPO/SPIN-style preference optimization. In our implementation, the per-iteration cost is approximately constant because the amount of real and synthetic data remains fixed across iterations.

Table 6 reports wall-clock training time and total FLOPs for DiSPaT and AnoLLM using SmolLM-135M on a single NVIDIA A40 48GB GPU. DiSPaT is consistently more expensive during training, with the gap becoming larger on datasets with longer serialized sequences such as Fakejob. At inference time, however, DiSPaT uses the same r=21r = 21 permutation protocol as AnoLLM, so both methods incur the same inference cost when the same backbone is used. As discussed in AnoLLM, batched GPU training makes LLM-based methods practically comparable to deep tabular baselines in training time, while inference remains slower than efficient classical baselines because it requires repeated autoregressive likelihood evaluation. This trade-off can be adjusted by reducing rr, at the cost of some accuracy. Since training is performed once offline, we view the additional training cost as acceptable given the consistent performance gains. One practical direction for reducing deployment cost is to distill a larger self-play-refined model into a smaller backbone, following recent progress in LLM distillation ([48] (Vuong et al. 2026)).

DatasetAnoLLM TimeDiSPaT TimeAnoLLM FLOPsDiSPaT FLOPs
Ecoli4.128.51.5×10151.5 \times10^{15}3.7×10163.7 \times10^{16}
Lymphography4.430.93.1×10153.1 \times10^{15}1.7×10161.7 \times10^{16}
20 Newsgroups4.735.23.2×10153.2 \times10^{15}4.1×10164.1 \times10^{16}
Vehicle6.648.36.4×10156.4 \times10^{15}8.4×10168.4 \times10^{16}
Seismic9.767.69.8×10159.8 \times10^{15}1.2×10171.2 \times10^{17}
Fakejob98.8671.38.4×10168.4 \times10^{16}7.7×10177.7 \times10^{17}

Table 6. Training time and total FLOPs of AnoLLM and DiSPaT on six datasets using SmolLM-135M on a single NVIDIA A40 48GB GPU. Training time is reported in minutes.

Additional Comparison with Recent Baselines

To address the lack of recent baselines, we additionally compare DiSPaT against five recent methods on the 21 datasets shared across all works: MCM ([51]), NPT-AD ([40]), DRL (Ye et al., 2025), LLM-DAS (Ye et al., 2026), and CausalTAD ([45]). Results for MCM, NPT-AD, DRL, and LLM-DAS are taken directly from the reported results in LLM-DAS, while results for CausalTAD are taken directly from the reported results in CausalTAD. Table 7 reports the detailed AUC-ROC scores, along with the average score and the number of datasets on which DiSPaT achieves a higher or equal result.

DatasetDiSPaT-360MMCMNPT-ADDRLLLM-DASCausalTAD
Annthyroid93.168.986.892.490.789.3
Arr84.381.171.977.477.683.6
Breast99.699.698.599.762.099.7
Glass82.372.378.869.791.167.1
Ionosphere92.797.397.498.499.925.2
Lymphography100.092.699.9100.090.799.3
Mammography88.490.588.794.6100.087.6
Musk100.097.5100.0100.058.2100.0
Optdigits95.099.593.299.794.997.2
Pendigits96.599.299.999.873.989.2
Pima70.376.475.576.567.866.7
Satellite90.279.680.683.298.484.3
Satimage99.999.9100.099.799.8100.0
Shuttle100.099.899.399.940.2100.0
Speech48.244.159.358.298.562.5
Thyroid99.398.097.999.119.297.6
Vertebral80.437.753.562.255.963.1
Vowels95.565.399.485.196.673.1
WBC95.598.196.299.693.396.9
Wine96.295.496.2100.045.6100.0
Yeast80.342.646.951.276.754.3
Average89.982.686.687.977.782.7
Win/Tie-13/210/211/215/013/2

Table 7. Detailed AUC-ROC scores (%) comparing DiSPaT against recent state-of-the-art baselines across 21 overlapping datasets. The best and second-best results in each row are highlighted in red and blue, respectively. The “Win/Tie” row indicates the number of datasets where DiSPaT outperforms or ties with the respective baseline. All baseline results are taken directly from the reported results in LLM-DAS (Ye et al., 2026) and CausalTAD [45].

DiSPaT attains the highest average AUC-ROC, outperforming MCM on 13 datasets with 2 ties, NPT-AD on 10 datasets with 2 ties, DRL on 11 datasets with 2 ties, LLM-DAS on 15 datasets, and CausalTAD on 13 datasets with 2 ties. The average AUC-ROC margin ranges from 2.0% to 12.2%, showing that DiSPaT remains competitive against recent methods from ICLR 2024, ICML 2024, ICLR 2025, and ICLR 2026.

LLM-DAS and DiSPaT use LLMs in fundamentally different ways. LLM-DAS treats the LLM as a code generator that synthesizes anomaly-detection pipelines, whereas DiSPaT uses the LLM itself as the detector and refines its generative distribution through self-play. CausalTAD is closer in starting point, as it also builds on AnoLLM, but it focuses on improving the serialization order by injecting causal knowledge and reweighting columns according to their causal importance. DiSPaT instead addresses the training paradigm itself: it follows AnoLLM’s random-permutation protocol and replaces one-shot fine-tuning with iterative self-play. These directions are therefore orthogonal and potentially complementary.

Experiment on ODDS Library

To complement the mixed-type benchmark reported in the main text, we evaluate DiSPaT on 30 additional numerical datasets from the ODDS library. Detailed per-dataset AUC-ROC, F1, and AUC-PR scores are listed in Table 8–Table 10. Baseline results are taken from ([41]) (see table captions for exceptions and implementation notes).

DatasetsIforestPCAKNNECODDeepSVDDRCASLADGOADNeuTralICLDTEREPEN135M AnoLLM135M DiSPaT360M AnoLLM360M DiSPaT1.7B AnoLLM1.7B DiSPaT
Annthyroid92.283.981.179.074.271.876.157.281.384.297.773.692.792.993.193.193.094.0
Arrhythmia82.779.678.681.176.578.678.468.176.078.577.168.482.581.482.284.382.482.4
BreastW99.498.899.299.297.498.798.699.498.399.298.295.599.299.699.399.699.199.4
Cardio94.896.692.193.584.294.884.052.485.989.492.082.994.094.987.391.786.787.7
Ecoli85.685.687.777.688.788.388.288.186.088.782.187.077.794.980.496.879.195.1
ForestCover87.094.598.592.153.394.485.727.889.897.797.890.288.192.283.591.388.788.9
Glass80.271.384.969.382.471.979.057.493.388.779.975.581.982.679.782.381.882.5
Heart81.984.281.465.977.378.582.283.881.178.783.144.982.079.779.980.780.383.3
Http99.299.9100.097.999.099.599.999.697.3100.099.599.4100.0100.0100.0100.0100.0100.0
Ionosphere89.189.496.073.496.391.696.095.095.697.096.454.590.996.492.492.791.893.0
LETTER63.152.986.556.777.671.690.881.192.995.987.259.796.783.786.780.277.284.2
Lymphography67.382.686.083.089.991.996.481.784.782.790.980.896.8100.099.3100.099.5100.0
Mammography88.190.087.290.685.787.374.075.669.078.286.486.391.587.287.688.487.488.1
Mulcross99.9100.0100.096.0100.0100.096.9100.096.8100.0100.097.3100.0100.0100.0100.0100.0100.0
Musk97.1100.0100.095.6100.0100.0100.0100.0100.0100.0100.072.2100.0100.0100.0100.0100.0100.0
Optdigits82.457.494.460.675.380.073.584.797.995.588.860.798.394.593.995.088.895.9
Pendigits97.194.299.992.883.896.793.222.096.397.198.292.297.197.796.496.593.096.0
Pima72.071.174.158.759.370.458.466.576.369.766.268.866.370.965.470.365.372.1
Satellite80.766.287.458.280.073.486.479.585.985.478.974.090.288.787.790.285.889.8
Satimage-299.397.999.996.596.199.899.799.486.199.798.899.8100.099.999.999.999.9100.0
Seismic69.269.273.869.271.372.771.471.768.171.971.472.471.273.274.675.774.074.6
Shuttle99.694.999.999.399.799.699.899.099.799.999.899.2100.099.9100.099.999.9100.0
Smtp90.580.993.688.078.084.592.691.189.088.595.389.492.792.192.991.992.493.0
Speech47.847.148.647.156.347.251.155.060.958.251.353.147.048.147.048.247.047.4
Thyroid98.998.497.697.886.996.994.868.988.698.799.090.497.597.798.399.399.199.3
Vertebral44.649.440.647.447.847.848.351.654.554.357.024.756.563.940.880.439.252.2
Vowels77.964.497.559.789.589.196.992.598.897.998.375.398.296.093.895.593.394.9
WBC94.794.994.790.790.494.692.866.376.590.891.377.096.494.895.295.595.795.0
Wine93.092.795.272.985.489.996.496.196.094.497.483.590.997.285.196.287.696.0
Yeast86.385.080.278.770.681.641.623.562.971.378.169.974.477.873.080.375.475.7
Average84.782.687.979.081.884.884.174.585.587.787.976.688.489.486.590.586.189.4

Table 8. Detailed AUC-ROC scores comparing DiSPaT against baselines over 30 datasets in ODDS. The best and second-best results in each row are indicated in red and blue, respectively. All baseline results are reported directly from Tsai et al. [41].

Table 10. Detailed AUC-PR scores comparing DiSPaT against baselines over 30 datasets in ODDS. The best and second-best results in each row are indicated in red and blue, respectively. Baseline results are reported from [41], except for AnoLLM (SmolLM-1.7B) which is obtained using the official implementation as they were not available in the original report.

DatasetsClassical MethodsDeep-learning based MethodsLLM-based Methods
IforestPCAKNNECODDeepSVDDRCASLADGOADNeuTralICLDTEREPEN135M AnoLLM135M DiSPaT360M AnoLLM360M DiSPaT1.7B AnoLLM1.7B DiSPaT
Annthyroid64.655.046.340.644.138.346.128.643.555.583.534.363.164.464.869.069.470.8
Arrhythmia66.261.755.662.256.356.255.651.850.755.656.641.963.665.164.270.360.263.7
BreastW99.498.599.299.296.698.698.399.497.099.196.792.599.199.699.299.699.299.5
Cardio78.684.473.771.260.674.566.732.561.075.067.856.781.179.172.672.269.269.6
Ecoli8.616.073.918.92.417.611.01.243.066.477.79.320.653.612.765.439.377.3
ForestCover64.971.078.630.662.173.972.879.647.580.758.368.241.943.941.743.643.544.5
Glass19.816.724.224.226.318.720.815.048.437.422.616.524.721.123.424.725.234.7
Heart97.297.697.294.096.496.697.397.797.296.397.588.497.296.296.996.497.097.6
Http (KDDCUP99)49.691.199.525.458.840.391.061.836.499.558.353.697.096.695.696.092.797.5
Ionosphere89.891.296.776.996.793.296.995.895.997.797.253.493.397.393.294.594.294.9
Letter Recognition16.814.342.614.141.225.957.839.070.377.355.015.179.750.219.146.929.245.7
Lymphography23.262.472.036.568.078.379.569.768.171.874.769.785.6100.093.8100.097.697.6
Mammography39.244.339.954.844.731.212.623.29.428.737.826.859.245.136.446.939.143.6
Mulcross98.9100.0100.072.2100.0100.078.8100.081.699.8100.0100.0100.0100.0100.0100.0100.0100.0
Musk66.6100.0100.062.7100.0100.0100.0100.0100.0100.0100.017.5100.0100.0100.0100.0100.0100.0
Optdigits16.65.931.46.523.212.210.917.864.541.422.27.675.058.139.843.528.866.4
Pendigits54.437.695.839.541.651.629.22.640.865.650.931.962.367.755.456.942.563.4
Pima71.469.671.662.260.669.860.366.074.669.563.967.367.770.167.468.266.370.4
Satellite84.576.988.965.884.280.686.680.886.088.784.380.691.090.389.191.587.191.1
Satimage-293.090.198.074.590.597.790.398.082.896.752.695.298.898.197.498.196.598.8
Seismic23.521.625.624.422.625.024.123.919.325.022.424.923.626.928.129.127.928.3
Shuttle98.496.297.294.698.796.096.894.999.499.594.692.899.798.599.698.799.599.7
Smtp (KDDCUP99)1.045.445.960.85.844.146.944.158.237.746.740.365.862.264.557.659.063.6
Speech3.53.73.84.04.23.73.64.05.25.74.03.53.64.03.76.63.74.0
Thyroid78.379.169.663.556.064.968.640.133.082.286.038.569.682.674.092.884.787.9
Vertebral21.023.219.222.825.221.421.028.130.326.431.015.128.930.018.147.722.231.7
Vowels22.916.276.215.360.345.576.554.486.180.483.120.383.964.759.960.061.468.0
WBC84.287.681.458.674.780.871.140.822.671.464.023.587.383.575.389.075.881.4
Wine67.265.971.132.151.251.778.278.977.973.487.348.452.287.352.978.168.180.3
Yeast44.034.629.432.329.930.310.67.616.826.228.218.730.129.930.234.326.935.0
Average54.958.666.848.056.157.358.752.655.867.763.544.468.268.862.369.363.570.2

Table 10.

Across these benchmarks, DiSPaT frequently attains top or near-top performance on individual datasets and yields strong average scores across metrics and model scales. The results indicate that the proposed self-play refinement generalizes beyond mixed-type tables and remains competitive on predominantly numerical tasks, supporting the robustness claims made in the Experiments 4. While performance varies across datasets—reflecting inherent differences in data characteristics and anomaly patterns—the consistent improvements over AnoLLM across all three model scales validate the effectiveness of iterative self-play refinement for numerical tabular data.

Extended ff-Divergence Ablation

Table 11 extends the f∗f^{*}-ablation of § 4.2 to all six datasets using SmolLM-135M. The full benchmark corroborates the main-text findings: KL divergence (f∗(v)=ev−1f^{*}(v) = e^{v} - 1) leads on average across AUC-ROC, F1, and AUC-PR, while Identity (f∗(v)=vf^{*}(v) = v) lags; Reverse KL and Squared Hellinger sit between them. This ordering is preserved on Seismic and 20 Newsgroups—the advantage of ff-divergence variants over the Identity (SPIN) objective thus holds across the full benchmark. While isolated per-dataset differences exist—e.g., Squared Hellinger achieves the best F1 on Vehicle insurance—these do not alter the overall ranking, supporting the design choice of KL divergence as the default ff-divergence in DiSPaT.

f∗f^*MetricFakejobLymphographyVehicle insuranceEcoliSeismic20 NewsgroupsAverage
vvAUC-ROC84.2%99.3%59.0%92.3%73.2%91.3%83.2%
F134.9%83.3%16.9%44.4%32.4%46.4%43.1%
AUC-PR30.9%94.4%15.4%37.9%26.6%46.7%42.0%
ev−1e^v - 1AUC-ROC83.9%100.0%63.8%94.9%73.2%91.9%84.6%
F135.1%100.0%20.2%55.6%33.5%49.4%49.0%
AUC-PR30.7%100.0%17.5%53.6%26.9%49.8%46.4%
v1−v\frac{v}{1-v}AUC-ROC84.0%100.0%60.5%93.1%73.0%91.9%83.8%
F134.6%100.0%16.8%55.6%32.9%48.6%48.1%
AUC-PR30.9%100.0%15.6%51.1%27.0%48.6%45.5%
−log⁡(1−v)-\log(1-v)AUC-ROC83.8%97.7%62.8%94.9%73.1%91.8%84.0%
F134.4%83.3%23.2%55.6%33.5%48.6%46.4%
AUC-PR30.6%89.6%23.2%46.3%26.4%48.1%44.0%

Table 11. Performance comparison of SmolLM-135M with different ff-divergence choices across datasets. Metrics reported are AUC-ROC, F1-score, and AUC-PR.

Iteration Curves and Clamping Threshold ϵ\epsilon

Iteration Curves. Figure 3 shows F1 and AUC-PR scores of DiSPaT (SmolLM-135M) over self-play iterations on four datasets. We observe that all datasets improve over the SFT baseline within a few iterations, though the shape of the curve differs—some rise steadily, others dip then recover. The optimal iteration is dataset-dependent, and several runs peak before the final iteration, which supports using a small, fixed number of iterations as a default and suggests that validation-based iteration selection may be useful in practice. The convergence patterns reflect the iterative refinement process: initial improvements come from learning to distinguish synthetic pseudo-anomalies, while later iterations may show diminishing returns as the model’s understanding of normality stabilizes.

Figure 3. F1 scores (%) and AUC-PR scores (%) of DiSPaT across self-play iterations on four datasets using SmolLM-135M. SFT indicates initial model, and iter-kk refers to model after kk iterations of training.

Clamping Threshold. Figure 4 reports F1 and AUC-PR on Ecoli and Vehicle (SmolLM-360M) as the clamping threshold ϵ\epsilon varies. Clamping restricts the log-ratio so that synthetic samples with probability ratio close to 1 are not over-penalized as pseudo-anomalies; ϵ=0\epsilon= 0 applies no clamping and can therefore over-penalize “good” synthetic samples, while overly large ϵ\epsilon shrinks the effective contrast between normal and synthetic samples in the objective. The figure shows that moderate positive values of ϵ\epsilon yield the best performance and that large ϵ\epsilon degrades it. The results support the use of a moderate clamping threshold in the main setup and indicate that the method is robust to the exact value within that range.

Figure 4. Effect of clamping threshold ϵ\epsilon on F1 scores (%) and AUC-PR scores (%) on two datasets using SmolLM-360M.

Dataset Information

Table 12 summarizes all datasets used in this work. Datasets are drawn from the AnoLLM benchmark [41] and the ODDS library [34], which may include textual, numerical, or categorical features. Columns report the number of samples, counts of textual features, numerical features, and categorical features, and the number and percentage of anomalies.

DatasetSamplesTextualNumericalCategoricalAnomalies (%)
20 Newsgroup11905100591 (5.0%)
Annthyroid7200060534 (7.42%)
Arrhythmia4520274066 (15%)
BreastW683090239 (35%)
Cardio18310210176 (9.6%)
Ecoli3360709 (2.6%)
Fakejob17880538866 (4.8%)
ForestCover28604801002747 (0.9%)
Glass2140909 (4.2%)
Heart224044010 (4.4%)
Http (KDDCUP99)5674790302211 (0.4%)
Ionosphere3510330126 (36%)
Letter Recognition16000320100 (6.25%)
Lymphography14803156 (4.1%)
Mammography11183060260 (2.32%)
Mulcross26214404026214 (10%)
Musk30620166097 (3.2%)
Optdigits52160640150 (3%)
Pendigits68700160156 (2.27%)
Pima768080268 (35%)
Satellite643503602036 (32%)
Satimage-25803036071 (1.2%)
Seismic25840144170 (6.6%)
Shuttle490970903511 (7%)
Smtp (KDDCUP99)9515603030 (0.03%)
Speech36860400061 (1.65%)
Thyroid377206093 (2.5%)
Vehicle154200824923 (6.0%)
Vertebral24006030 (12.5%)
Vowels1456012050 (3.4%)
WBC278030021 (5.6%)
Wine129013010 (7.7%)
Yeast136408064 (4.7%)

Table 12. Statistics for all datasets used in this work. Datasets are drawn from the AnoLLM benchmark [41] and the ODDS library [34].

Examples of Model-Generated Samples

We present examples from three datasets: Fakejob (mixed: textual, numerical, categorical), Ecoli (numerical), and Vehicle (mixed: numerical, categorical). For each sample, we first draw a permutation π∈Sd\pi\in S_d and serialize the row accordingly. We then randomly partition the serialized features into context and target sets. The context features are preserved as the input xx, while the target features form the continuation yy to be generated sequentially. Concretely, the model predicts target features using prompts of the form feature is value, ..., conditioning on the preserved context and on previously generated target features. Because π\pi is resampled during training, both the feature ordering and the induced context-continuation split vary across permutations. As a result, the same feature may appear in either the context or the continuation under different permutations, encouraging the model to learn dependencies across many possible orderings.

This variation can be seen directly in Figure 5. In the Fakejob example, iteration 0 uses benefits, telecommuting, and has questions as targets; iteration 1 uses company profile, industry, and salary range; and iteration 2 uses description, function, and telecommuting. The preserved context changes accordingly. The same principle applies to the Ecoli and Vehicle examples below, where different sampled permutations expose different subsets of features as targets at each iteration.

Iterative refinement of synthetic samples through self-play

Figure 5. Iterative refinement of synthetic samples through self-play (Fakejob dataset). At iteration 0, the model generates severely oversimplified values (e.g., benefits = "$11" instead of a detailed description) and incorrect values (e.g., has questions = -1.0 instead of 1.0), clearly marking them as pseudo-anomalies. By iteration 1, the model generates structured values but lacks detail and context coherence (e.g., company profile = "Planning Centre" vs. a detailed company description; industry = "Computer Games" which mismatches the Design job context). By iteration 2, some features are correctly generated (e.g., function, telecommuting), but textual fields remain generic rather than job-specific. This progression demonstrates how self-play enables the model to learn increasingly subtle distinctions between synthetic and real normal samples.

DatasetsClassical MethodsDeep-learning based MethodsLLM-based Methods
IforestPCAKNNECODDeepSVDDRCASLADGOADNeuTralICLDTEREPEN135M AnoLLM135M DiSPaT360M AnoLLM360M DiSPaT1.7B AnoLLM1.7B DiSPaT
Annthyroid57.448.744.038.843.636.741.825.746.850.178.933.858.459.259.762.062.664.6
Arrhythmia61.254.255.459.153.354.253.650.351.553.352.145.261.260.460.062.162.160.7
BreastW96.995.996.395.493.695.995.196.696.795.996.393.595.897.196.697.196.796.7
Cardio71.580.867.666.656.472.660.229.456.868.964.456.173.472.266.565.963.464.2
Ecoli75.677.877.831.153.377.877.877.851.171.166.075.633.355.633.377.835.677.8
ForestCover10.915.874.523.83.518.913.60.142.676.977.86.425.627.121.324.018.620.2
Glass15.613.317.815.624.415.617.813.342.228.913.36.717.821.117.822.215.622.2
Heart91.792.290.689.390.690.891.391.090.491.091.487.691.291.490.791.590.991.0
Http (KDDCUP99)10.792.699.42.245.938.292.943.819.399.334.920.498.997.095.896.293.498.2
Ionosphere79.778.989.466.089.583.289.485.488.290.690.059.582.189.783.884.484.385.7
Letter Recognition17.613.643.414.640.429.054.840.463.672.258.816.473.466.248.647.432.040.1
Lymphography23.356.766.740.056.766.766.766.763.366.766.766.776.7100.080.0100.083.383.3
Mammography41.347.440.953.544.335.813.828.713.529.836.429.455.144.242.845.441.542.5
Mulcross99.5100.0100.074.7100.099.976.0100.085.299.6100.081.6100.0100.0100.0100.0100.0100.0
Musk61.6100.0100.054.6100.0100.0100.0100.0100.0100.0100.015.0100.0100.0100.0100.0100.0100.0
Optdigits15.90.128.42.729.72.14.016.563.947.116.42.072.050.744.346.734.063.3
Pendigits55.144.291.042.744.553.035.60.046.761.060.637.355.957.150.552.636.756.4
Pima67.268.869.257.857.067.258.562.869.567.062.466.862.664.662.066.061.768.3
Satellite69.661.476.253.871.068.576.069.375.175.772.369.179.879.877.480.375.379.8
Satimage-287.384.893.571.888.494.982.595.55.191.850.191.692.294.494.494.492.695.8
Seismic25.126.629.128.225.832.028.529.519.529.923.930.627.933.531.635.934.132.4
Shuttle96.495.897.791.798.396.997.596.598.298.397.493.698.398.198.497.898.498.4
Smtp (KDDCUP99)0.066.766.766.79.365.366.766.760.749.366.760.766.765.466.766.766.765.0
Speech3.04.95.64.93.64.93.93.94.97.55.21.36.66.66.26.66.66.6
Thyroid78.972.364.362.655.760.063.941.735.077.880.434.668.278.572.589.279.681.7
Vertebral18.720.714.021.328.016.016.030.032.719.330.01.328.730.018.046.716.733.3
Vowels24.820.068.422.054.842.471.646.076.874.078.024.476.064.855.660.060.066.0
WBC81.979.071.456.270.572.466.738.118.173.361.921.979.078.476.285.771.476.2
Wine70.062.037.038.042.060.072.076.070.062.072.044.050.080.052.070.062.070.0
Yeast48.642.133.733.531.035.28.41.018.133.132.815.832.035.831.039.029.942.1
Average51.957.264.846.053.556.256.650.853.565.161.243.064.766.661.167.860.266.1

Table 9. Detailed F1 scores comparing DiSPaT against baselines over 30 datasets in ODDS. The best and second-best results in each row are indicated in red and blue, respectively. Baseline results are reported from [41], except for AnoLLM (SmolLM-1.7B) which is obtained using the official implementation as they were not available in the original report.

Figure 5 shows iterative refinement on mixed features (Fakejob). At iteration 0, the model generates oversimplified values (e.g., benefits = “$11”) or incorrect ones (e.g., has questions = -1.0). By iteration 1, values become more structured but lack detail. By iteration 2, some features are correct while others remain generic.

Figure 6 shows results on numerical features (Ecoli). At iteration 0, the model produces malformed values with formatting errors (e.g., “0.” with trailing punctuation). By iteration 1, values are properly formatted but magnitudes are incorrect. By iteration 2, formatting is correct but subtle discrepancies remain.

Iterative refinement on numerical features

Figure 6. Iterative refinement on numerical features (Ecoli dataset). At iteration 0, the model generates malformed numerical values with formatting errors (e.g., “0 .” with trailing punctuation, or “0.1 . Both partial least squares...” with appended text), clearly marking them as pseudo-anomalies. By iteration 1, the model generates properly formatted numbers but with incorrect magnitudes (e.g., 1.7 instead of 1.2, 0.5 instead of -0.2). By iteration 2, while formatting is correct, subtle numerical discrepancies persist (e.g., 1.8 instead of 0.2, 1.7 instead of 1.2), demonstrating progressive refinement in learning numerical distributions.

Figure 7 shows results on mixed numerical and categorical features (Vehicle). At iteration 0, categorical values are incorrect (e.g., “3Sum” instead of “Sedan - Collision”) and numerical values are malformed. By iteration 1, categorical values improve but errors persist. By iteration 2, most categorical values are correct while numerical discrepancies remain.

Figure 7. Figure 7. Iterative refinement on mixed categorical and numerical features (Vehicle dataset). At iteration 0, the model generates incorrect categorical values (e.g., “3Sum” instead of “Sedan - Collision” for policy type, “1 to 2 years” instead of “5 years” for age of vehicle) and malformed numerical values (e.g., “0.4” instead of “Wednesday” for day of week, “0.6” instead of 0.2 for week of month claimed), clearly marking them as pseudo-anomalies. By iteration 1, categorical values improve but still contain errors (e.g., “No” instead of “Sedan - Collision” for policy type, “50” instead of “5 years” for age of vehicle, “Male” instead of “External” for agent type). By iteration 2, most categorical values are correct, but subtle numerical discrepancies persist (e.g., “7 years” instead of “5 years” for age of vehicle, “0.2” instead of -0.6 for week of month), demonstrating progressive refinement in learning both categorical and numerical distributions.

The sequential approach preserves column names, ensures coherence through conditional generation, and enables iterative refinement via self-play. Examples show progressive improvement from clearly anomalous values at iteration 0 to more realistic but still distinguishable values at later iterations.

Related Works

Tabular anomaly detection has been extensively studied, with methods ranging from classical statistical approaches to recent deep learning models. Classical methods include isolation forest [23], empirical-cumulative-distribution-based outlier detector (ECOD) (Li et al., 2022), and kk-nearest neighbors (KNN) [33]. Earlier kernel-based novelty-detection research developed explicit geometric data descriptions around the normal region, including hypersphere models with separately adjustable inner and outer margins for imbalanced settings (Le et al., 2010), multiple spherical boundaries for multi-modal normal data (Le et al., 2011), semi-supervised SVDD with fuzzy memberships and entropy for partially labeled data (Le et al., 2013), and cutting-plane accelerations for scalable one-class SVM training (Le et al., 2015).

Deep-learning-based approaches include margin-based methods such as DeepSVDD [35] and self-supervised learning methods such as REPEN [28] and SLAD (Xu et al., 2023). More recent tabular anomaly detectors have substantially strengthened this line of work. MCM [51] extends masked modeling to tabular anomaly detection and learns multiple masking patterns to capture diverse feature correlations. NPT-AD (Thimioner et al., 2024) leverages both feature-feature and sample-sample dependencies through a non-parametric transformer-based reconstruction framework. DRL (Ye et al., 2025) improves discrimination by remapping samples into a decomposed latent space designed to separate shared normal patterns from anomalous variation. These methods are strong tabular baselines, but they are primarily developed for conventional tabular representations and do not directly exploit the generative and semantic capabilities of LLMs on heterogeneous rows containing text, categorical values, and numerical attributes.

Large language models (LLMs) have recently become an attractive foundation for mixed-type tabular anomaly detection because they can operate on a serialized representation of each row and naturally exploit the semantics of categorical values and raw text [7] (Hegselmann et al. 2023). Previous work demonstrates that LLMs can effectively handle tabular prediction tasks through text serialization [7], while few-shot classification on tabular data benefits from serialization strategies that preserve semantic relationships (Hegselmann et al., 2023). AnoLLM [41] applies LLMs to tabular anomaly detection by serializing rows into text templates, discretizing numerical values, and fine-tuning LLMs on normal data via next-token prediction. LLM-DAS (Ye et al., 2026) uses LLMs in a different way: rather than treating the LLM as the detector itself, it uses the LLM as an algorithmist to synthesize detector-specific anomaly-generation programs that strengthen downstream anomaly detectors. CausalTAD [45] stays closer to the AnoLLM setting, but focuses on improving the serialization order by injecting causal knowledge and reweighting columns according to their causal importance. In contrast, DiSPaT addresses the training paradigm itself. Rather than relying on one-shot likelihood maximization on normal data, it introduces iterative self-play to refine the model’s description of normality through progressively harder model-generated not-normal samples. This distinction is important because our goal is not to redesign the detector architecture or the serialization order, but to strengthen the learning signal available to LLM-based tabular anomaly detection.

Our theoretical framework builds upon foundational works in divergence minimization and self-play optimization. The framework of ff-divergences provides a general framework for measuring distributional differences [5, 21]. GAN objectives can be generalized to arbitrary ff-divergences through variational lower bounds [27]. We extend this framework to the conditional setting where distributions depend on context, providing explicit approximation bounds. Self-play mechanisms have been successfully applied to language model alignment. SPIN [4] introduces a self-play fine-tuning approach where models learn by distinguishing their own generations from ground-truth data, providing a learning signal without external annotations. Direct Preference Optimization (DPO) [32] simplifies preference learning by directly optimizing a binary classification objective. Related ideas on strengthening alignment or mitigating representation bias under indirect or limited supervision also appear in other settings, including neural topic modeling and few-shot continual relation extraction [43, 30]. The idea of using synthetic samples as negative examples has been explored in semi-supervised anomaly detection. Synthetic anomalies can be generated via data augmentation [36], while deviation networks learn from both normal and synthetic anomalous samples [29]. Synthetic anomalies can also be generated through adversarial perturbations [6]. We adapt these mechanisms to unsupervised tabular anomaly detection by minimizing ff-divergence between normal data and model-generated distributions, where self-play generates pseudo-anomalies that serve as negative examples, enabling unsupervised learning without requiring anomaly labels or external generators.

References

  1. [1]Bergman, L. and Hoshen, Y. Classification-based anomaly detection for general data. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.arxiv.org/abs/2005.02359
  2. [2]Buczak, A. L. and Guven, E. A survey of data mining and machine learning methods for cyber security intrusion detection. IEEE Communications Surveys & Tutorials, 18(2):1153–1176, 2015.DOI
  3. [3]Chandola, V., Banerjee, A., and Kumar, V. Anomaly detection: A survey. ACM Computing Surveys (CSUR), 41(3):1–58, 2009.
  4. [4]Chen, Z., Deng, Y., Yuan, H., Ji, K., and Gu, Q. Self-play fine-tuning converts weak language models to strong language models. In Proceedings of the International Conference on Machine Learning (ICML), pp. 6621–6642, 2024.arxiv.org/abs/2401.01335
  5. [5]Csiszár, I. and Shields, P. C. Information theory and statistics: A tutorial. Foundations and Trends in Communications and Information Theory, 1(4):417–528, 2004. doi: 10.1561/0100000004.DOI
  6. [6]Ding, C., Pang, G., and Shen, C. Catching both gray and black swans: Open-set supervised anomaly detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 7388–7398, 2022.arxiv.org/abs/2203.14506
  7. [7]Dinh, T., Zeng, Y., Zhang, R., Lin, Z., Gira, M., Rajput, S., Sohn, J.-y., Papailiopoulos, D., and Lee, K. LIFT: Language-interfaced fine-tuning for non-language machine learning tasks. In Advances in Neural Information Processing Systems (NeurIPS), volume 35, pp. 11763–11784, 2022.arxiv.org/abs/2206.06565
  8. [8]Fang, X., Xu, W., Tan, F. A., Zhang, J., Hu, Z., Qi, Y., et al. Large language models (LLMs) on tabular data: Prediction, generation, and understanding–a survey. arXiv preprint arXiv:2402.17944, 2024.arxiv.org/abs/2402.17944
  9. [9]Fernando, T., Gammulle, H., Denman, S., Sridharan, S., and Fookes, C. Deep learning for medical anomaly detection: A survey. ACM Computing Surveys (CSUR), 54(7):1–37, 2021.arxiv.org/abs/2012.02364
  10. [10]Grover, P., Xu, J., Tittelfitz, J., Cheng, A., Li, Z., Zablocki, J., Liu, J., and Zhou, H. Fraud Dataset Benchmark and applications, 2022.arxiv.org/abs/2208.14417
  11. [11]Han, S., Hu, X., Huang, H., Jiang, M., and Zhao, Y. AD-Bench: Anomaly detection benchmark. In Advances in Neural Information Processing Systems (NeurIPS), volume 35, pp. 32142–32159, 2022.
  12. [12]Hawkins, D. M. Identification of Outliers, volume 11. Springer, 1980.
  13. [14]Landauer, M., Onder, S., Skopik, F., and Wurzenberger, M. Deep learning for anomaly detection in log data: A survey. Machine Learning with Applications, 12:100470, 2023.DOI
  14. [21]Liese, F. and Vajda, I. On differences and informations in statistics and information theory. IEEE Transactions on Information Theory, 52(10):4394–4412, 2006. doi: 10.1109/TIT.2006.881731.DOI
  15. [22]Liu, B., Wang, D., Lin, K., Tan, P.-N., and Zhou, J. RCA: A deep collaborative autoencoder approach for anomaly detection. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 1505–1511, 2021.DOI
  16. [23]Liu, F. T., Ting, K. M., and Zhou, Z.-H. Isolation Forest. In Proceedings of the Eighth IEEE International Conference on Data Mining, pp. 413–422. IEEE, 2008.
  17. [24]Livernoche, V., Jain, V., Hezaheh, Y., and Ravanbakhsh, S. On diffusion modeling for anomaly detection. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2305.18593
  18. [25]Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
  19. [26]Ngai, E. W., Hu, Y., Wong, Y. H., Chen, Y., and Sun, X. The application of data mining techniques in financial fraud detection: A classification framework and an academic review of literature. Decision Support Systems, 50(3): 559–569, 2011.DOI
  20. [27]Nowozin, S., Cseke, B., and Tomioka, R. f-gan: Training generative neural samplers using variational divergence minimization. Advances in neural information processing systems, 29, 2016.arxiv.org/abs/1606.00709
  21. [28]Pang, G., Cao, L., Chen, L., and Liu, H. Learning representations of ultrahigh-dimensional data for random distance-based outlier detection. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2041–2050, 2018.DOI
  22. [29]Pang, G., Shen, C., and Van Den Hengel, A. Deep anomaly detection with deviation networks. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 353–362, 2019.arxiv.org/abs/1911.08623
  23. [30]Pham, T. D., Hai, N. L., Van, L. N., Diep, N. T. N., Dinh, S., and Nguyen, T. H. Mitigating non-representative prototypes and representation bias in few-shot continual relation extraction. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 10791–10809, 2025. doi: 10.18653/v1/2025.acl-long.530.DOI
  24. [31]Qiu, C., Pröffmer, T., Kloft, M., Mandt, S., and Rudolph, M. Neural transformation learning for deep anomaly detection beyond images. In Proceedings of the International Conference on Machine Learning (ICML), pp. 8703–8714. PMLR, 2021.arxiv.org/abs/2103.16440
  25. [32]Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems (NeurIPS), 36:53728–53741, 2023.arxiv.org/abs/2305.18290
  26. [33]Ramaswamy, S., Rastogi, R., and Shim, K. Efficient algorithms for mining outliers from large data sets. In Proceedings of the ACM SIGMOD International Conference on Management of Data, pp. 427–438, 2000.
  27. [34]Rayana, S. ODDS library. https://shebuti.com/outlier-detection-datasets-odds/, 2016. Stony Brook University, Department of Computer Science.
  28. [35]Ruff, L., Vandermeulen, R., Goernitz, N., Deecke, L., Siddiqui, S. A., Binder, A., Müller, E., and Kloft, M. Deep one-class classification. In Proceedings of the International Conference on Machine Learning (ICML), pp. 4393–4402. PMLR, 2018.
  29. [36]Ruff, L., Vandermeulen, R. A., Görnitz, N., Binder, A., Müller, E., Müller, K.-R., and Kloft, M. Deep semi-supervised anomaly detection. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.arxiv.org/abs/1906.02694
  30. [37]Schölkopf, B., Platt, J. C., Shawe-Taylor, J., Smola, A. J., and Williamson, R. C. Estimating the support of a high-dimensional distribution. Neural Computation, 13(7): 1443–1471, 2001.pubmed.ncbi.nlm.nih.gov/11440593
  31. [38]Shenkar, T. and Wolf, L. Anomaly detection for tabular data with internal contrastive learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2022.
  32. [39]Shyu, M.-L., Chen, S.-C., Sarinnapakorn, K., and Chang, L. A novel anomaly detection scheme based on Principal Component Classifier. In Proceedings of the IEEE Foundations and New Directions of Data Mining Workshop, pp. 172–179. IEEE Press Piscataway, NJ, USA, 2003.
  33. [40]Thimionier, H., Popineau, F., Rimmel, A., and Doan, B.-L. Beyond individual input for deep anomaly detection on tabular data. In Proceedings of the International Conference on Machine Learning (ICML), pp. 48097–48123, 2024.
  34. [41]Tsai, C.-P., Teng, G., Wallis, P., and Ding, W. AnoLLM: Large language models for tabular anomaly detection. In Proceedings of the International Conference on Learning Representations (ICLR), 2025.
  35. [43]Vuong, H. T., Le, T., Vu, T., Nguyen, T., Van, L. N., Dinh, S., and Nguyen, T. H. ICMPT: Improving neural topic models via optimal transport and contrastive learning. In Findings of the Association for Computational Linguistics: ACL 2025, pp. 13894–13920, 2025. doi: 10.18653/v1/2025.findings-acl.715.DOI
  36. [45]Wang, R., Liu, R., Chen, R., Suo, H., Peng, Z., Tang, Z., and Chen, C. CausalTAD: Injecting causal knowledge into large language models for tabular anomaly detection, 2026a.arxiv.org/abs/2602.07798
  37. [46]Wang, Y., Sun, H.-L., Huzhang, G., Chen, Q.-G., Xu, Z., Luo, W., Zhang, K., and Zhang, L. Triplets better than pairs: Towards stable and effective self-play fine-tuning for LLMs. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2026b.
  38. [48]Yang, Y., Tian, B., Yu, F., and He, Y. An anomaly detection model training method based on llm knowledge distillation. In Proceedings of the 2024 International Conference on Networking and Network Applications (NaNA), pp. 472–477. IEEE, 2024. doi: 10.1109/NaNA63151.2024.00084.DOI
  39. [51]Yin, J., Qiao, Y., Zhou, Z., Wang, X., and Yang, J. MCM: Masked cell modeling for anomaly detection in tabular data. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.

Paper details

vlnc:W_p6v5pxf7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents