a stochastic gradient algorithm, $${{\mathbb{E}}\left[ \frac{ (X_{n+1}-m)(X_{n+1}-m)^T - W_n}{ {\left\| (X_{n+1}-m)(X_{n+1}-m)^T - W_n \right\|}_F} | {\mathcal{F}}_n \right]} = \nabla G_m(W_n)$$ where ${\mathcal{F}}_n =\sigma(X_1, \ldots, X_n)$ is the $\sigma$-algebra generated by $X_1, \ldots, X_n$ whereas the final estimator $\overline{W}_n$ is obtained by averaging the past values of the first algorithm. The averaging step (see [@PolyakJud92]), [*i*.e.]{} the computation of the arithmetical mean of the past values of a slowly convergent estimator (see Proposition \[prop:RMVn\] below), permits to obtain a new and efficient estimator converging at a parametric rate, with the same asymptotic variance as the empirical risk minimizer (see Theorem \[theo:asymptnorm\] below).

In most of the cases the value of $m$ is unknown so that it also required to estimate the median. To build an estimator of $\Gamma_m$, it is possible to estimate simultaneously $m$ and $\Gamma_m$ by considering two averaged stochastic gradient algorithms that are running simultaneously. For $n \geq 1$, $$\begin{aligned}
m_{n+1} & = m_n + \gamma_n^{(m)} \frac{ X_{n+1}-m_n}{{\left\| X_{n+1}-m_n \right\|}} \nonumber \\
\overline{m}_{n+1} &= \overline{m}_{n} - \frac{1}{n+1} \left( \overline{m}_{n}  - m_{n+1} \right) \label{def:medaver} \\
V_{n+1} &= V_n + \gamma_n \frac{ (X_{n+1}-\overline{m}_n)(X_{n+1}-\overline{m}_n)^T - V_n}{ {\left\| (X_{n+1}-\overline{m}_n)(X_{n+1}-\overline{m}_n)^T - V_n \right\|}_F}  \label{def:Gammarm} \\
\overline{V}_{n+1} &= \overline{V}_{n} - \frac{1}{n+1} \left( \overline{V}_{n}  - 