Concepts / Hypothesis Classes of Neural Networks

Hypothesis Classes of Neural Networks

Neural networks with an appropriate depth-2 structure can represent every Boolean function.

  • Programming

Every Boolean Rule

Imagine a task with n inputs. Each input is either -1 or +1, and the task produces one output that is also either -1 or +1. Any rule that assigns one of these two outputs to every allowed input is a Boolean function. The central question is whether a neural network can represent some of these rules or every possible one.

A Boolean function is a mapping from {±1}^n to {±1}. Its input is an n-dimensional sign vector, and its output is one sign value.

is given toreturnsInput vector{±1}^nBoolean functionone assigned ruleOutput sign{±1}
How does each input vector in {±1}^n map to one output in {±1}?

Tracing Universal Representation

What do you think happens?

Suppose the desired Boolean rule assigns an output sign to every allowed input vector. If a depth-2 network is sufficiently large, can its associated hypothesis class include that rule?

  • Yes, for every Boolean rule
  • Only for one specially selected Boolean rule
  • No, depth 2 always excludes some Boolean rules
Reveal answer

Answer: Yes, for every Boolean rule

For every number of inputs n, there is a sufficiently large depth-2 network whose hypothesis class contains all functions from {±1}^n to {±1}.

The universal claim concerns a whole collection of predictors, not one permanently fixed output rule. The input sign vector enters the network structure, the computation passes through the depth-2 network, and the resulting hypothesis returns one sign. By choosing the network appropriately and selecting suitable weights, the resulting hypothesis class can include every allowable Boolean input-output rule.

computed throughproducessupportsSign vectorn inputsHidden layersufficiently many nodesOutput signone valueAll Boolean functionscontained in the class
How can a depth-2 network structure support every Boolean input-output rule?

Universal Does Not Mean Small

The depth-2 guarantee answers a question about expressive range: no Boolean input-output rule is excluded merely because the network has depth 2, provided the network is sufficiently large. It does not say that every rule has a compact representation.

In the construction associated with the depth-2 result, the hidden layer may be exponentially large. The minimum size s(n) needed for universal Boolean representation is exponential in the number of inputs n. Therefore, increasing the number of inputs can cause the required number of hidden units or weights to grow exponentially.

requirescan requiren inputssmaller required sizes(n)universal sizemore than n inputslarger required sizeexponential sizemore hidden units orweights
What happens to the required network size as the number of Boolean inputs increases?

Architecture and Parameters

A neural network architecture is specified by the tuple (V, E, σ). V and E describe the graph, while σ is the activation function.

The architecture describes the network structure. The graph determines the nodes and edges that make up the network, and the activation function is part of the architectural specification. This structure is separate from the numerical weights assigned to the edges.

includesincludescontainscontainsArchitecture(V, E, σ)Graphnetwork structureVnodesEconnectionsσactivation function
What contains what in a neural network architecture?

Weights are assigned to the edges in E. Once the architecture is fixed, a particular choice of edge weights specifies one individual hypothesis. The tuple (V, E, σ, w) defines one function h_V,E,σ,w.

is evaluated byprovides structurespecifyreturnsInput vector{±1}^nFixed architecture(V, E, σ)Individual hypothesish_V,E,σ,wOutput sign{±1}Edge weightsw
How do values assigned to network edges determine the output produced for each input?

From One Hypothesis to a Class

A hypothesis class is created by holding the architecture fixed while allowing the edge weights to vary. Each possible weight choice gives one predictor. The collection of all predictors obtained this way is the hypothesis class H_V,E,σ.

combined withdefinescombined withranges overArchitecture(V, E, σ)Weights wone choiceh_V,E,σ,wone functionArchitecture(V, E, σ)Weights w′another choiceH_V,E,σall weight choices
What changes in the network's input-output behavior when the architecture stays fixed but the edge weights vary?

Reading the Notation

Interpret the difference between (V, E, σ, w), h_V,E,σ,w, and H_V,E,σ.

Architecture: (V, E, σ) identifies the graph and activation function that remain fixed.

One weight choice: w assigns values to the network edges.

One hypothesis: Together, (V, E, σ, w) define the individual function h_V,E,σ,w.

All weight choices: Allowing w to vary while keeping (V, E, σ) fixed produces the hypothesis class H_V,E,σ.

The architecture determines the available structure, a weight assignment selects one hypothesis, and all allowable weight assignments form the hypothesis class.

Common Interpretation Errors

  • Treating the universal representation result as a promise of a small network.

    The guarantee concerns representational power. The hidden layer in the construction may be exponentially large, and the required minimum size s(n) is exponential in the number of inputs.

    Fix: Separate the question of whether a function can be represented from the question of how large the representing network must be.

  • Confusing one hypothesis with a hypothesis class.

    The tuple including w defines one function. The class H_V,E,σ is obtained by varying w while the architecture stays fixed.

    Fix: Use h_V,E,σ,w for one weight-specific function and H_V,E,σ for the collection generated by all weight choices.

  • Treating weights as part of the fixed architecture.

    Weights are parameters of a hypothesis, while the graph and activation function specify the architecture.

    Fix: Keep (V, E, σ) fixed when describing a class formed by varying weights.

  • Interpreting the universal claim as referring to one special Boolean rule.

    The claim applies to every assignment of outputs to the allowed Boolean inputs, not merely to one selected rule.

    Fix: Read universal representation as containment of all functions from {±1}^n to {±1}.

Practice Check

MEDIUM

Explain in your own words why the statement “a depth-2 network can represent every Boolean function” does not mean that the network is small. Then explain the difference between h_V,E,σ,w and H_V,E,σ.

Hints
  • Mention the possible exponential size of the hidden layer.
  • Identify which symbol includes a particular weight assignment.
  • Identify which symbol represents all weight assignments for one fixed architecture.

Practice Answer

Give a concise answer to the practice question.

Expressiveness: The depth-2 result says that every Boolean function is included in the network's hypothesis class when the network is sufficiently large.

Efficiency: The construction may use an exponentially large hidden layer, so universal representation does not guarantee a compact network.

Notation: h_V,E,σ,w is the function from one particular weight choice, whereas H_V,E,σ contains the functions from all weight choices for the fixed architecture.

Universal representation describes what the class can express; it does not describe how efficiently every function can be represented.

Key Takeaways

  1. A Boolean function maps an n-dimensional vector from {±1}^n to one output in {±1}.
  2. For every n, a sufficiently large depth-2 network can have a hypothesis class containing every Boolean function on n inputs.
  3. Universal representational power does not imply an efficient representation; the required network size can be exponential in n.
  4. The architecture is specified by (V, E, σ), while edge weights specify an individual hypothesis.
  5. Fixing the architecture and varying the weights produces the class H_V,E,σ.

Key Takeaways

  • Boolean functions map sign-valued input vectors to sign-valued outputs.
  • An appropriately selected depth-2 neural-network architecture can represent every Boolean function when it is sufficiently large.
  • The construction may require exponentially many hidden units or weights, so universality is not the same as compactness.
  • The architecture (V, E, σ) is fixed when forming a hypothesis class, while varying edge weights w selects different individual hypotheses.
  • The notation h_V,E,σ,w denotes one weight-specific function, and H_V,E,σ denotes the collection generated by all weight choices.