Higher-order Gated AutoEncoder with extensions.