# Explaining Categorical Feature Interactions Using Graph Covariance and LLMs

arXiv: https://arxiv.org/abs/2501.14932 · HTML: https://mlsanity.com/paper/2501.14932/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 30 references that are in the map.
- First posted on arXiv 24 Jan 2025.

## Builds on (most cited first, 12 of 12)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer](https://mlsanity.com/paper/1910.10683/) (2019)
- [One-Hot Graph Encoder Embedding](https://mlsanity.com/paper/2109.13098/) (2021)
- [A fast algorithm for computing distance correlation](https://mlsanity.com/paper/1810.11332/) (2018)
- [The Chi-Square Test of Distance Correlation](https://mlsanity.com/paper/1912.12150/) (2019)
- [From Distance Correlation to Multiscale Graph Correlation](https://mlsanity.com/paper/1710.09768/) (2017)
- [Design of a Privacy-Preserving Data Platform for Collaboration Against Human Trafficking](https://mlsanity.com/paper/2005.05688/) (2020)
- [Universally Consistent K-Sample Tests via Dependence Measures](https://mlsanity.com/paper/1910.08883/) (2019)
- [Independence Testing for Temporal Data](https://mlsanity.com/paper/1908.06486/) (2019)
- [New HSIC-based tests for independence between two stationary multivariate time series](https://mlsanity.com/paper/1804.09866/) (2018)
- [On the properties of distance covariance for categorical data: Robustness, sure screening, and approximate null distributions](https://mlsanity.com/paper/2403.17882/) (2024)

## Abstract (arXiv)

Modern datasets often consist of numerous samples with abundant features and associated timestamps. Analyzing such datasets to uncover underlying events typically requires complex statistical methods and substantial domain expertise. A notable example, and the primary data focus of this paper, is the global synthetic dataset from the Counter Trafficking Data Collaborative (CTDC) -- a global hub of human trafficking data containing over 200,000 anonymized records spanning from 2002 to 2022, with numerous categorical features for each record. In this paper, we propose a fast and scalable method for analyzing and extracting significant categorical feature interactions, and querying large language models (LLMs) to generate data-driven insights that explain these interactions. Our approach begins with a binarization step for categorical features using one-hot encoding, followed by the computation of graph covariance at each time. This graph covariance quantifies temporal changes in dependence structures within categorical data and is established as a consistent dependence measure under the Bernoulli distribution. We use this measure to identify significant feature pairs, such as those with the most frequent trends over time or those exhibiting sudden spikes in dependence at specific moments. These extracted feature pairs, along with their timestamps, are subsequently passed to an LLM tasked with generating potential explanations of the underlying events driving these dependence changes. The effectiveness of our method is demonstrated through extensive simulations, and its application to the CTDC dataset reveals meaningful feature pairs and potential data stories underlying the observed feature interactions.
