A penalty on the code can be scaled away
counterexample▲▲△On the four points of I.12.B01, a width-one linear autoencoder has and for a constant . Its objective is the reconstruction loss plus times the mean of over the data, with .
(a) Evaluate the objective at , and . What is its infimum, and is it attained?
(b) Now hold the decoder at and let each input take whichever code is best for it. Find that code for a corner of the rectangle, and the objective.
(c) For which is the best code in (b) zero?
Hint
Each corner has a score of along and along . Use (I.12.9) for (b).
Solution
(a) The product does not depend on . It is the projection onto , with reconstruction loss . The codes are , with mean absolute value . So the objective is
which is , and at the three values of .
Its infimum is , the unpenalised loss, and no finite attains it. Along the way the encoder shrinks towards zero and the decoder grows without bound. Nothing about the function computed has changed. The penalty has selected for large decoder weights and done nothing else.
(b) With a unit-norm decoder the error of one input splits along the two eigenvectors. For a corner with scores and , a code gives
By (I.12.9) the best code is . The objective is
against for the unshortened code . The penalty now trades something real: codes an eighth shorter, and a reconstruction error of where it was .
(c) The code is zero when , that is, . The unit is then never active, the reconstruction is the origin for every input, and the reconstruction loss is the total variance, .
The fix. Hold each decoder column at unit norm, or weight by the norm of its column, so that the product of the two scales is what is penalised. A penalty on the encoder’s Jacobian has the same weakness, and tied weights remove it there.