  The notions of bounded-size and quasibounded-size decompositions with bounded
treedepth base classes are central to the structural theory of graph sparsity
introduced by two of the authors years ago, and provide a characterization of
both classes with bounded expansions and nowhere dense classes.
  In this paper, we first prove that the model theoretic notions of dependence
and stability are, for hereditary classes of graphs, compatible with
quasibounded-size decompositions, in the following sense: every hereditary
class with quasibounded-size decompositions with dependent (resp.\ stable) base
classes is itself dependent (resp.\ stable). This result is obtained in a more
general study of ``decomposition horizons'', which are class properties
compatible with quasibounded-size decompositions.
  We deduce that hereditary classes with quasibounded-size decompositions with
bounded shrubdepth base classes are stable. In the second part of the paper, we
prove the converse. Thus, we characterize stable hereditary classes of graphs
as those hereditary classes that admit quasibounded-size decompositions with
bounded shrubdepth base classes. This result is obtained by proving that every
hereditary stable class of graphs admits almost nowhere dense quasi-bush
representations, thus answering positively a conjecture of Dreier et al.
  These results have several consequences. For example, we show that every
graph $G$ in a stable, hereditary class of graphs $\mathscr C$ has a clique or
a stable set of size $\Omega_{\mathscr C,\epsilon}(|G|^{1/2-\epsilon})$, for
every $\epsilon>0$, which is tight in the sense that it cannot be improved to
$\Omega_{\mathscr C}(|G|^{1/2})$.
