Hindsight Network Credit Assignment

Kenny Young

Abstract

We present Hindsight Network Credit Assignment (HNCA), a novel learning method for stochastic neural networks. HNCA assigns credit to each neuron's stochastic output based on how it influences the output of its immediate children. We prove that HNCA provides unbiased gradient estimates while reducing variance compared to the REINFORCE estimator. Experimentally, HNCA demonstrates significant advantages over REINFORCE in a contextual bandit version of MNIST, achieving stability and speed comparable to backpropagation with similar computational complexity.

Introduction

Training neural networks with discrete stochastic neurons is a long-standing challenge. These units are essential for modeling multimodal distributions and enabling exploration in reinforcement learning, but their non-differentiable nature precludes standard backpropagation. Common alternatives include the high-variance REINFORCE estimator or biased continuous relaxations like Gumbel-Softmax. HNCA seeks to bridge this gap by providing an unbiased, low-variance, and computationally efficient estimator.

Methods

The core of HNCA is a local credit assignment mechanism inspired by Hindsight Credit Assignment. Instead of relying on global rewards, HNCA evaluates a neuron's contribution by asking how likely the observed outputs of its immediate children were, given the neuron's actual action versus counterfactual alternatives.

Local Credit Assignment and Unbiasedness

HNCA calculates an action-value for each neuron based on the relative likelihood of its children's actions. By conditioning on the neuron's "Markov blanket"—its parents and children—HNCA filters out noise from distal parts of the network. The method relies on a structural assumption (Assumption 1) stating that the parents of a neuron's children cannot be descendants of the neuron itself. Crucially, the paper provides a mathematical proof that this local focus does not introduce bias into the gradient estimate, while Theorem 1 guarantees that HNCA's variance is always less than or equal to that of REINFORCE.

Efficiency

HNCA utilizes a message-passing interface similar to backpropagation. Information flows forward during sampling and backward for gradient computation, maintaining a computational cost proportional to the number of edges in the graph.

Experimental Results

We evaluated HNCA on a contextual bandit version of MNIST. The network must predict a digit's class and receives a binary reward (1 for correct, 0 for incorrect) without ground-truth labels. The architecture used stochastic feedforward networks with hidden layers of 64 Bernoulli nodes.

Learning curves for HNCA vs. baselines on contextual bandit MNIST.

As shown in the learning curves, HNCA (green) converges significantly faster than REINFORCE (red). While deterministic networks with tanh activations (blue) perform best in this task, HNCA is competitive with deterministic ReLU networks (orange), which is notable for a purely stochastic approach.

Learning-rate sensitivity analysis for HNCA vs. baselines.

Sensitivity analysis reveals that HNCA is much more robust to high learning rates than REINFORCE. This stability is a direct result of the variance reduction achieved through local hindsight credit assignment, allowing for more aggressive optimization without the instability typical of REINFORCE.

Conclusion and Future Work

HNCA demonstrates that local causal information can be exploited to derive informed, low-variance gradients for stochastic neurons without introducing bias. While currently limited to one-step credit propagation, extending HNCA to multiple steps remains a promising direction for future research in stochastic compute graphs.

Summary updated

BibTeX
@inproceedings{young2022hindsight,
  author = {Kenny Young},
  title = {{Hindsight Network Credit Assignment}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i8.20874},
}
Figure