Table of Contents
Fetching ...

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.

HARMONIC: Harnessing LLMs for Tabular Data Synthesis and Privacy Protection

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.
Paper Structure (28 sections, 4 equations, 2 figures, 8 tables)

This paper contains 28 sections, 4 equations, 2 figures, 8 tables.

Figures (2)

  • Figure 1: After applying the kNN algorithm to the original table, we obtain $n$ sets of $k+1$ data points. Each set is structured according to the template shown in the gray table at the bottom left. These datasets are then encoded into a single instruction using text encoding, with the features of each table data shuffled, as shown in the white box above (a). Finally, the encoded fine-tuning dataset is input into the pre-trained LLM for fine-tuning (b).
  • Figure 2: The sampling step involves inputting a prompt, shown within the white box in the upper left corner (a), into the fine-tuned pretrained LLM. This results in a textual output (b), which is then converted into a table using pattern matching (c).