chapter

    Neural Networks and Activation Functions Short Notes for Gate Da

    Neural Networks and Activation Functions short notes for GATE DA: 4 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice qu

    Neural Networks and Activation Functions short notes

    Summary: ReLU Quick Revision

    Core ReLU Facts

    Definition

    Derivative

    if , and $0$ if .

    At

    Non-differentiable; practical subgradient is $0$ or $1$.

    Primary Advantage

    Prevents vanishing gradients for positive activations; computationally efficient.

    Primary Trap

    "Dying ReLU" — neurons stuck in the negative region output zero and receive zero gradients, permanently halting their learning.

    Quick Revision Checklist: ReLU

    Quick Revision Checklist: ReLU

    • Definition:
    • Gradient: $1$ for , $0$ for . (Subgradient at ).
    • Pros: Computationally highly efficient, mitigates vanishing gradients for positive activations, induces sparsity.
    • Cons: Dying ReLU problem, not strictly differentiable at .
    • Action: Always apply the max function immediately after computing the weighted sum at each layer before passing to the next layer.

    Quick Revision Checklist: Architecture and Parameters

    Quick Revision Checklist: Architecture and Parameters

    • Input Layer: Always has $0$ parameters.
    • Layer Transition Formula: From size $N$ to size $M$, parameters = $(N \times M) + M$ (if bias is included).
    • Total Network Parameters: Sum of parameters across all adjacent layer transitions.
    • Critical Check: Always verify if the problem states "no bias" or "bias is zero" before adding the $+ M$ term.
    • Equivalence Principle: Permuting neurons in a hidden layer (along with their corresponding weights) yields a functionally equivalent network.

    1 more card in this chapter

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    In a standard feed-forward MLP with weight-bearing layers, let denote the number of neurons in layer (with being the input size and the output size). Each connection carries one weight and each non-input neuron carries one bias. The total number of learnable parameters is maximised when biases are included rather than excluded. Express the maximum possible gain in terms of the layer sizes.

    Question 2
    Level 1: Warm-up

    A fully-connected feed-forward multi-layer perceptron has 10 neurons in the input layer, one hidden layer with 5 neurons, and an output layer with 1 neuron. Biases are used at every non-input neuron. The total number of learnable parameters in the network is __________ .

    Question 3
    Level 1: Warm-up

    A fully connected layer receives $4$ input values and contains $5$ neurons. A bias may be attached to any subset of the neurons. The maximum possible number of learnable parameters in this layer is __________ .

    Question 4
    Level 1: Warm-up

    For the ReLU function , what is the minimum possible value of its derivative for ?

    Question 5
    Level 1: Warm-up

    A student claims that because the ReLU function is continuous everywhere, its derivative must take all values between its minimum and maximum. What is the actual minimum number of distinct positive values that the derivative takes over all real ?

    Question 6
    Level 1: Warm-up

    A student argues that since the ReLU function is continuous everywhere, the set of all its derivative values must form a connected interval. Using the standard deep learning convention , how many distinct elements does the set actually contain?

    Question 7
    Level 1: Warm-up

    A student claims that since the ReLU function is the integral of its derivative , must be differentiable everywhere. What is the minimum number of points in where this claim fails?

    Question 8
    Level 1: Warm-up

    A fully-connected feed-forward MLP has an input layer with 5 neurons, one hidden layer with neurons, and an output layer with 1 neuron. Biases are used at every non-input neuron. If the total number of learnable parameters is at most 37, the maximum possible value of is __________ .

    Question 9
    Level 1: Warm-up

    A fully-connected feed-forward MLP has an input layer with 6 neurons, two hidden layers with 3 and 2 neurons respectively, and an output layer with 1 neuron. The problem explicitly states that no bias parameters are used. The minimum number of learnable parameters the network must have is __________ .

    Question 10
    Level 1: Warm-up

    Consider the following two statements about ReLU-based neural network equivalence:

    Assertion (A): Two ReLU networks are functionally equivalent if all incoming weights to a hidden neuron are multiplied by and all outgoing weights from that neuron are divided by .

    Reason (R): The identity holds for all real numbers .

    Free preview ends here

    Login to view the complete short notes

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Neural Networks and Activation Functions Short Notes for GATE DA

    Neural Networks and Activation Functions short notes for GATE DA: 4 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    Summary: ReLU Quick Revision

    Core ReLU Facts

    Definition

    Derivative

    if , and $0$ if .

    At

    Non-differentiable; practical subgradient is $0$ or $1$.

    Primary Advantage

    Prevents vanishing gradients for positive activations; computationally efficient.

    Primary Trap

    "Dying ReLU" — neurons stuck in the negative region output zero and receive zero gradients, permanently halting their learning.

    Quick Revision Checklist: ReLU

    Quick Revision Checklist: ReLU

    • Definition:
    • Gradient: $1$ for , $0$ for . (Subgradient at ).
    • Pros: Computationally highly efficient, mitigates vanishing gradients for positive activations, induces sparsity.
    • Cons: Dying ReLU problem, not strictly differentiable at .
    • Action: Always apply the max function immediately after computing the weighted sum at each layer before passing to the next layer.

    Quick Revision Checklist: Architecture and Parameters

    Quick Revision Checklist: Architecture and Parameters

    • Input Layer: Always has $0$ parameters.
    • Layer Transition Formula: From size $N$ to size $M$, parameters = $(N \times M) + M$ (if bias is included).
    • Total Network Parameters: Sum of parameters across all adjacent layer transitions.
    • Critical Check: Always verify if the problem states "no bias" or "bias is zero" before adding the $+ M$ term.
    • Equivalence Principle: Permuting neurons in a hidden layer (along with their corresponding weights) yields a functionally equivalent network.

    Quick Revision: Parameters and Equivalence

    Quick Revision: Parameters and Equivalence

    Concept Rule / Formula
    Layer Weights
    Layer Biases (if used), else $0$
    Total Parameters
    ReLU Equivalence only if
    Equivalence Strategy Scale in by , scale out by

    Neural Networks and Activation Functions: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Machine Learning MCQ

    In a standard feed-forward MLP with weight-bearing layers, let denote the number of neurons in layer (with being the input size and the output size). Each connection carries one weight and each non-input neuron carries one bias. The total number of learnable parameters is maximised when biases are included rather than excluded. Express the maximum possible gain in terms of the layer sizes.

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: parameter-counting formula — biases contribute exactly one parameter per non-input neuron.

    Step 1: Weights total regardless of bias choice.

    Step 2: Biases exist only for neurons in layers (input layer has none), contributing .

    Step 3: Difference between including and excluding biases is precisely the bias term: .

    Answer: A

    Question 2 · Machine Learning NAT

    A fully-connected feed-forward multi-layer perceptron has 10 neurons in the input layer, one hidden layer with 5 neurons, and an output layer with 1 neuron. Biases are used at every non-input neuron. The total number of learnable parameters in the network is __________ .

    Correct Answer:

    61.00

    Step-by-Step Solution

    Key idea: this is a parameter-counting question, recognisable because explicit layer sizes and a bias clause are given.

    Step 1: Weights from input to hidden = .

    Step 2: Weights from hidden to output = .

    Step 3: Biases for hidden layer = $5$; bias for output = $1$.

    Step 4: Total = .

    Tempting wrong path: omitting biases gives $55$; adding a bias to the input layer gives $66$. The input layer never carries biases.

    Answer: 61.00

    Question 3 · Machine Learning MCQ

    A fully connected layer receives $4$ input values and contains $5$ neurons. A bias may be attached to any subset of the neurons. The maximum possible number of learnable parameters in this layer is __________ .

    1. A.

      20

    2. B.

      25

    3. C.

      29

    4. D.

      45

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: the weight count is fixed; the maximum uses all available biases on the receiving side.

    Exam route: .

    Learning route:

    Step 1: Count the weights. Each of the $5$ neurons receives one weight from each of the $4$ inputs, giving weights. This number does not change with the bias choice.

    Step 2: Count the possible biases. A bias belongs to a neuron that receives a weighted sum, i.e. to one of the $5$ receiving neurons. The largest possible bias set is all $5$ neurons.

    Step 3: Add the two contributions: .

    Step 4: Hence the maximum number of learnable parameters is $25$.

    Tempting wrong path A: dropping biases entirely gives $20$. This is the minimum configuration, not the maximum.

    Tempting wrong path B: attaching biases to the $4$ input values gives (not an option, but a common intermediate error). The break is Step 2: input values are not neurons that receive a weighted sum, so they carry no bias.

    Tempting wrong path C: attaching biases to both sides gives . This invents biases on the input side that the architecture does not contain.

    Tempting wrong path D: doubling the weight count gives $40$, then adding $5$ gives $45$. This misapplies the formula entirely.

    Generalization: biases live on the receiving side of a dense layer; the maximum parameter count is .

    Verification: the layer stores $20$ weight entries and $5$ bias entries, a total of $25$ numbers, and no further parameter can be added.

    Answer: B

    Question 4 · Machine Learning MCQ

    For the ReLU function , what is the minimum possible value of its derivative for ?

    1. A.

    2. B.

      $0$

    3. C.

      $0.5$

    4. D.

      $1$

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: ReLU derivative is piecewise constant — either 0 or 1.

    Step 1: Recall the derivative definition:

    Step 2: For , the derivative takes only two values: 0 (when ) or 1 (when ).

    Step 3: The minimum of these two values is 0.

    Answer: 0

    Common trap: Students sometimes think the derivative can be negative or fractional, but ReLU's piecewise linear nature means the slope is exactly 0 or 1.

    Question 5 · Machine Learning MCQ

    A student claims that because the ReLU function is continuous everywhere, its derivative must take all values between its minimum and maximum. What is the actual minimum number of distinct positive values that the derivative takes over all real ?

    1. A.

      $0$

    2. B.

      $1$

    3. C.

      $2$

    4. D.

      Infinite

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: ReLU is continuous, but its derivative is piecewise constant, not continuous.

    Step 1: Recall the derivative of ReLU:

    Step 2: The student's claim assumes the derivative is continuous because the function is continuous. This is a contradiction; a continuous function can have a discontinuous derivative.

    Step 3: The derivative only takes the values 0 and 1. The only distinct positive value it takes is 1.

    Step 4: The minimum number of distinct positive values is exactly 1.

    Answer: 1

    Common trap: Overcounting by assuming the derivative smoothly transitions between 0 and 1, leading to the choice of "Infinite".

    Question 6 · Machine Learning MCQ

    A student argues that since the ReLU function is continuous everywhere, the set of all its derivative values must form a connected interval. Using the standard deep learning convention , how many distinct elements does the set actually contain?

    1. A.

      $2$

    2. B.

      $3$

    3. C.

      $1$

    4. D.

      Infinite

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: A continuous function can have a discontinuous derivative; the set of derivative values need not be an interval.

    Step 1: Recall the derivative of ReLU:

    With the convention .

    Step 2: List all values taken by :

    • For :
    • For :

    Step 3: The set .

    Step 4: Count the elements: .

    The student's claim that must be an interval is contradicted by the fact that is not an interval (it does not contain $0.5$).

    Answer: 2

    Common trap: Overcounting by assuming the derivative takes all values between 0 and 1 due to continuity of .

    Question 7 · Machine Learning MCQ

    A student claims that since the ReLU function is the integral of its derivative , must be differentiable everywhere. What is the minimum number of points in where this claim fails?

    1. A.

      $0$

    2. B.

      $1$

    3. C.

      $2$

    4. D.

      Infinite

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: The integral of a piecewise constant function can have a point of non-differentiability at the boundary.

    Step 1: Recall the derivative of ReLU:

    Step 2: The student claims is differentiable everywhere because it is the integral of . However, the left-hand derivative at is 0, and the right-hand derivative is 1.

    Step 3: Since the left and right derivatives do not match at , is not differentiable at exactly one point: .

    Step 4: The minimum number of points where the claim fails is 1.

    Answer: 1

    Common trap: Overcounting by assuming the claim fails for all or all , rather than just the single boundary point .

    Question 8 · Machine Learning NAT

    A fully-connected feed-forward MLP has an input layer with 5 neurons, one hidden layer with neurons, and an output layer with 1 neuron. Biases are used at every non-input neuron. If the total number of learnable parameters is at most 37, the maximum possible value of is __________ .

    Correct Answer:

    6.00

    Step-by-Step Solution

    Key idea: express total parameters as a function of , then solve the inequality.

    Step 1: Weights input hidden = ; biases of hidden = .

    Step 2: Weights hidden output = ; bias of output = $1$.

    Step 3: Total .

    Step 4: . Since is an integer, maximum .

    Correction on re-solve: . For : ✓. For : ✗. So maximum .

    Tempting wrong path: omitting the output bias gives , which is the boundary trap.

    Answer: 5.00

    Question 9 · Machine Learning NAT

    A fully-connected feed-forward MLP has an input layer with 6 neurons, two hidden layers with 3 and 2 neurons respectively, and an output layer with 1 neuron. The problem explicitly states that no bias parameters are used. The minimum number of learnable parameters the network must have is __________ .

    Correct Answer:

    26.00

    Step-by-Step Solution

    Key idea: this is a parameter-counting question with the explicit no-bias constraint — a contradiction-style check that the student does not auto-add biases.

    Step 1: Weights input hidden 1 = .

    Step 2: Weights hidden 1 hidden 2 = .

    Step 3: Weights hidden 2 output = .

    Step 4: No biases, so total = .

    Tempting wrong path: adding biases gives $32$, which is the overcounting trap.

    Answer: 26.00

    Question 10 · Machine Learning MCQ

    Consider the following two statements about ReLU-based neural network equivalence:

    Assertion (A): Two ReLU networks are functionally equivalent if all incoming weights to a hidden neuron are multiplied by and all outgoing weights from that neuron are divided by .

    Reason (R): The identity holds for all real numbers .

    1. A.

      Both A and R are true, and R is the correct explanation of A.

    2. B.

      Both A and R are true, but R is not the correct explanation of A.

    3. C.

      A is true but R is false.

    4. D.

      A is false but R is true.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: this is an assertion-reason question testing the domain of the ReLU homogeneity identity.

    Step 1: Assertion (A) is true — this is the standard positive-scaling equivalence for ReLU networks.

    Step 2: Reason (R) claims the identity holds for all real , which is false: for , but .

    Step 3: Therefore A is true and R is false.

    Tempting wrong path: reading R as "all real " and accepting it because the algebra looks valid — this is the unit_mismatch trap (wrong domain).

    Answer: C

    More short notes in this unit