自编码算法与稀疏性
From Ufldl
Line 98: | Line 98: | ||
稀疏性可以被简单地解释如下。如果当神经元的输出接近于1的时候我们认为它被激活,而输出接近于0的时候认为它被抑制,那么使得神经元大部分的时间都是被抑制的限制则被称作稀疏性限制。这里我们假设的神经元的激活函数是sigmoid函数。如果你使用tanh作为激活函数的话,当神经元输出为-1的时候,我们认为神经元是被抑制的。 | 稀疏性可以被简单地解释如下。如果当神经元的输出接近于1的时候我们认为它被激活,而输出接近于0的时候认为它被抑制,那么使得神经元大部分的时间都是被抑制的限制则被称作稀疏性限制。这里我们假设的神经元的激活函数是sigmoid函数。如果你使用tanh作为激活函数的话,当神经元输出为-1的时候,我们认为神经元是被抑制的。 | ||
+ | |||
+ | 【原文】 | ||
+ | |||
+ | Recall that <math>\textstyle a^{(2)}_j</math> denotes the activation of hidden unit <math>\textstyle j</math> in the | ||
+ | autoencoder. However, this notation doesn't make explicit what was the input <math>\textstyle x</math> | ||
+ | that led to that activation. Thus, we will write <math>\textstyle a^{(2)}_j(x)</math> to denote the activation | ||
+ | of this hidden unit when the network is given a specific input <math>\textstyle x</math>. Further, let | ||
+ | :<math>\begin{align} | ||
+ | \hat\rho_j = \frac{1}{m} \sum_{i=1}^m \left[ a^{(2)}_j(x^{(i)}) \right] | ||
+ | \end{align}</math> | ||
+ | be the average activation of hidden unit <math>\textstyle j</math> (averaged over the training set). | ||
+ | We would like to (approximately) enforce the constraint | ||
+ | :<math>\begin{align} | ||
+ | \hat\rho_j = \rho, | ||
+ | \end{align}</math> | ||
+ | where <math>\textstyle \rho</math> is a '''sparsity parameter''', typically a small value close to zero | ||
+ | (say <math>\textstyle \rho = 0.05</math>). In other words, we would like the average activation | ||
+ | of each hidden neuron <math>\textstyle j</math> to be close to 0.05 (say). To satisfy this | ||
+ | constraint, the hidden unit's activations must mostly be near 0. | ||
+ | |||
+ | 【初译】 | ||
+ | |||
+ | 注意到 <math>\textstyle a^{(2)}_j</math> 表示隐藏神经元 <math>\textstyle j</math> 的激活度,但是这一表示方法中并未明确指出哪一个输入 <math>\textstyle x</math> 带来了这一激活度。所以我们将使用 <math>\textstyle a^{(2)}_j(x)</math> 来表示在输入为 <math>\textstyle x</math> 情况下,自编码神经网络隐藏神经元 的激活度。 | ||
+ | 进一步,让 | ||
+ | |||
+ | 表示隐藏神经元 的平均活跃度(在训练集上取平均)。我们可以近似的加入一条限制 | ||
+ | |||
+ | 其中, 是稀疏性参数,通常是一个接近于0的较小的值(比如 )。换句话说,我们想要让隐藏神经元 的平均活跃度接近0.05。为了满足这一条件,隐藏神经元的活跃度必须接近于0。 |