Feature engineering manually designs or selects input representations that expose task-relevant patterns to predictive models. In drug discovery, features can include molecular weight, atom and bond counts, rotatable bonds, or enumerated molecular substructures. These representations help models learn relationships between chemical patterns and properties such as druglikeness, toxicity, or solubility. section 1.3.2
A practical molecular feature workflow can:
- Represent a molecule as a graph whose nodes are atoms and whose edges are chemical bonds. section 11.2.2
- Encode each atom with a multi-hot vector containing its element, degree, hydrogen count, implicit valence, and aromaticity. section 11.2.2
- Add reverse bond edges and self-loops so graph models can aggregate neighboring information while retaining each atom’s own features. section 11.2.2
A 78-dimensional atomic representation
An atom feature function concatenates one-hot encodings for element symbol, degree, total hydrogen count, and implicit valence, then appends an aromaticity indicator. The resulting vector supplies a graph neural network with informative chemical inputs before it learns more complex derived features. section 11.2.2 section 11.8
Listing 11.2 Generate 78-dimensional Feature Vector for a Single Atom
def atom_features(atom):
features = []
features += one_of_k_encoding_unk(
atom.GetSymbol(), ATOM_SYMBOLS
)
features += one_of_k_encoding_unk(
atom.GetDegree(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
)
features += one_of_k_encoding_unk(
atom.GetTotalNumHs(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
)
features += one_of_k_encoding_unk(
atom.GetImplicitValence(), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
)
features += [int(atom.GetIsAromatic())]
return np.array(features, dtype=np.float32)Inspect the complete atom_features implementation, including unknown-category handling and the five encoded atomic properties. section 11.2.2
Manual features are useful but intrinsically limited: they include only relationships researchers already know to be relevant. Deep learning can learn task-specific features whose relevance is unknown, potentially reducing bias from established substructures and human-derived rules. section 1.3.2























