Online gradient descent(OGD) produces excellent prediction accuracy with a minimum of computing resources.However, in practice another key consideration is the size of the final model;Since models can be stored sparsely, the number of non-zero coefficients in W is the determining factor of memory usage.
Without regularization , FTRL-Proximal is identical to standard online gradient descent, but because it uses an alternative lazy representation of the model coefficients w, L1 regularization can be implemented much more effectively.
Given a sequence of gradients $g_t$, OGD performs the update $W_{t+1} = W_t - \eta_tg_t$ , where $\eta_t$ is a non-increasing learning-rate schedule,e.g.$\eta_t = 1 / \sqrt{t}$.
The FTRL-Proximal algorithm uses the update $W_{t+1} = arg_wmin(g_{1:t}.w + 1/2 \sum_{s=1}^t\sigma_s ||w - w_s||_2^2 + \lambda_1||w||_1)$, $\sigma_{1:t} = 1 / \eta_t$
when we take $\lambda_1 = 0$, they produce an identical sequence of coefficient vectors. However, the FTRL-Proximal update with $\lambda_1 > 0$ does an excellent job of inducing sparsity.
其中,
式中第一項是對損失函數的貢獻的一個估計,第二項是控制w(也就是model)在每次迭代中變化不要太大,第三項代表L1正則(獲得稀疏解),表示學習速率。
學習速率可以通過超參數自適應學習
we can re-write the update as the argmin over w of
$(g_{1:t} - \sum_{s=1}^t\sigma_sw_s) . w + (1 / \eta_t) ||w||^2_2 + \lambda_1||w||_1 + const$ (左式第二項少了個1/2)
Let $z_{t-1} = g_{1:t-1} - \sum_{s=1}^{t-1}\sigma_sw_s$, so $z_t = z_{t-1} + g_t - (1/\eta_t - 1/ (\eta_{t-1}))W_t$ and solve for $W_{t+1}$ in closed form on a percoordinate bases by
Note that when $\eta_t$ is a constant value $\eta$ and $\lambda_1 = 0$, it is easy to see the equivalence to online gradient descent, since we have $W_{t+1} = -\etaZ_t =-\eta \sum^t_{s=1}g_s$
FTRL綜合考慮了FOBOS和RDA對於正則項和W限制的區別,其特征權重的更新公式為:

注意,公式(3)中出現了L2正則項,在論文[2]的公式中並沒有這一項,但是在其2013年發表的FTRL工程化實現的論文[3]卻使用到了L2正則項。事實上該項的引入並不影響FRTL的稀疏性,后面的推導過程會顯示這一點。L2正則項的引入僅僅相當於對最優化過程多了一個約束,使得結果求解結果更加“平滑”。
公式(3)看上去很復雜,更新特征權重貌似非常困難的樣子。不妨將其進行改寫,將最后一項展開,等價於求下面這樣一個最優化問題:

上式中最后一項相對於來說是一個常數項,並且令
,上式等價於:

針對特征權重的各個維度將其拆解成N個獨立的標量最小化問題:

到這里,我們遇到了與上一篇RDA中類似的優化問題,用相同的分析方法可以得到:

從公式(4)可以看出,引入L2正則化並沒有對FTRL結果的稀疏性產生任何影響。公式4可以用軟閾值分析求解,但是怎么和$sgn(z_i^{(t)})$聯系起來?
前面介紹了FTRL的基本推導,但是這里還有一個問題是一直沒有被討論到的:關於學習率的選擇和計算。事實上在FTRL中,每個維度上的學習率都是單獨考慮的(Per-Coordinate Learning Rates)。
在一個標准的OGD里面使用的是一個全局的學習率策略,這個策略保證了學習率是一個正的非增長序列,對於每一個特征維度都是一樣的。
考慮特征維度的變化率:如果特征1比特征2的變化更快,那么在維度1上的學習率應該下降得更快。我們很容易就可以想到可以用某個維度上梯度分量來反映這種變化率。在FTRL中,維度i上的學習率是這樣計算的:

由於,所以公式(4)中有
,這里的
和
是需要輸入的參數,公式(4)中學習率寫成累加的形式,是為了方便理解后面FTRL的迭代計算邏輯。
參考:
http://blog.csdn.net/wenzishou/article/details/73558017
RDA優化: http://www.cnblogs.com/luctw/p/4757943.html
http://blog.csdn.net/a819825294/article/details/51227265