Ridge Regression with Cloned Features
Let be a nonzero feature vector and a response. There is no intercept. Fix .
(a) Ridge regression on the single feature , gives coefficient .
Now duplicate the feature: the design matrix becomes , with identical columns. Refit ridge regression with the same :
Show that all coefficients are equal, and find their common value. What is the total effect ? Interpret the result in terms of an "effective" regularization parameter.
(b) Answer the same question for the lasso, where the penalty is . Is the solution still unique?
Try to do (a) without differentiating anything.
Answer: Ridge Regression with Cloned Features
Key Idea / Intuition
The loss sees only the sum , because every column is the same vector . So the problem splits into two steps:
- For a fixed total effect , find the cheapest way to split it among the copies under the penalty.
- Optimize over .
The penalty is strictly convex, so it prefers spreading the effect evenly. An even split costs only , which means cloning a feature divides its effective ridge penalty by . The penalty does not care how the effect is split, as long as all parts have the same sign. Hence the lasso solution is not unique.
Formal Proof / Solution
(a) Ridge
Symmetry argument for equal coefficients.
- Since , the objective is strictly convex. It therefore has a unique minimizer .
- Permuting the coordinates of permutes identical columns of . This leaves both and unchanged, so for every permutation .
- Hence is also a minimizer. By uniqueness, for all .
- Therefore all coordinates are equal: .
Reduction to one variable.
Write . Then .
For fixed , the Cauchy–Schwarz (or QM–AM) inequality gives with equality iff all . This confirms the even split directly. The problem then becomes
This is single-feature ridge with penalty . Its solution is
Answer.
For example, with each copy gets .
Interpretation.
- Cloning a feature times is equivalent to fitting the original feature with ridge parameter .
- Duplication therefore weakens shrinkage. The fitted total effect moves from toward the OLS value , and reaches it as .
- Practical consequence: ridge is not invariant to redundant features. Highly correlated groups of predictors are collectively shrunk less, and their coefficients are spread evenly across the group. This is the "grouping effect".
(b) Lasso
For fixed , the triangle inequality gives with equality iff all nonzero share the sign of .
The problem therefore reduces to which is the single-feature lasso with the same . Its solution is
Conclusions:
- The total effect is unchanged by duplication.
- Any split with and is optimal. For and this is a whole simplex of solutions, so the solution is not unique.
- In practice, an algorithm such as coordinate descent typically picks one copy arbitrarily and sets the others to zero.
This contrast motivates the elastic net. Adding a small term restores strict convexity. The symmetry argument above then forces equal coefficients on identical features, recovering the grouping effect.
Reference: Hastie, Tibshirani & Friedman, The Elements of Statistical Learning (2nd ed.), Exercise 3.29 (ridge with an exact copy of a variable); see also §3.4.1 and the elastic net discussion in §18.4.
Source: The Elements of Statistical Learning (2nd ed.), Hastie, Tibshirani & Friedman, Exercise 3.29