HARMONIC: Harnessing LLMs for Tabular Data Synthesis and Privacy Protection
Yuxin Wang, Duanyu Feng, Yongfu Dai, Zhengyu Chen, Jimin Huang, Sophia Ananiadou, Qianqian Xie, Hao Wang
TL;DR
HARMONIC addresses the challenge of privacy-preserving synthetic tabular data by leveraging large language models through a kNN-informed instruction-tuning framework. It encodes tabular records as JSON-like sequences, shuffles feature order to promote order invariance, and fine-tunes a pretrained LLM to generate realistic data without memorizing real records. The framework introduces two privacy-aware metrics, Data Leakage Test (DLT) and LLM Efficacy (LLE), to evaluate privacy risk and downstream usefulness for LLM tasks, respectively. Experiments across four public datasets show that HARMONIC can match or exceed baselines in downstream LLM performance while offering stronger privacy guarantees, though at the cost of longer computation times and a focus on classification tasks.
Abstract
Data serves as the fundamental foundation for advancing deep learning, particularly tabular data presented in a structured format, which is highly conducive to modeling. However, even in the era of LLM, obtaining tabular data from sensitive domains remains a challenge due to privacy or copyright concerns. Hence, exploring how to effectively use models like LLMs to generate realistic and privacy-preserving synthetic tabular data is urgent. In this paper, we take a step forward to explore LLMs for tabular data synthesis and privacy protection, by introducing a new framework HARMONIC for tabular data generation and evaluation. In the tabular data generation of our framework, unlike previous small-scale LLM-based methods that rely on continued pre-training, we explore the larger-scale LLMs with fine-tuning to generate tabular data and enhance privacy. Based on idea of the k-nearest neighbors algorithm, an instruction fine-tuning dataset is constructed to inspire LLMs to discover inter-row relationships. Then, with fine-tuning, LLMs are trained to remember the format and connections of the data rather than the data itself, which reduces the risk of privacy leakage. In the evaluation part of our framework, we develop specific privacy risk metrics DLT for LLM synthetic data generation, as well as performance evaluation metrics LLE for downstream LLM tasks. Our experiments find that this tabular data generation framework achieves equivalent performance to existing methods with better privacy, which also demonstrates our evaluation framework for the effectiveness of synthetic data and privacy risks in LLM scenarios.
