0% found this document useful (0 votes)
17 views4 pages

Neural Network Function Representations

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

Neural Network Function Representations

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3 Neural Network Representations

You are given a number of functions (a-h) of a single variable, x, which are graphed below. The computation
graphs on the following pages will start o↵ simple and get more complex, building up to neural networks. For
each computation graph, indicate which of the functions below they are able to represent.

( (
(a) 2x (b) 4x 5 2x 5 x 2.5 2x 5 x 2.5
(c) (d)
0 x < 2.5 0 x> 2.5

( 8 8
x+3 x 2 >
<3 x0 (g) log(x) >
<0.5x x0
(e)
1 x<2 (f) 3 x 0<x3 (h) 0 0<x3
>
: >
:
0 x>3 3x 9 x>3

1. Consider the following computation graph, computing a linear transformation with scalar input x, weight
w, and output o, such that o = wx. Which of the funcions can be represented by this graph? For the
options which can, write out the appropriate value of w.

4
2. Now we introduce a bias term b into the graph, such that o = wx + b (this is known as an affine function).
Which of the functions can be represented by this network? For the options which can, write out an
appropriate value of w, b.

3. We can introduce a non-linearity into the network as indicated below. We use the ReLU non-linearity,
which has the form ReLU (x) = max(0, x). Now which of the functions can be represented by this neural
network with weight w and bias b? For the options which can, write out an appropriate value of w, b.

4. Now we consider neural networks with multiple affine transformations, as indicated below. We now have
two sets of weights and biases w1 , b1 and w2 , b2 . We denote the result of the first transformation h such
that h = w1 x + b1 , and o = w2 h + b2 . Which of the functions can be represented by this network? For
the options which can, write out appropriate values of w1 , w2 , b1 , b2 .

5
5. Next we add a ReLU non-linearity to the network after the first affine transformation, creating a hidden
layer. Which of the functions can be represented by this network? For the options which can, write out
appropriate values of w1 , w2 , b1 , b2 .

6. Now we add another hidden layer to the network, as indicated below. Which of the functions can be
represented by this network?

6
7. We’d like to consider using a neural net with just one hidden layer, but have it be larger – a hidden layer
of size 2. Let’s first consider using just two affine functions, with no nonlinearity in between. Which of
the functions can be represented by this network?

8. Now we’ll add a non-linearity between the two affine layers, to produce the neural network below with a
hidden layer of size 2. Which of the functions can be represented by this network?

Common questions

Powered by AI

Functions (a) 2x and (b) 4x - 5 can be represented by this computation graph. For function (a) 2x, the appropriate value of the weight w is 2. For function (b) 4x - 5, the computation graph can represent only 4x by setting w to 4, as it lacks the bias term needed to subtract 5 .

Functions such as (e) -x + 3 and (f) with multifaceted aspects can be captured. For (e), weights can be set such as w1 = -1, b1 = 3, with appropriate w2, b2 contexts to adjust scaling and shifts. Complex piecewise functions like (f) require nuanced settings, possibly using w1 and b1 in a step to segment inputs, and w2, b2 to configure outputs accordingly .

Functions (c) and (d) can be represented using ReLU to replicate their piecewise nature. For function (c), set w = 2 and b = -5, with the output being non-zero only for x >= 2.5. For function (d), set w = -2 and b = -5, applicable when x <= -2.5 .

Representations for simple linear combinations or scaling functions like (a) 2x or singular range-specific forms may be accurate, leveraging additional parameters for different dimensional perspectives in outputs, but complexity in non-linear or discontinuous forms such as (c) remains unqualified .

Larger hidden layers may pick up on noise in data rather than underlying trends, amplifying variability rather than encapsulating general patterns. Overfitting can be reduced using techniques like dropout, regularization, or validation datasets to refine model abstraction and prevent the unnecessary complex encirclement .

With additional hidden layers, the network can approximate complex functions including (h) that involve multi-segment piecewise linear approximations. This setup enables capturing nuances like different slopes across segments, possibly using varied w1, w2, and corresponding biases, extending representational latitude .

Adding ReLU between layers enables representation of piecewise operations such as in function (g) log(x) by segmenting responses and respective weights more flexibly. For example, setting ReLU to handle negative values can represent operations that are dormant in certain ranges, similar to (g).

Introducing non-linearity amalgamates the network's ability to mimic intricate functions with tiered relationships, like (f), harnessing layer differential to demarcate and simulate intricate forms by segmenting the hidden layer properties with ReLU, enhancing exactness and precision in active function segments .

With the addition of a bias term, the graph can now represent affine functions (b) 4x - 5 and (a) 2x with bias. Function (b) 4x - 5 can be achieved by setting w to 4 and b to -5. Function (a) 2x remains with w = 2, b = 0 .

Linear layers alone cannot represent functions with discontinuities or non-linear shape changes effectively. They are restricted to bundling inputs via a weighted linear approach without capturing diverse transformations as seen in non-linear functions such as (c), (e), and even segmented aspects of (f).

You might also like