DMAP (ICLR 2026) is a mathematically grounded method that maps a text, via a language model, to a set of samples in the unit interval that jointly encode rank and probability information. This representation enables efficient, model-agnostic analysis and supports a range of applications.
DMAP works effectively with small evaluator language models such as OPT-125m that easily run on consumer hardware.
- π― Intuitive Visualization: transform text into simple, informative, representations for downstream analysis
- π§ Easy Integration: Simple API that works with popular NLP libraries (transformers, scikit-learn, etc.)
- π Rich Analytics: Built-in tools for quantitative and qualitative analysis of distribution patterns
- π¨ Customizable: Easily plug-in new visualisations or analysis methods
- π Interactive demo: Get up and running with DMAP in a few minutes
To install, simply run:
pip install git+https://github.com/Featurespace/dmap.git
Then, you may use DMAP as follows.
from dmap import DMAP # Create and fit DMAP. dmap = DMAP(evaluator_model='facebook/opt-125m') text_map = dmap.fit(["The robot was dancing in the rain"]) # Visualize your DMAP samples. dmap.plot()
For a more detailed example, we recommend cloning the repository and playing with our interactive demo.
If you use DMAP in your research, please cite our paper accepted at ICLR 2026:
@article{dmap2025, title={DMAP: A Distribution Map for Text}, author={Tom Kempton, Julia Rozanova, Parameswaran Kamalaruban, Maeve Madigan, Karolina Wresilo, Yoann Launay, David Sutton, and Stuart Burrell}, year={2026}, url={https://openreview.net/forum?id=SPElkPRurl} }