TRamCol-Diff: Deepening Diffusion Model Comprehension for Extensive Categorical Medical Service Data

Fengwei Jia · Hongli Zhu · Fengyuan Jia · Wai Kin Victor Chan*
Tsinghua Shenzhen International Graduate School, Tsinghua University · School of Mechanical Engineering, Anhui University of Technology · *Corresponding: [email protected]
Tabular data generation · diffusion model · medical service data (MSD) · data preprocessing & quality

Why MSD Is Hard to Generate

  • MSD is sparse and scarce — rare conditions under-represented; privacy blocks sharing patient records
  • MSD is predominantly categorical with implicit constraints between columns — existing generators miss them
  • Simulation needs authentic inputs: assumed Gamma/Poisson distributions ignore weather, location and other real-world factors
3
TRamCol steps: normalize → index list → rearrange
M=256
table slice becomes a [1,M,M] tensor
6+6
baselines, vanilla and TRamCol-augmented

TRamCol: Random Column Rearrangement

  • Step 1 — normalize the table to [0,1]: every feature contributes equally, no bias by scale or units
  • Step 2 — column index list with controlled disturbance: every W elements randomly reordered, no duplicates inside each window [w·τ, (w+1)·τ)
  • Step 3 — rearrange vector columns into an M×M matrix — implicit inter-column relationships move next to each other
Fig. 1 · The TRamCol-Diff framework (blue box: TRamCol strategy; black box: inversion)

TRamCol-Diff: UNet Diffusion + Inversion

  • UNet instead of TabDPPM's MLP — convolutional kernels give a larger field-of-view over the rearranged tensor; attention-enhanced skip connections retain information
  • Reverse TRamCol postprocessing: weighted random selection among entries sharing a column index restores the tabular form
  • The whole loop simulates how real medical data is generated

Diffusion on Tables, in Brief

  • Forward: gradually corrupt data with Gaussian noise — q(x_t|x_{t−1}) = N(√(1−β_t)·x_{t−1}, β_t·I)
  • Reverse: a network predicts and removes the noise step by step until the clean sample emerges
  • Training objective: Diffusion(x) = E_{x0,t}[‖e_0(x_t,t)‖²] — match the injected noise at every timestep
  • Existing tabular diffusion (TabDPM, Synthsize, FedTabDiff, ResBit) treats columns independently — column constraints are lost

SimTable: Distribution Matching

Fig. 2 (Poisson panel) · grey dashed = TRamCol-Diff, solid = true distribution
  • TRamCol-Diff hugs the true distribution across all four column types: Uniform(0,1) · Gaussian(0,1) · Poisson(5) · Gamma(2,2)
  • NFlow performs best among non-diffusion baselines; TVAE mirrors the tree-like distribution; TRamCol boosts NFlow, ADS-GAN and TabDPPM — but can hurt PATEGAN
  • CPD measures the divergence between predicted category proportions and actual proportions — the lower, the closer the synthetic data is to reality
  • Charts matter in simulation research: through this article's charts and tables, conclusions become visible at a glance — TRamCol-Diff showcases high accuracy in generative tasks with practical potential

Experimental Setup

  • Datasets: SimTable (synthetic, 4 distributions) + real U.S. CDI (21 columns, 15 categorical with fewer than 100 categories)
  • Metrics: CPD ↓ · FC / FR ↑ (Pearson column / row fidelity) · ER / EC ↓
  • Baselines: NFlow, ADS-GAN, PATE-GAN, TVAE, CTGAN, TabDPPM — each vanilla and plugged with TRamCol

Results: Highest Fidelity on Real Data

Table 1 · Performance on the SimTable and CDI datasets
  • TRamCol-Diff beats all baselines on CDI: CPD 0.0021 · FC 0.9808 · FR 0.9504 · ER 0.0001 (only 5 errors)
  • TabDPPM's EC is 4 — but with CPD 0.0051 and FC 0.9579; TRamCol-Diff balances accuracy and fidelity better
  • TRamCol lifts ADS-GAN's CDI FC 0.8998 → 0.9247; TVAE stays stable; PATEGAN declines

Key Numbers

0.99
Fidelity Column on SimTable (FC 0.9900)
0.0008
Category Proportion Discrepancy (CPD)
5
errors on real CDI data (ER 0.0001)

Takeaways

  • 1. First diffusion process for automating MSD input modeling — authentic, reliable, diverse medical tables
  • 2. TRamCol rearrangement lets the model learn implicit inter-column relationships
  • 3. UNet + attention skips widen the field of view; reverse TRamCol restores the tabular form
  • Future work: apply TRamCol-Diff to more data distributions and real-world application scenarios
TAKEAWAYS
1. Rearrange, diffuse, invert — a diffusion loop that respects categorical column constraints
2. First MSD input-modeling generator: FC 0.99 on SimTable, only 5 errors on real CDI data
3. Plug-and-play: TRamCol lifts ADS-GAN's fidelity by +2.5 points on CDI
Jia, Zhu, Jia & Chan — TRamCol-Diff: Deepening Diffusion Model Comprehension for Extensive Categorical Medical Service Data. Figures reprinted from the original paper for academic presentation.