KBFormer: A Diffusion Model for Structured Entity Completion

Ouail Kitouni, Niklas Nolte, James Hensman, Bhaskar MitraarXiv 2023 · DOI

Introduction: The Sequence Bias in Structured Knowledge

Large Language Models (LLMs) have revolutionized natural language processing through autoregressive "next-token" prediction. However, this paradigm introduces a significant sequence bias. When a model learns a fact like "A is B," it does not inherently grasp the symmetric relationship "B is A"—a phenomenon known as the "reversal curse." This limitation is particularly acute for structured data, such as JSON objects or tabular records, where the semantic relationship between properties should be order-invariant.

Existing generative models for tabular data often struggle with heterogeneity (mixing text, categories, and numbers) and sparsity (missing values). DiSK (Diffusion Models of Structured Knowledge) is proposed as a unified framework to address these challenges by treating structured data as a collection of properties to be denoised rather than a sequence to be completed.

Comparison of unstructured autoregressive decoding versus DiSK's structured diffusion approach.

Methodology: The DiSK Architecture

DiSK introduces a novel architecture designed to handle the complexities of heterogeneous structured data through several key technical innovations:

Discrete-State Diffusion

DiSK utilizes an "absorbing state" diffusion process. During training, properties within a structured entity are randomly masked. The model is trained to "de-mask" or predict these missing values regardless of their position or the order of operations. This provides a strong inductive bias for structured knowledge, allowing the model to perform bidirectional inference naturally and solve the reversal curse.

Handling Heterogeneity with GMMs

A common pitfall in modeling tabular data is treating numerical values as text tokens or using simple regression. DiSK instead predicts the parameters of Gaussian Mixture Models (GMMs) for numerical fields. This approach preserves the ordinal nature of numbers while capturing multimodal distributions—for instance, representing a device's weight that may cluster around two distinct standard specifications rather than a single average.

Hierarchical and Type-Specific Encoding

To capture the semantics of complex entities, DiSK employs Hierarchical Positional Encodings. An RNN encodes the "path" to a specific value (e.g., Device -> Specifications -> Weight), allowing the model to share knowledge across similar fields in different entities. Furthermore, the architecture uses specialized modules—MLPs for numbers and categories, and Transformers for text—which are mapped into a shared latent space for cross-property attention.

Evaluation and Key Results

The effectiveness of DiSK was evaluated across three diverse domains: mobile phone specifications (GSMArena), atomic physics (Nuclear Physics Dataset), and 15 standard tabular benchmarks from UCI and Kaggle.

Performance and Efficiency

DiSK demonstrated state-of-the-art performance in tabular modeling, matching or exceeding specialized models like TDDPM. Notably, a DiSK model with only 24.8 million parameters outperformed a fine-tuned LLaMA2-7B on structured property prediction tasks. This suggests that for specialized knowledge domains, a structured inductive bias is more efficient than massive scaling.

Robustness and Validity

Unlike standard LLMs that may generate malformed JSON or hallucinated strings, DiSK’s output is structured by design, ensuring zero parsing errors. In downstream tasks, synthetic data generated by DiSK led to higher classifier accuracy compared to other generative models, indicating superior capture of feature correlations.

Conclusion and Future Directions

DiSK successfully addresses the "reversal curse" and the challenges of heterogeneous data by moving beyond autoregressive sequences. While currently focused on individual entities, future work aims to scale DiSK to massive knowledge bases and integrate it with larger LLMs to combine structured reasoning with high-quality natural language generation.

Summary updated

BibTeX
@misc{kitouni2023kbformer,
  author = {Ouail Kitouni and Niklas Nolte and James Hensman and Bhaskar Mitra},
  title = {{KBFormer: A Diffusion Model for Structured Entity Completion}},
  year = {2023},
  eprint = {2312.05253},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.05253},
}
Figure