library(grasps) ## for penalty computation
library(ggplot2) ## for visualization
penalties <- c("lasso", "atan", "capped", "exp",
"lq", "lsp", "mcp", "scad",
"selo", "sica")
pen_df <- compute_penalty(seq(-4, 4, by = 0.01), penalties, lambda = 1)
plot(pen_df, xlim = c(-1, 1), ylim = c(0, 1), zoom.size = 1) +
guides(color = guide_legend(nrow = 3, byrow = TRUE))Preliminary
Consider the following setting:
Gaussian graphical model (GGM) assumption:
The data \(X_{n \times p}\) consists of independent and identically distributed samples \(X_1, \dots, X_n \sim N_p(\mu,\Sigma)\).Disjoint group structure:
The \(p\) variables can be partitioned into disjoint groups.Goal:
Estimate the precision matrix \(\Omega = \Sigma^{-1} = (\omega_{ij})_{p \times p}\).
Sparse-Group Estimator
\[\begin{gather} \hat{\Omega}(\lambda,\alpha,\gamma) = {\arg\min}_{\Omega \succ 0} \left\{ -\log\det(\Omega) + \text{tr}(S\Omega) + \mathcal{P}_{\lambda,\alpha,\gamma}(\Omega) \right\}, \\[10pt] \mathcal{P}_{\lambda,\alpha,\gamma}(\Omega) = \alpha \mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega) + (1-\alpha) \mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega), \\[10pt] \mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega) = \sum_{i,j} P_{\lambda,\gamma}(\lvert\omega_{ij}\rvert), \\[5pt] \mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega) = \sum_{g,g^\prime} P_{\lambda,\gamma}(\lVert\Omega_{gg^\prime}\rVert_F). \end{gather}\]
where:
\(S = n^{-1} \sum_{i=1}^n (X_i-\bar{X})(X_i-\bar{X})^\top\) is the empirical covariance matrix.
\(\lambda \geq 0\) is the global regularization parameter controlling overall shrinkage.
\(\alpha \in [0,1]\) is the mixing parameter controlling the balance between element-wise and block-wise penalties.
\(\gamma\) is the additional parameter for the adaptive lasso and non-convex penalties. It controls the adaptive weights for the former and the degree of nonconvexity (or concavity) of the penalty function for the latter, respectively.
\(\mathcal{P}_{\lambda,\alpha,\gamma}(\Omega)\) is a generic bi-level penalty template that combines element-wise and block-wise regularization, allowing convex or non-convex regularizers while preserving the intrinsic group structure among variables.
\(\mathcal{P}^\text{idv}_{\lambda,\gamma}(\Omega)\) is the element-wise individual penalty component.
\(\mathcal{P}^\text{grp}_{\lambda,\gamma}(\Omega)\) is the block-wise group penalty component.
\(P_{\lambda,\gamma}(\cdot)\) is the penalty function.
\(\Omega_{gg^\prime}\) is the submatrix of \(\Omega\) with the rows from group \(g\) and columns from group \(g^\prime\).
The Frobenius norm \(\lVert\Omega\rVert_F\) is defined as \(\lVert\Omega\rVert_F = (\sum_{i,j} \lvert\omega_{ij}\rvert^2)^{1/2} = [\text{tr}(\Omega^\top\Omega)]^{1/2}\).
Note:
- The parameter \(\gamma\) is used for the adaptive lasso and non-convex penalties. The lasso penalty can be viewed as a special case in which \(\gamma\) is not required.
Penalties
- Lasso: Least absolute shrinkage and selection operator (Tibshirani 1996; Friedman et al. 2008)
\[P_\lambda(\omega_{ij}) = \lambda\vert\omega_{ij}\vert.\]
- Adaptive lasso (Zou 2006; Fan et al. 2009)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda\frac{\vert\omega_{ij}\vert}{v_{ij}}, \] where \(V = (v_{ij})_{p \times p} = (\vert\tilde{\omega}_{ij}\vert^\gamma)_{p \times p}\) is constructed from the initial estimator \(\tilde{\Omega}\). The adaptive weights remain fixed during optimization.
- Atan: Arctangent type penalty (Wang and Zhu 2016)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda(\gamma+\frac{2}{\pi}) \arctan\left(\frac{\vert\omega_{ij}\vert}{\gamma}\right), \quad \gamma > 0. \]
- Capped: Capped L1 penalty (T. Zhang 2010)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda\min\left(\lvert\omega_{ij}\rvert,\gamma\right), \quad \gamma > 0. \]
- Exp: Exponential type penalty (Wang et al. 2018)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda\left[1-\exp\left(-\frac{\vert\omega_{ij}\vert}{\gamma}\right)\right], \quad \gamma > 0. \]
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda\vert\omega_{ij}\vert^\gamma, \quad 0 < \gamma < 1. \]
- LSP: Log-sum penalty (Candès et al. 2008; Mazumder et al. 2011)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \frac{\lambda}{\log\left(1+\frac{1}{\gamma}\right)} \log\left(1+\frac{\vert\omega_{ij}\vert}{\gamma}\right), \quad \gamma > 0. \]
- MCP: Minimax concave penalty (C.-H. Zhang 2010)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \begin{cases} \lambda\vert\omega_{ij}\vert - \dfrac{\omega_{ij}^2}{2\gamma}, & \text{if } \vert\omega_{ij}\vert \leq \gamma\lambda, \\ \dfrac{1}{2}\gamma\lambda^2, & \text{if } \vert\omega_{ij}\vert > \gamma\lambda. \end{cases} \quad \gamma > 1. \]
- SCAD: Smoothly clipped absolute deviation (Fan and Li 2001; Fan et al. 2009)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \begin{cases} \lambda\vert\omega_{ij}\vert & \text{if } \vert\omega_{ij}\vert \leq \lambda, \\ \dfrac{2\gamma\lambda\vert\omega_{ij}\vert-\omega_{ij}^2-\lambda^2}{2(\gamma-1)} & \text{if } \lambda < \vert\omega_{ij}\vert < \gamma\lambda, \\ \dfrac{\lambda^2(\gamma+1)}{2} & \text{if } \vert\omega_{ij}\vert \geq \gamma\lambda. \end{cases} \quad \gamma > 2. \]
- SELO: Seamless-L0 penalty (Dicker et al. 2013)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \frac{\lambda}{\log(2)} \log\left(\frac{\lvert\omega_{ij}\rvert}{\lvert\omega_{ij}\rvert+\gamma}+1\right), \quad \gamma > 0. \]
- SICA: Smooth integration of counting and absolute deviation (Lv and Fan 2009)
\[ P_{\lambda,\gamma}(\omega_{ij}) = \lambda\frac{(\gamma+1)\lvert\omega_{ij}\rvert}{\gamma+\lvert\omega_{ij}\rvert}, \quad \gamma > 0. \]
Note:
- For lasso, which is convex, the additional parameter \(\gamma\) is not required, and the penalty function \(P_{\lambda,\gamma}(\cdot)\) simplifies to \(P_\lambda(\cdot)\).
Illustrative Visualization
Figure 1 illustrates a comparison of various penalty functions \(P(\omega)\) evaluated over a range of \(\omega\) values. The main panel (right) provides a wider view of the penalty functions’ behavior for larger \(\vert\omega\vert\), while the inset panel (left) magnifies the region near zero \([-1, 1]\).

Figure 2 displays the derivative function \(P^\prime(\omega)\) associated with a range of penalty types. The lasso exhibits a constant derivative, corresponding to uniform shrinkage. For capped L1, the derivative equals the lasso derivative below the cutoff and drops to zero at the cutoff, using the right derivative there. MCP decreases linearly to zero, while SCAD first stays constant and then decreases linearly to zero. Other non-convex penalties show smoothly diminishing derivatives as \(\vert\omega\vert\) increases, reflecting their tendency to shrink small \(\vert\omega\vert\) strongly while exerting little to no shrinkage on large ones.
deriv_df <- compute_derivative(seq(0, 4, by = 0.01), penalties, lambda = 1)
plot(deriv_df) +
scale_y_continuous(limits = c(0, 1.5)) +
guides(color = guide_legend(nrow = 3, byrow = TRUE))
