The simplest way of performing a penalization method is to omit some of the variants from the analysis. This could be done systematically. For example, with a small number of genetic variants, the causal estimates omitting one variant at a time could be considered. Alternatively, it could be done stochastically. For example, we could consider estimates omitting (say) 30% of the genetic variants at a time by selecting the 30% of variants at random a large number of times, and calculating the causal estimate in each case. This sensitivity analysis has been undertaken for the effect of LDL-c on aortic stenosis see
A more focused approach to omitting genetic variants is to omit genetic variants from the analysis with heterogeneous instrumental variable estimates. This could be done by calculating the contribution to Cochran’s Q statistic for each genetic variant, and omitting any variant whose contribution to the statistic is greater than the upper 95th percentile of a chi-squared distribution on one degree of freedom (3.84). This approach has been applied for investigating the causal effect of lipid fractions on CAD risk.50 (link) More formal penalization methods have been proposed using L1-penalization to downweight the contribution of outlying variants to the analysis in a continuous way.51 , 52 (link) These methods have desirable theoretical properties, giving consistent estimates of the causal effect even if up to half of the genetic variants are not valid instrumental variables. However, they require individual-level data and a one-sample setting (genetic variants, risk factor and outcome measurements are available for the same individuals).