Generative models can produce synthetic patient records for analytical tasks when real data is unavailable or limited. However, current methods struggle with adhering to domain-specific knowledge and removing invalid data. We present ConSequence, an effective approach to integrating domain knowledge into sequential generative neural network outputs. Our rule-based formulation includes temporal aggregation and antecedent evaluation modules, ensured by an efficient matrix multiplication formulation, to satisfy hard and soft logical constraints across time steps. Existing constraint methods often fail to guarantee constraint satisfaction, lack the ability to handle temporal constraints, and hinder the learning and computational efficiency of the model. In contrast, our approach efficiently handles all types of constraints with guaranteed logical coherence. We demonstrate ConSequence's effectiveness in generating electronic health records, outperforming competitors in achieving complete temporal and spatial constraint satisfaction without compromising runtime performance or generative quality. Specifically, ConSequence successfully prevents all rule violations while improving the model quality in reducing its test perplexity by 5% and incurring less than a 13% slowdown in generation speed compared to an unconstrained model.
翻译:摘要:当真实数据不可用或受限时,生成模型可生成合成患者记录用于分析任务。然而,现有方法难以遵循领域特定知识并剔除无效数据。我们提出ConSequence,一种将领域知识有效集成到序列生成神经网络输出的方法。基于规则的公式化方法包含时间聚合与前件评估模块,通过高效的矩阵乘法形式化实现,确保跨时间步满足硬性与软性逻辑约束。现有约束方法常无法保证约束满足性、缺乏处理时间约束的能力,并阻碍模型的学习与计算效率。相比之下,我们的方法高效处理所有类型约束,并保证逻辑一致性。我们证明了ConSequence在生成电子健康记录中的有效性——在完全满足时间与空间约束的同时,其运行性能与生成质量均优于竞争方法。具体而言,ConSequence成功杜绝所有规则违反,同时将模型质量提升(测试困惑度降低5%),且相较于无约束模型,生成速度仅下降不到13%。