An alternative approach would be to infer validity from data instead of defining it a priori. This could be achieved by treating a database of known 'valid' compounds (i.e. stable compounds or active catalysts) and view these as a corpus of examples generated from an unknown underlying grammar. The corresponding grammar could then be learned using the methods of grammar induction (also known as grammatical inference). In this setting, a broader concept of validity (beyond e.g. mere stability) could in principle be obtained. For example, one could construct the database of examples to only include systems with certain conditions (such as adequate band-gaps for photocatalysts). This approach could also incorporate a notion of synthesizability into the grammar, which has recently been demonstrated to be a learnable property. Relation to Generative Deep Learning: The above already implies a close relationship between formal grammars and generative ML models. In particular, deep learning approaches like Generative Adversarial Networks or Variational Autoencoders have recently been the focus of intense study in materials design. While such models can be extremely powerful tools for exploring chemical space they tend to require large amounts of data for training. Furthermore, the generation of unphysical or invalid structures and so-called 'mode collapses' (i.e. models which do not cover the full space of relevant structures but only generate highly similar outputs) are frequently observed issues that can be difficult to debug.