  We propose a general method for constructing confidence intervals and
statistical tests for single or low-dimensional components of a large parameter
vector in a high-dimensional model. It can be easily adjusted for multiplicity
taking dependence among tests into account. For linear models, our method is
essentially the same as in Zhang and Zhang [J. R. Stat. Soc. Ser. B Stat.
Methodol. 76 (2014) 217-242]: we analyze its asymptotic properties and
establish its asymptotic optimality in terms of semiparametric efficiency. Our
method naturally extends to generalized linear models with convex loss
functions. We develop the corresponding theory which includes a careful
analysis for Gaussian, sub-Gaussian and bounded correlated designs.
