NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Cost Function for Internal Representations

Anders Krogh, C. I. Thorbergsson, John A. HertzNeurIPS 1989

Introduction

In the late 1980s, back-propagation (BP) emerged as the dominant method for training multi-layer neural networks. However, BP treats the activations of hidden units as implicit consequences of the input and the current weights. While it was understood that networks "learn" internal representations of data, researchers lacked a formal, rigorous way to optimize those representations directly. Previous attempts to make these representations explicit were often ad hoc and lacked a solid theoretical foundation, making convergence difficult to guarantee.

To bridge this gap, this paper proposes a novel cost function that treats hidden unit activations—the "internal representations"—as explicit variables to be optimized alongside connection weights. By decoupling the layers and updating representations on the same timescale as weights, the authors achieve significantly higher success rates in learning compared to standard back-propagation.

Methods

The authors introduce an "entropic" cost function ($E$), similar to cross-entropy, that consists of two main terms:

  1. The Input-to-Hidden Term: Measures how well the first layer of weights can reconstruct the internal representations from the inputs.
  2. The Hidden-to-Output Term: Measures how well the second layer of weights can predict the target patterns from those same internal representations.

A key parameter, $T$, is introduced to regulate the relative weight of these two terms.

The Learning Process

Instead of solely performing gradient descent on weights, the algorithm alternates (or simultaneously performs) updates on:

  • Weights ($w$): Using standard delta-rule style updates.
  • Internal Representations ($\sigma$): Solving for the stationary values of the representations.

The authors explore two temporal strategies for these updates:

  • Fast-varying $\sigma$: Relaxing the hidden units to their optimal values after every single weight change.
  • Slow-varying $\sigma$: Updating hidden units and weights on the same timescale (once per learning step).

Datasets

The algorithm was evaluated on two classic connectionist benchmarks:

  • 4-bit Parity Problem: A network with 4 input units and 4 hidden units tasked with determining if the number of "1"s in a 16-pattern set is even or odd. This is a notoriously difficult non-linear problem for simple algorithms.
  • 8-3-8 Encoding Problem: An autoencoder task where 8 unique patterns (one-hot vectors) must be compressed through 3 hidden units and reconstructed perfectly at the output.

Key Insights

  • Back-propagation as a Limit: One of the most elegant findings is that standard back-propagation is a special case of this framework. When the parameter $T$ is very large ($T \gg 1$), the equations for this new cost function reduce exactly to the standard BP equations.
  • The Power of "Slow" Updates: Counter-intuitively, the "slow-varying" approach—where hidden units aren't fully optimized at every step—yielded the best results. Updating everything on the same timescale allows the weights and representations to "co-evolve" more effectively.
  • Spin-Glass Analogy: At low weights, the hidden units behave like particles in a "local field" (similar to spin-glasses in physics). The authors found that "self-coupling" (where a unit's state is dominated by its own previous state) can hinder convergence in problems like Parity, requiring a gradual "warm-up" of these couplings.
  • Constraint Injection: Because the representations are explicit, it becomes trivial to add constraints. For example, terms can be added to the cost function to force the network to develop different internal representations for different patterns, preventing the "collapse" of hidden states.

Key Results

The "slow-varying" $\sigma$ approach outperformed the back-propagation limit ($T=10$) across key metrics.

Average error and success rate for the Parity (A) and Encoding (B) problems.
  • Success Rate: In the Parity problem, the success rate jumped from 48% (BP limit) to 57% when using slow-varying representations.
  • Speed: For the Encoding problem, the slow-varying approach was significantly faster, reaching a 100% success rate in an average of 64 steps, compared to 88 steps for the fast-varying (BP-like) version.
  • Robustness: The explicit cost function allowed the network to find solutions in cases where standard BP might get stuck in local minima, thanks to the extra degrees of freedom provided by the representation variables.

Limitations and Future Work

While promising, the approach has notable limitations:

  • Memory Overhead: The values of the internal representations ($\sigma$) must be stored for every training pattern between learning sweeps. For massive datasets, this introduces a significant memory bottleneck.
  • Hyperparameter Sensitivity: The parameter $T$ and the learning rates for the representations require careful tuning. If $T$ is too low, the "self-coupling" problem can prevent the network from learning complex logic like Parity.
  • Hardware Implementation: Because the computational complexity shifts from weight calculation to representation iteration, this method may be better suited for specialized parallel hardware than standard BP.

Future directions suggested by the authors include extending this explicit representation framework to recurrent networks (networks with feedback) and exploring the use of binary units instead of continuous ones.

Summary updated

BibTeX
@inproceedings{krogh1989cost,
  author = {Anders Krogh and C. I. Thorbergsson and John A. Hertz},
  title = {{A Cost Function for Internal Representations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1989},
}
Figure