  Representation learning is all about discovering the hidden modular
attributes that generate the data faithfully. We explore the potential of
Denoising Diffusion Probabilistic Model (DM) in unsupervised learning of the
modular attributes. We build a theoretical framework that connects the
diffusion time-steps and the hidden attributes, which serves as an effective
inductive bias for unsupervised learning. Specifically, the forward diffusion
process incrementally adds Gaussian noise to samples at each time-step, which
essentially collapses different samples into similar ones by losing attributes,
e.g., fine-grained attributes such as texture are lost with less noise added
(i.e., early time-steps), while coarse-grained ones such as shape are lost by
adding more noise (i.e., late time-steps). To disentangle the modular
attributes, at each time-step t, we learn a t-specific feature to compensate
for the newly lost attribute, and the set of all 1,...,t-specific features,
corresponding to the cumulative set of lost attributes, are trained to make up
for the reconstruction error of a pre-trained DM at time-step t. On CelebA,
FFHQ, and Bedroom datasets, the learned feature significantly improves
attribute classification and enables faithful counterfactual generation, e.g.,
interpolating only one specified attribute between two images, validating the
disentanglement quality. Codes are in https://github.com/yue-zhongqi/diti.
