Towards Transparency: Exploring LLM Trainings Datasets through Visual Topic Modeling and Semantic Frame
Charles de Dampierre, Andrei Mogoutov, Nicolas Baumard
TL;DR
The paper tackles the opacity of large language model training data by introducing Bunka, a toolkit that combines Topic Modeling Cartography and Semantic Framing to visualize and analyze datasets for transparency and bias. It demonstrates three use cases: (i) visually summarizing prompts with a 2D topic map and cross-embedding comparisons; (ii) filtering Direct Preference Optimization data to accelerate fine-tuning while maintaining performance; and (iii) analyzing biases via semantic frames to quantify content imbalances. Key contributions include the BunkaTopics pipeline (embedding → reduction → clustering → noun-based labeling), a topic-based data curation method for DPO yielding data-efficient gains, and a semantic framing approach that produces scalable bias maps with low compute. Together, these methods offer practical means to improve transparency, data quality, and efficiency in LLM pre-training and fine-tuning, with accessible code for reproducibility.
Abstract
LLMs are now responsible for making many decisions on behalf of humans: from answering questions to classifying things, they have become an important part of everyday life. While computation and model architecture have been rapidly expanding in recent years, the efforts towards curating training datasets are still in their beginnings. This underappreciation of training datasets has led LLMs to create biased and low-quality content. In order to solve that issue, we present Bunka, a software that leverages AI and Cognitive Science to improve the refinement of textual datasets. We show how Topic Modeling coupled with 2-dimensional Cartography can increase the transparency of datasets. We then show how the same Topic Modeling techniques can be applied to Preferences datasets to accelerate the fine-tuning process and increase the capacities of the model on different benchmarks. Lastly, we show how using Frame Analysis can give insights into existing biases in the training corpus. Overall, we argue that we need better tools to explore and increase the quality and transparency of LLMs training datasets.
