  We introduce a probabilistic framework for two-sample comparison based on a
nonparametric process taking the form of a Markov model that transitions
between a "divide" and a "merge" state on a multi-resolution partition tree of
the sample space. Multi-scale two-sample comparison is achieved through
inferring the underlying state of the process along the partition tree. The
Markov design allows the process to incorporate spatial clustering of
differential structures, which is commonly observed in two-sample problems but
ignored by existing methods. Inference is carried out under the Bayesian
paradigm through recursive propagation algorithms. We demonstrate the work of
our method through simulated data and a real flow cytometry data set, and show
that it substantially outperforms other state-of-the-art two-sample tests in
several settings.
