1. Home
  2. Explore
  3. Computer Science
  4. Neural Networks Intro

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Neural Networks Intro

  • 30Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Neural Network Basics

What was the primary inspiration for the development of artificial neural networks?

30 questions

  1. 1

    What was the primary inspiration for the development of artificial neural networks?

    1. A

      The architecture of the first digital computers

    2. B

      The structure of the human brain and its neurons

    3. C

      The principles of Boolean algebra and logic gates

    4. D

      The mathematical theory of linear algebra

    Correct answer
    B

    The structure of the human brain and its neurons

    Explanation

    Artificial neural networks were inspired by biological neural networks, particularly the way neurons in the human brain are connected and communicate via electrical signals.

  2. 2

    In a biological neural network, what important property did scientists observe about neurons?

    1. A

      They are connected to each other and can propagate electrical signals and become activated

    2. B

      They only receive signals but never send them

    3. C

      They are isolated cells that do not communicate with each other

    4. D

      They are all identical in function and structure

    Correct answer
    A

    They are connected to each other and can propagate electrical signals and become activated

    Explanation

    Scientists observed that neurons are connected, receive and propagate electrical signals, and can become activated, which inspired artificial neurons.

  3. 3

    What is an artificial neural network (ANN) fundamentally?

    1. A

      A database of labeled examples used for classification

    2. B

      A physical network of electronic components that mimic the brain

    3. C

      A set of rules for programming intelligent behavior

    4. D

      A mathematical model for learning inspired by biological neural networks

    Correct answer
    D

    A mathematical model for learning inspired by biological neural networks

    Explanation

    An artificial neural network is a mathematical model for learning, inspired by biological neural networks. It maps inputs to outputs through a structure of units and weights.

  4. 4

    In the hypothesis function for a simple neural network with inputs x1 and x2, what does the term w0 represent?

    1. A

      The weight for input x2

    2. B

      The weight for input x1

    3. C

      A bias term that shifts the function up or down

    4. D

      The output of the activation function

    Correct answer
    C

    A bias term that shifts the function up or down

    Explanation

    w0 is the bias term, also called weight 0, which is not multiplied by any input; it shifts the activation function's value. It is often used to adjust the threshold.

  5. 5

    What is the output of the step activation function when the input is -1?

    1. A

      -1

    2. B

      1

    3. C

      Undefined

    4. D

      0

    Correct answer
    D

    0

    Explanation

    The step function outputs 1 if the input is at least 0, and 0 otherwise. Since -1 is less than 0, the output is 0.

  6. 6

    Which activation function produces an S-shaped curve and outputs values between 0 and 1, often interpreted as a probability?

    1. A

      Rectified linear unit (ReLU)

    2. B

      Logistic sigmoid function

    3. C

      Softmax function

    4. D

      Step function

    Correct answer
    B

    Logistic sigmoid function

    Explanation

    The logistic sigmoid function has an S-shaped curve and outputs a value in (0,1), making it suitable for representing probabilities.

  7. 7

    How does the ReLU activation function behave for negative inputs?

    1. A

      It outputs -1

    2. B

      It outputs a small positive number

    3. C

      It outputs 0

    4. D

      It outputs the input value unchanged

    Correct answer
    C

    It outputs 0

    Explanation

    ReLU takes the maximum of the input and 0. For negative inputs, the output is 0; for positive inputs, it outputs the input unchanged.

  8. 8

    In a neural network implementing the OR function with two binary inputs, what bias value is used along with weights of 1 for each input?

    1. A

      -2

    2. B

      1

    3. C

      0

    4. D

      -1

    Correct answer
    D

    -1

    Explanation

    For the OR function, weights 1 and bias -1 with a step activation correctly output 0 only when both inputs are 0, and 1 otherwise.

  9. 9

    What is the primary limitation of a single perceptron (a single unit with a binary activation)?

    1. A

      It always overfits the training data

    2. B

      It cannot handle more than two inputs

    3. C

      It can only learn linearly separable decision boundaries

    4. D

      It requires too many training examples

    Correct answer
    C

    It can only learn linearly separable decision boundaries

    Explanation

    A single perceptron defines a linear decision boundary. It cannot solve problems where classes are not linearly separable, such as the XOR problem.

  10. 10

    In gradient descent for training neural networks, what is the first step after initializing weights randomly?

    1. A

      Propagate the error backward through the network

    2. B

      Calculate the gradient based on all data points

    3. C

      Update the weights according to the gradient

    4. D

      Choose a learning rate

    Correct answer
    B

    Calculate the gradient based on all data points

    Explanation

    Gradient descent repeats: calculate the gradient (direction of steepest descent) based on all data, then update weights a small step in that direction. Starting from random weights, we first calculate the gradient.

  11. 11

    Why is standard gradient descent considered computationally expensive for large datasets?

    1. A

      It requires a validation set for every update

    2. B

      It cannot run on modern GPUs

    3. C

      It requires calculating the gradient using all data points each iteration

    4. D

      It uses only one data point at a time, which is slow to converge

    Correct answer
    C

    It requires calculating the gradient using all data points each iteration

    Explanation

    Standard gradient descent computes the gradient over the entire dataset, which can be very slow with large datasets because every iteration processes all data.

  12. 12

    What is the key difference between stochastic gradient descent (SGD) and standard gradient descent?

    1. A

      SGD calculates the gradient using a single randomly chosen data point at each step

    2. B

      SGD uses all data points but with a different loss function

    3. C

      SGD uses a fixed learning rate while gradient descent adjusts it

    4. D

      SGD is only used for unsupervised learning

    Correct answer
    A

    SGD calculates the gradient using a single randomly chosen data point at each step

    Explanation

    Stochastic gradient descent estimates the gradient using one data point per iteration, making it faster but with a less accurate gradient estimate compared to using all data.

  13. 13

    What is mini-batch gradient descent?

    1. A

      A method that combines gradient descent with backpropagation in a single step

    2. B

      A method that uses the entire dataset but only every few iterations

    3. C

      A method that divides the dataset into small batches and uses each batch to compute the gradient

    4. D

      A method that uses a single data point but trains for many epochs

    Correct answer
    C

    A method that divides the dataset into small batches and uses each batch to compute the gradient

    Explanation

    Mini-batch gradient descent is a middle ground: it uses small, random batches of data to compute the gradient, balancing speed and accuracy.

  14. 14

    What is the purpose of backpropagation in training multilayer neural networks?

    1. A

      To randomly initialize the weights of all layers

    2. B

      To propagate the error from the output layer back to hidden layers to update weights

    3. C

      To propagate inputs forward through the network to compute the output

    4. D

      To reduce the number of units in the network during training

    Correct answer
    B

    To propagate the error from the output layer back to hidden layers to update weights

    Explanation

    Backpropagation computes the gradient of the loss with respect to each weight by propagating the error backward from the output layer through hidden layers, enabling weight updates.

  15. 15

    In the context of neural networks, what is dropout and why is it used?

    1. A

      A regularization technique that randomly removes units during training to prevent overfitting

    2. B

      A technique to add noise to the input data to improve robustness

    3. C

      A method to permanently delete irrelevant neurons from the network

    4. D

      A way to reduce the learning rate when training stalls

    Correct answer
    A

    A regularization technique that randomly removes units during training to prevent overfitting

    Explanation

    Dropout temporarily drops randomly selected units (and their connections) during training. This prevents over-reliance on specific units and reduces overfitting.

  16. 16

    In a multilayer neural network, what role do hidden layers play?

    1. A

      They directly output the final classification without any processing

    2. B

      They learn intermediate representations or features by combining inputs to model complex functions

    3. C

      They store the training data for later retrieval

    4. D

      They reduce the number of input units needed

    Correct answer
    B

    They learn intermediate representations or features by combining inputs to model complex functions

    Explanation

    Hidden layers allow the network to learn multiple decision boundaries or features that combine to solve non-linearly separable problems.

  17. 17

    What does the term 'deep neural network' refer to?

    1. A

      A neural network trained with backpropagation

    2. B

      A neural network that uses deep learning algorithms

    3. C

      A neural network with a very large number of input units

    4. D

      A neural network with multiple hidden layers

    Correct answer
    D

    A neural network with multiple hidden layers

    Explanation

    A deep neural network is characterized by having multiple hidden layers, allowing it to model hierarchical features.

  18. 18

    Which of the following is NOT a hyperparameter in a neural network?

    1. A

      The number of hidden layers

    2. B

      The activation function used

    3. C

      The number of units in a hidden layer

    4. D

      The weights of the connections

    Correct answer
    D

    The weights of the connections

    Explanation

    Weights are learned parameters, not hyperparameters. Hyperparameters like number of layers, units, and activation function are set before training.

  19. 19

    In computer vision, how is a grayscale image typically represented numerically?

    1. A

      As a 1D list of RGB values for each pixel

    2. B

      As a 3D tensor with separate channels for red, green, and blue

    3. C

      As a single number representing the average brightness

    4. D

      As a 2D grid of pixel values, each ranging from 0 to 255

    Correct answer
    D

    As a 2D grid of pixel values, each ranging from 0 to 255

    Explanation

    A grayscale image has one intensity value per pixel, often 0 (black) to 255 (white), arranged in a 2D grid.

  20. 20

    What is image convolution in the context of neural networks?

    1. A

      Combining two images by averaging their pixel values

    2. B

      Flattening a 2D image into a 1D vector

    3. C

      Applying a filter (kernel) to an image to produce a feature map by sliding the kernel across the image

    4. D

      Reducing the size of an image by selecting maximum values in regions

    Correct answer
    C

    Applying a filter (kernel) to an image to produce a feature map by sliding the kernel across the image

    Explanation

    Convolution slides a kernel over the image, computing element-wise multiplication and summing to produce a feature map that highlights features like edges.

  21. 21

    What does the kernel with 8 in the center and -1 on all neighbors detect in an image?

    1. A

      Edges where a pixel's value differs from its neighbors

    2. B

      Regions of uniform color

    3. C

      The average brightness of the image

    4. D

      Horizontal lines only

    Correct answer
    A

    Edges where a pixel's value differs from its neighbors

    Explanation

    This kernel produces large positive values when the center pixel is different from its neighbors, thus detecting edges. Uniform areas yield near zero values.

  22. 22

    What is the purpose of max-pooling in a convolutional neural network?

    1. A

      To randomly drop out pixels to prevent overfitting

    2. B

      To increase the resolution of the image by interpolating values

    3. C

      To reduce the spatial dimensions of feature maps while retaining the most salient features

    4. D

      To apply a non-linear activation function to the feature maps

    Correct answer
    C

    To reduce the spatial dimensions of feature maps while retaining the most salient features

    Explanation

    Max-pooling selects the maximum value from each region, downsampling the feature map and making the representation more robust to small translations.

  23. 23

    In a typical CNN architecture, what is the correct order of layers after the input image?

    1. A

      Convolution, pooling, flatten, then dense layers

    2. B

      Pooling, convolution, flatten, then dense layers

    3. C

      Flatten, convolution, pooling, then dense layers

    4. D

      Dense layers, convolution, pooling, then flatten

    Correct answer
    A

    Convolution, pooling, flatten, then dense layers

    Explanation

    A typical CNN applies convolution followed by pooling to extract features, then flattens the result and passes it through one or more dense layers for classification.

  24. 24

    What is the softmax activation function typically used for in neural networks?

    1. A

      To ensure all outputs are non-negative by setting negative values to 0

    2. B

      To convert a vector of raw scores into a probability distribution over multiple classes

    3. C

      To reduce the number of output units by combining them

    4. D

      To output a binary value (0 or 1) for binary classification

    Correct answer
    B

    To convert a vector of raw scores into a probability distribution over multiple classes

    Explanation

    Softmax takes a vector and produces probabilities that sum to 1, making it ideal for multi-class classification problems.

  25. 25

    What is a key limitation of feed-forward neural networks that recurrent neural networks (RNNs) address?

    1. A

      Feed-forward networks cannot handle sequential data with variable-length inputs or outputs

    2. B

      Feed-forward networks cannot use backpropagation

    3. C

      Feed-forward networks require too many layers to be effective

    4. D

      Feed-forward networks are too slow to train

    Correct answer
    A

    Feed-forward networks cannot handle sequential data with variable-length inputs or outputs

    Explanation

    Feed-forward networks have fixed-size input and output, making them unsuitable for sequences. RNNs can process variable-length sequences by maintaining a hidden state.

  26. 26

    How does a recurrent neural network (RNN) maintain information across time steps?

    1. A

      By increasing the number of hidden units dynamically

    2. B

      By using a convolutional layer to process sequences

    3. C

      By storing all past inputs in a separate memory buffer

    4. D

      By feeding its output back as input for the next time step, creating a memory of past inputs

    Correct answer
    D

    By feeding its output back as input for the next time step, creating a memory of past inputs

    Explanation

    RNNs have connections that feed the output or hidden state back into the network at the next time step, allowing them to accumulate information over time.

  27. 27

    Which type of RNN architecture is best suited for a task like image captioning, where a single image is used to generate a sequence of words?

    1. A

      Many-to-one architecture

    2. B

      One-to-one architecture

    3. C

      One-to-many architecture

    4. D

      Many-to-many architecture

    Correct answer
    C

    One-to-many architecture

    Explanation

    Image captioning takes one input (image) and produces many outputs (words), so a one-to-many RNN architecture is appropriate.

  28. 28

    For sentiment analysis of a movie review (sequence of words) to classify it as positive or negative, which RNN architecture is used?

    1. A

      Many-to-one architecture

    2. B

      One-to-many architecture

    3. C

      Many-to-many architecture

    4. D

      One-to-one architecture

    Correct answer
    A

    Many-to-one architecture

    Explanation

    The input is a sequence (many words), and the output is a single classification (positive or negative), so a many-to-one architecture is used.

  29. 29

    What is the many-to-many architecture of RNN typically used for?

    1. A

      Classifying a video into a single category

    2. B

      Machine translation, where both input and output are sequences of variable length

    3. C

      Image classification with a single label

    4. D

      Generating a caption from an image

    Correct answer
    B

    Machine translation, where both input and output are sequences of variable length

    Explanation

    Machine translation takes a sequence (source language) and outputs a sequence (target language), often of different lengths, making many-to-many RNNs suitable.

  30. 30

    What does LSTM stand for in the context of recurrent neural networks?

    1. A

      Localized Stochastic Transformation Method

    2. B

      Large Sequential Training Module

    3. C

      Long Short-Term Memory

    4. D

      Linear Sequential Temporal Model

    Correct answer
    C

    Long Short-Term Memory

    Explanation

    LSTM stands for Long Short-Term Memory, a type of RNN designed to capture long-range dependencies in sequences.

Question 1 of 30
Question 1 of 30

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent