Grafy News
Try Grafy free

DiSPaT Introduces Self‑Play Fine‑Tuning for LLM‑Based Tabular Anomaly Detection

Grafy Research Lab's DiSPaT framework uses self‑play to improve large language model anomaly detection on mixed‑type tables, a method accepted at ICML 2026.

Illustration for the news story: DiSPaT Introduces Self‑Play Fine‑Tuning for LLM‑Based Tabular Anomaly DetectionSource: Grafy Research Lab

DiSPaT, a self‑play fine‑tuning framework for large language models (LLMs), was presented by a team from the Grafy Research Lab and accepted at ICML 2026. The method tackles long‑standing difficulties in detecting anomalies within heterogeneous tabular datasets, where rows combine numeric, categorical, and textual fields.

Why does tabular anomaly detection remain hard for LLMs?

Traditional anomaly detection relies on statistical models that assume homogeneous feature spaces. In real‑world tables, however, the mixture of data types makes it hard to define a single notion of "normal". Recent research has tried to bypass this by converting each row into a plain‑text sequence and feeding it to an LLM, treating the model as a generic pattern recogniser. According to the Grafy Research Lab paper, those approaches typically involve a one‑shot supervised fine‑tuning step that offers only a limited learning signal, leaving the model’s understanding of normality loosely anchored.

How does DiSPaT differ from earlier LLM‑based approaches?

DiSPaT departs from the one‑shot paradigm by introducing a self‑play loop where the model iteratively refines its own definition of normal data. Instead of a single fine‑tuning pass on labelled examples, the framework generates synthetic "normal" rows, evaluates them against the current model, and then uses the discrepancies as new training signals. This cyclical process tightens the decision boundary around genuine normal patterns while pushing anomalous configurations further away.

What is the self‑play fine‑tuning process?

The paper outlines three core stages:

  1. Serialization – Each table row is transformed into a textual prompt that preserves the original ordering and datatype cues (e.g., "age: 34, city: "Paris", comment: "good"").
  2. Self‑Play Generation – The LLM, seeded with the current model weights, produces candidate rows that it predicts to be normal. These candidates are sampled from the learned distribution rather than drawn from the original dataset.
  3. Contrastive Update – The model is fine‑tuned using a contrastive loss that rewards higher likelihood for generated rows that match the original data distribution and penalises those that deviate. The updated model then re‑enters the self‑play loop.

By repeating these steps, DiSPaT gradually narrows the space of rows it classifies as normal, leading to sharper anomaly scores.

What results did the authors report?

The authors evaluated DiSPaT on several benchmark tabular anomaly detection suites that include mixed‑type features. According to the paper, the self‑play framework achieved higher detection AUC scores than prior LLM‑based baselines, narrowing the performance gap with specialised tabular models. The improvement was most pronounced on datasets where textual fields carried significant semantic weight, confirming the benefit of an LLM that can reason over language‑rich columns. The work also demonstrated that the self‑play loop converges within a modest number of iterations, keeping computational overhead manageable for cloud‑based training pipelines.

How can Grafy users experiment with DiSPaT ideas?

Grafy provides several tools that make it straightforward to prototype the DiSPaT workflow:

  • Grafy Code – The AI‑assisted coding studio lets developers spin up a Jupyter‑style notebook, install the required LLM libraries, and run the self‑play loop on their own datasets. Example notebooks can be imported directly from the community gallery.
  • Grafy Reader – Researchers can upload the DiSPaT arXiv PDF, ask the model to summarise sections, or extract the exact loss formulation without leaving the platform. This speeds up the learning curve for anyone new to contrastive self‑play.
  • Grafy Chat – By prompting multiple LLMs side‑by‑side, users can compare how different model families (e.g., OpenRouter vs. Vertex AI) behave when asked to generate "normal" rows, giving a quick sanity check before committing to a full fine‑tuning run.

A practical starting point is to load the paper into Grafy Reader, pull out the serialization schema, and then build a small prototype in Grafy Code that runs a few self‑play iterations on a toy CSV. The modular nature of Grafy’s cloud model routing means you can experiment with cheaper models for early loops and switch to a larger model for final fine‑tuning, keeping costs under control.

Frequently asked questions

Does DiSPaT require labelled anomalies to work?

No. DiSPaT is designed as an unsupervised or weakly supervised method. It only needs a collection of rows that are assumed to be mostly normal; the self‑play loop generates its own contrastive signals without explicit anomaly labels.

Can the self‑play loop be applied to non‑LLM models?

While the paper focuses on LLMs because of their ability to handle textual columns, the underlying contrastive self‑play idea could be adapted to other generative models (e.g., diffusion models for numeric data). However, the authors did not explore those alternatives.

Is DiSPaT ready for production deployment?

The research demonstrates strong benchmark results and reasonable convergence speed, but the authors note that large‑scale deployment will need careful monitoring of generated synthetic rows to avoid drift. Grafy Code can help prototype the pipeline, and Grafy Watch could be employed to monitor model performance over time.


Source: Grafy Research Lab — f-Divergence Self-Play for Tabular Anomaly Detection via Large Language Models