Syntactic vs Semantic validity of molecular graphs
Generative machine learning methods in chemistry are typically tasked with generating new molecular structures. Think of it as 'dreaming up molecules.'

We see these kinds of ML models with predictive text programs.. if I'm typing, my phone attempts to guess the word or complete my sentence. (NB this doesn't work so well with molecule names or scientific terms.)

There are a wide variety of ways to represent a molecule for such a generative ML method. One of the common ways is via SMILES in which the molecular graph is encoded as a text string:

c1ccccc1  benzene
CC(=O)O   acetic acid


In this case, syntax can be a problem. SMILES uses parenthesis to represent branching, and they must match. Numbers are used to represent ring closures, which must match as well.

Consequently, many generative ML method generate syntactically incorrect molecules (ignoring questions of chemical valence, etc.)

c1ccccc2 error
CC(=OO)) error


There are solutions. Noel O'Boyle and Andrew Dalke suggested DeepSMILES which encodes a new syntax that's resistant to such issues.

As you mention in your answer errors in connectivity and/or valence represent semantics - that is what makes a chemically viable molecule (i.e., carbon does not take 5 bonds, isolated oxygen atoms aren't stable, etc.)