Logic guided method improves validity of generated graphs
Logic-Guided Graph Denoising Diffusion Models
Machine Learning
Summary
Generating graphs that follow strict rules can be tricky for computers, leading to mistakes in the results. The authors introduce a way to help graph-generating models stick to these rules by using logical statements written in a formal language. Their method guides the generation process to better respect these rules, which improves the chance that the final graphs are valid. They tested this idea on knowledge graphs and found it made the generated graphs more accurate according to the given rules.
What this means in practice
- •For knowledge graph engineers: Generate knowledge graphs that better satisfy domain-specific rules by guiding models with logical constraints during graph creation.
- •For data integration teams: Improve the quality of automatically created data network structures by enforcing logical conditions that reflect real-world rules.
Authors
Samuel Cognolato, Luciano Serafini, Alessandro Sperduti, Andrea Cavallaro
Abstract
Graph diffusion models are competitive approaches for generating complex graph-structured data. However, when such distributions have strict structural constraints, diffusion models may fail to capture them exactly, resulting in the generation of invalid graphs. In this paper, we propose a method for grounding graph diffusion models in domain-specific knowledge via First Order Logic (FOL), leveraging its expressive and interpretable formalism to impose structural constraints on the generative process. We incorporate domain knowledge using classifier guidance, a technique that conditions the diffusion model's distribution on external variables to exert control over the sampled data. During the generative process, classifier guidance steers the denoising trajectory to optimize an objective function, which we define as a fuzzy and differentiable relaxation of the logical rules. Our methodology requires only the specification of constraints in FOL, whose satisfaction is encouraged at inference time to guide a pre-trained generative model. We evaluate our approach by comparing the unconditional generation of knowledge graphs with our logic-guided framework, which incorporates domain ontologies as structural constraints during inference. This approach significantly increases the proportion of generated graphs that satisfy the ontological constraints.