Feature Engineering

Feature engineering chooses the variables given to a model. Classical machine learning depends heavily on explicit features, while deep learning often learns features through an architecture.

A feature map converts an input object into a vector:

The model then predicts from :

For linear models, feature quality often determines whether a simple model is competitive:

Feature Contract

FieldRequired Detail
objectwhat raw object is transformed: table row, sequence, graph, molecule, protein, structure, assay record
feature sourceraw measurement, derived descriptor, annotation, pretrained embedding, or external metadata
fit scopewhether normalization, vocabulary, PCA, imputation, or selection is fit on training data only
availabilitywhether the feature is available at inference time
leakage riskwhether the feature encodes target, split identity, future information, source, or post hoc filtering
stabilitywhether the feature changes with software version, database version, conformer generator, or annotation source

Common Choices

DomainFeature ExamplesRisk
tabular datadescriptors, counts, metadata, missingness indicatorstarget leakage through post-outcome fields
text or sequencetoken counts, k-mers, pretrained embeddings, position featuresvocabulary or duplicate leakage
moleculesdescriptors, fingerprints, graph features, conformer featuresstandardization, stereochemistry, tautomer, protonation, conformer policy
proteinssequence identity, domains, MSA features, structure features, family annotationshomolog and template leakage
structuresdistances, contacts, angles, pocket descriptors, interaction fingerprintscoordinate-frame and known-pose leakage
learned embeddingsfrozen encoder features or cached representationscache construction and checkpoint selection leakage

Preprocessing Pipeline

A feature pipeline should be viewed as part of the model:

If any stage is fit using validation or test examples, the reported metric can become optimistic. For example, fitting a scaler on all data changes:

into a leakage-prone estimate if and are computed from train plus test.

Baseline Role

Feature-engineered models are useful baselines even when the paper proposes a deep architecture:

BaselineWhat It Tests
linear model on descriptorswhether the task is almost linearly separable
tree model on descriptorswhether tabular nonlinear interactions are enough
fingerprint similaritywhether analog retrieval solves molecule tasks
sequence identity or family baselinewhether protein tasks are mostly homolog interpolation
docking or physics heuristicwhether learned scoring beats classical structure-based signal

Checks

  • Does any feature encode the target, future information, or split identity?
  • Are features fitted or selected using train data only?
  • Are engineered features robust under the deployment distribution?
  • Is the feature representation aligned with the architecture and metric?
  • Are feature versions, software versions, and external databases recorded?
  • Is a simple feature baseline reported before claiming an architectural gain?