Generating realistic graph-structured data is challenging due to discrete structures, variable sizes, and class-specific connectivity patterns that resist conventional generative modelling. While recent graph generation methods employ generative adversarial network (GAN) frameworks to handle permutation invariance and irregular topologies, they typically rely on random edge sampling with fixed probabilities, limiting their capacity to capture complex structural dependencies between nodes. We propose a density-aware conditional graph generation framework using Wasserstein GANs (WGAN) that replaces random sampling with a learnable distance-based edge predictor. Our approach embeds nodes into a latent space where proximity correlates with edge likelihood, enabling the generator to learn meaningful connectivity patterns. A differentiable edge predictor determines pairwise relationships directly from node embeddings, while a density-aware selection mechanism adaptively controls edge density to match class-specific sparsity distributions observed in real graphs. We train the model using a WGAN with gradient penalty, employing a GCN-based critic to ensure generated graphs exhibit realistic topology and align with target class distributions. Experiments on benchmark datasets demonstrate that our method produces graphs with superior structural coherence and class-consistent connectivity compared to existing baselines. The learned edge predictor captures complex relational patterns beyond simple heuristics, generating graphs whose density and topology closely match real structural distributions. Our results show improved training stability and controllable synthesis, making the framework effective for realistic graph generation and data augmentation. Source code is publicly available at https://github.com/ava-12/Density_Aware_WGAN.git.
翻译:生成真实的图结构数据具有挑战性,这源于离散结构、可变尺寸以及类别特定的连接模式,这些特性使得传统生成建模方法难以处理。尽管近期的图生成方法采用生成对抗网络(GAN)框架来处理置换不变性和不规则拓扑结构,但它们通常依赖具有固定概率的随机边采样,限制了其捕捉节点间复杂结构依赖关系的能力。我们提出了一种基于Wasserstein GAN(WGAN)的密度感知条件图生成框架,该框架使用可学习的基于距离的边预测器替代随机采样。我们的方法将节点嵌入到一个潜在空间中,其中邻近性与边的可能性相关,从而使生成器能够学习有意义的连接模式。一个可微分的边预测器直接从节点嵌入中确定成对关系,同时一个密度感知的选择机制自适应地控制边密度,以匹配在真实图中观察到的类别特定的稀疏性分布。我们使用带有梯度惩罚的WGAN训练模型,并采用基于GCN的判别器以确保生成的图展现出真实的拓扑结构并与目标类别分布保持一致。在基准数据集上的实验表明,与现有基线方法相比,我们的方法生成的图具有更优的结构一致性和类别一致的连通性。学习到的边预测器捕捉了超越简单启发式方法的复杂关系模式,生成的图在密度和拓扑结构上与真实的结构分布高度匹配。我们的结果表明了改进的训练稳定性和可控的合成能力,使得该框架在真实图生成和数据增强方面具有高效性。源代码公开于 https://github.com/ava-12/Density_Aware_WGAN.git。