In-Context Density Estimation for Tabular Data

Patryk Marszałek, Jacek Tabor, Marek Śmieja
8/10/2026
cs.LG

Official code: gmum/iced (1 star, Python, last commit 2026-09-14).

Abstract

Density estimation underlies many unsupervised tasks on tabular data such as anomaly detection, out-of-distribution detection, and data augmentation. Although all these problems reduce to questions about where probability mass lies, they are typically solved individually by fitting a separate model to each dataset, with its own hyperparameters and tuning budget.

Show full abstract

We introduce ICED, an in-context, energy-based density estimator that removes this per-dataset cost. ICED is a transformer-based model pretrained once on a synthetic prior built specifically for density estimation under an objective that fits log-density where it is informative and preserves its ordering elsewhere. In the inference, it reads a dataset as context and returns an unnormalized log-density for any query point in a single forward pass, with no fitting, sampling, or hyperparameter selection. A single frozen ICED model then drives four tasks usually handled by four specialized pipelines: density estimation, out-of-distribution detection, unsupervised anomaly detection, and generative augmentation. Across all four, it is competitive with the strongest task-specific method, while being the only approach that needs no retraining, no tuning, and no labels to move between them. The code is available at https://github.com/gmum/iced.

View on arXivView PDF

Code Implementations(1)

gmum/icedOfficial100%
10PythonAug 10, 20262 months ago

Similar Papers

Cite this paper

@article{marszaek2026incontext,
  title  = {In-Context Density Estimation for Tabular Data},
  author = {Patryk Marszałek and Jacek Tabor and Marek Śmieja},
  year   = {2026},
  eprint = {2608.09348},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.09348v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.09348.svg)](https://codeofpaper.com/paper/2608.09348)

Discussion