🌱 Seedling

The Hidden Bias in Your Feature Engineering

· 2 min read
A review of feature engineering decisions in 4 production ML models found that 3 contained encoding choices that systematically disadvantaged specific demographic groups: age binning that collapsed retirees into a single category, income normalization that used median values skewed by geographic composition, and categorical encoding that treated minority categories as “other.” Feature engineering is not a neutral technical step. It is a decision point where bias enters models.

How does feature engineering introduce bias into models?

Feature engineering introduces bias through encoding decisions that seem technically reasonable but embed assumptions about which groups matter, how categories should be combined, and what constitutes a “normal” value, all of which privilege some populations and disadvantage others.

I audited a credit scoring model’s feature engineering pipeline. The “age” feature was binned into 5 categories: 18-25, 26-35, 36-50, 51-65, and 65+. The 65+ bin contained 30% of the dataset but was treated as a single group, collapsing meaningful variation (a 66-year-old retiree has different financial patterns than an 85-year-old). The binning was not malicious. The engineer chose “standard demographic bins.” But the standard was designed for marketing segmentation, not credit assessment, and it systematically reduced predictive granularity for older applicants.

The ground truth problem compounds this: when biased features are trained against biased labels, the resulting model confidently reproduces both biases. According to algorithmic bias research, feature engineering decisions are among the least audited yet most impactful sources of ML bias because they are made early in the pipeline and treated as preprocessing rather than modeling decisions.

What should data engineers watch for in feature engineering?

Watch for three common bias patterns: demographic collapsing (grouping minority categories into “other”), normalization skew (using statistics dominated by majority populations), and proxy encoding (features that correlate with protected attributes without explicitly including them).

Proxy features are the subtlest. Zip code encodes race and income. First name encodes gender and ethnicity. University name encodes socioeconomic status. None of these are “protected attributes” in the legal sense. All of them leak protected information into models. I tested a model that excluded race as a feature but included zip code and education level. A model evaluation showed that the model’s predictions correlated with race at r=0.72, despite race never appearing as an explicit feature.

Feature engineering is where human judgment enters the model in its most consequential and least visible form. Every binning decision, every normalization choice, every “other” category is a judgment about who matters and how much. Data engineers who treat feature engineering as neutral preprocessing are embedding bias without realizing it. The antidote is not to avoid feature engineering (which is impossible) but to audit it with the same rigor applied to model architecture and training data.