A Fisher's exact test justification of the TF-IDF term-weighting scheme

Paul Sheridan, Zeyad Ahmed, Aitazaz A. Farooque
7/21/2025
cs.CLcs.IRmath.ST

No official code found. Best implementation: Sheridan-Stable/from-fisher-to-tfidf (2 stars, MIT, last commit 2025-11-06).

Abstract

Term frequency-inverse document frequency, or TF-IDF for short, is arguably the most celebrated mathematical expression in the history of information retrieval. Conceived as a simple heuristic quantifying the extent to which a given term's occurrences are concentrated in any one given document out of many, TF-IDF and its many variants are routinely used as term-weighting schemes in diverse text analysis applications. There is a growing body of scholarship dedicated to placing TF-IDF on a sound theoretical foundation. Building on that tradition, this paper justifies the use of TF-IDF to the statistics community by demonstrating how the famed expression can be understood from a significance testing perspective. We show that the common TF-IDF variant TF-ICF is, under mild regularity conditions, closely related to the negative logarithm of the $p$-value from a one-tailed version of Fisher's exact test of statistical significance. As a corollary, we establish a connection between TF-IDF and the said negative log-transformed $p$-value under certain idealized assumptions. We further demonstrate, as a limiting case, that this same quantity converges to TF-IDF in the limit of an infinitely large document collection. The Fisher's exact test justification of TF-IDF equips the working statistician with a ready explanation of the term-weighting scheme's long-established effectiveness.

View on arXivView PDF

Code Implementations(1)

MIT

Official repository for the research paper "A Fisher's exact test justification of the TF–IDF term-weighting scheme".

20Jupyter NotebookJun 7, 202411 months agoMIT

Similar Papers

Cite this paper

@article{sheridan2025fishers,
  title  = {A Fisher's exact test justification of the TF-IDF term-weighting scheme},
  author = {Paul Sheridan and Zeyad Ahmed and Aitazaz A. Farooque},
  year   = {2025},
  eprint = {2507.15742},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.15742v2}
}

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/2507.15742.svg)](https://codeofpaper.com/paper/2507.15742)

Discussion