Skip to main content

datasynth_core/diffusion/
mod.rs

1//! Diffusion model abstraction for statistical and neural data generation.
2//!
3//! Implements two diffusion backends behind a common [`DiffusionBackend`] trait:
4//!
5//! - **Statistical** (always available): pure-Rust Langevin-inspired denoising
6//!   guided by target means, stds, and Cholesky-decomposed correlations.
7//!
8//! - **Neural** (requires `neural` feature): learned score network trained via
9//!   denoising score matching. Captures nonlinear cross-column dependencies
10//!   that parametric models miss. Powered by `candle`.
11//!
12//! Both backends slot into [`HybridGenerator`] for blended rule+diffusion output.
13
14pub mod backend;
15pub mod hybrid;
16pub mod schedule;
17pub mod statistical;
18pub mod training;
19pub mod utils;
20
21#[cfg(feature = "neural")]
22pub mod device;
23#[cfg(feature = "neural")]
24pub mod gnn_generator;
25#[cfg(feature = "neural")]
26pub mod neural;
27#[cfg(feature = "neural")]
28pub mod neural_training;
29#[cfg(feature = "neural")]
30pub mod score_network;
31#[cfg(feature = "neural")]
32pub mod tabular_transformer;
33
34pub use backend::*;
35pub use hybrid::*;
36pub use schedule::*;
37pub use statistical::*;
38pub use training::*;
39pub use utils::*;
40
41#[cfg(feature = "neural")]
42pub use device::{cuda_available, preferred_device};
43#[cfg(feature = "neural")]
44pub use gnn_generator::{
45    GnnEdgePredictor, GnnGeneratorConfig, GnnGraphTrainer, GnnTrainingConfig, TrainedGnnGenerator,
46};
47#[cfg(feature = "neural")]
48pub use neural::{NeuralDiffusionBackend, NeuralDiffusionConfig};
49#[cfg(feature = "neural")]
50pub use neural_training::{NeuralDiffusionTrainer, NeuralTrainingConfig, TrainingReport};
51#[cfg(feature = "neural")]
52pub use score_network::ScoreNetworkConfig;
53#[cfg(feature = "neural")]
54pub use tabular_transformer::{
55    TabularTransformer, TabularTransformerConfig, TabularTransformerTrainer,
56    TabularTransformerTrainingConfig, TrainedTabularTransformer,
57};