Why is forward stepwise selection prone to getting stuck in local optima?

Quick Overview

Asks why forward stepwise feature selection can end on a worse subset than the best one available. Tests how a one-feature-at-a-time search behaves with interacting and correlated features, and which alternative search strategies reduce the problem.

Why is forward stepwise selection prone to getting stuck in local optima?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Forward stepwise selection starts from an empty model and adds one feature at a time, each time choosing the feature that most improves a validation score. Why is forward stepwise selection prone to getting stuck in local optima? ```hint What the search keeps Compare what forward selection is allowed to change between steps with what an exhaustive best-subset search is free to change. ``` ```hint Features that only work together Think about a pair of features where neither one helps on its own. What score gain does each show when it is the only candidate added? ``` ### What a Strong Answer Covers - Why a greedy, add-only search over subsets can end on a subset worse than the best one of the same size, including why best subsets need not be nested. - A concrete case where features are useful only jointly (an interaction such as XOR) and why marginal gain misses them. - How an early proxy feature, or small noisy differences in score, steers the rest of the path and makes the result unstable. - Practical mitigations (floating or bidirectional search, beam search, exhaustive search for small feature counts, embedded methods) and what each costs. ### Follow-up Questions - How does backward elimination behave on the same XOR example, and when is it impractical? - How would you choose when to stop adding features without overfitting the validation set used for selection? - Why can the selected subset change a lot across bootstrap samples, and how would you measure that stability? - When would you prefer lasso to stepwise selection, and how can lasso also go wrong with strongly correlated features?

Overview: Asks why forward stepwise feature selection can end on a worse subset than the best one available. Tests how a one-feature-at-a-time search behaves with interacting and correlated features, and which alternative search strategies reduce the problem.

Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Forward stepwise selection starts from an empty model and adds one feature at a time, each time choosing the feature that most improves a validation score. Why is forward stepwise selection prone to getting stuck in local optima?

What a Strong Answer Covers Guidance

  • Why a greedy, add-only search over subsets can end on a subset worse than the best one of the same size, including why best subsets need not be nested.
  • A concrete case where features are useful only jointly (an interaction such as XOR) and why marginal gain misses them.
  • How an early proxy feature, or small noisy differences in score, steers the rest of the path and makes the result unstable.
  • Practical mitigations (floating or bidirectional search, beam search, exhaustive search for small feature counts, embedded methods) and what each costs.

Follow-up Questions Guidance

  • How does backward elimination behave on the same XOR example, and when is it impractical?
  • How would you choose when to stop adding features without overfitting the validation set used for selection?
  • Why can the selected subset change a lot across bootstrap samples, and how would you measure that stability?
  • When would you prefer lasso to stepwise selection, and how can lasso also go wrong with strongly correlated features?