Abstract
Knowledge graphs (KGs) are ubiquitous in numerous real-world applications, and watermarking facilitates protecting intellectual property and preventing potential harm from AI-generated content. Existing watermarking methods mainly focus on static plain text or image data, while they can hardly be applied to dynamic graphs due to spatial and temporal variations of structured data. This motivates us to propose KGMARK, the first graph watermarking framework that aims to generate robust, detectable, and transparent diffusion fingerprints for dynamic KG data. Specifically, we propose a novel clustering-based alignment method to adapt the watermark to spatial variations. Meanwhile, we present a redundant embedding strategy to harden the diffusion watermark against various attacks, facilitating the robustness of the watermark to the temporal variations. Additionally, we introduce a novel learnable mask matrix to improve the transparency of diffusion fingerprints. By doing so, our KGMARK properly tackles the variation challenges of structured data. Experiments on various public benchmarks show the effectiveness of our proposed KGMARK.
Introduction
Knowledge Graphs (KGs)—structured networks of entities and their relationships—serve as the backbone for modern AI applications, including semantic search and recommendation systems. As generative models increasingly produce high-quality synthetic KGs, the need to verify ownership and ensure data traceability has become paramount. However, traditional watermarking techniques designed for images or text fail to address the unique challenges of graph data, specifically spatial-temporal variations.
Spatial variation refers to graph isomorphism, where the underlying matrix representation changes if nodes are reordered, even if the data remains identical. Temporal variation refers to the dynamic nature of KGs, where nodes and edges are frequently added or deleted. KGMark is the first framework specifically designed to embed robust, detectable, and transparent digital fingerprints into KGs using diffusion models to overcome these hurdles.
Methodology
KGMark treats graph watermarking as a latent diffusion problem, utilizing a multi-stage process to embed signals without compromising graph utility.
Latent Diffusion and Inversion
The framework employs a Variational Autoencoder (VAE) integrated with Relational Graph Attention (RGAT) layers to map the KG into a latent space. Using Denoising Diffusion Implicit Models (DDIM), the graph is "inverted" into a noise vector. This approach allows the watermark to be embedded within the latent representation rather than the raw graph structure.
Frequency Domain Embedding
To enhance resilience against structural perturbations, KGMark applies a Fourier Transform to the latent noise vector. The watermark signature is embedded into specific frequency components. This ensures that the signal is distributed in a way that is difficult to "wash out" through simple edits to the graph's edges or nodes.
Learnable Adaptive Watermark Mask Matrix (LAWMM)
A primary concern in watermarking is transparency—ensuring the watermark does not degrade the graph's performance in downstream tasks. KGMark introduces a learnable mask matrix that optimizes watermark placement. By minimizing "latent drift," the mask ensures the watermarked graph maintains high utility, achieving what the authors call "Latent Space Equilibrium."
Structural Alignment and Redundancy
To defeat the isomorphism problem, KGMark utilizes a deterministic node-reordering strategy based on stable structural features, such as node degree and clustering coefficients. This aligns the graph into a consistent state before embedding. Furthermore, a redundant embedding strategy injects the watermark across multiple community subgraphs, providing a "safety in numbers" defense against subgraph deletion attacks.
Experimental Results
The framework was evaluated on three large-scale public benchmarks: Alibaba-iFashion (AliF), MIND (news recommendations), and Last-FM (music data).
Performance Metrics
- Detectability: KGMark achieved a watermark detection AUC (Area Under the Curve) of up to 0.99 on clean data.
- Robustness: The system remained highly effective under aggressive attacks. Even when 50% of triples were deleted or 50% of relations were altered, the detection AUC remained between 0.93 and 0.95.
- Transparency: The impact on downstream utility was negligible. In news recommendation tasks using the MIND dataset, the performance loss was as low as 0.02%.
- Comparative Advantage: KGMark significantly outperformed traditional image-based diffusion watermarking methods, such as TreeRing, which lack the mechanisms to handle the structural nuances of relational data.
Conclusion and Future Work
KGMark establishes a robust foundation for protecting the intellectual property of synthetic Knowledge Graphs. By combining diffusion models with structural alignment and learnable masking, it successfully navigates the complexities of graph isomorphism and dynamic data updates.
Future research will focus on addressing relational vulnerabilities, as Relational GNNs can be susceptible to adversarial attacks on attention weights. Additionally, the authors aim to explore compatibility with faster diffusion samplers and the use of conditional sampling to further enhance the quality of reconstructed watermarked graphs.
Summary updated