  Call a hereditary family $\mathcal{F}$ of graphs strongly persistent if there
exists a graphon $W$ such that in all subgraphons $W'$ of $W$, $\mathcal{F}$ is
precisely the class of finite graphs that have positive density in $W'$. Our
first result is a complete characterization of the hereditary families of
graphs that are strongly persistent as precisely those that are closed under
substitutions.
  We call graphons with the self-similarity property above weakly random. A
hereditary family $\mathcal{F}$ is said to have the weakly random
Erd\H{o}s--Hajnal property (WR) if every graphon that is a limit of graphs in
$\mathcal{F}$ has a weakly random subgraphon. Among families of graphs that are
closed under substitutions, we completely characterize the families that belong
to WR as those with "few" prime graphs.
  We also extend some of the results above to structures in finite relational
languages by using the theory of theons.
