1. Home
  2. Explore
  3. Computer Science
  4. MIT 6.S191 Deep Learning Intro

Study methods

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

MIT 6.S191 Deep Learning Intro

  • 40Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Definitions and Overview

Define intelligence as described in the lecture.

40 questions

  1. 1

    Define intelligence as described in the lecture.

    Model answer

    Intelligence is the ability to process information to inform future decisions.

    Explanation

    This definition sets the foundation for understanding artificial intelligence and machine learning as fields that aim to replicate this process in algorithms.

  2. 2

    What is the field of artificial intelligence focused on?

    Model answer

    Artificial intelligence focuses on building algorithms that can process information to inform future decisions.

    Explanation

    AI is a broad field; machine learning and deep learning are specific subsets within it.

  3. 3

    How does machine learning differ from traditional programming?

    Model answer

    Machine learning teaches an algorithm how to perform a task without being explicitly programmed for that task, by learning from data.

    Explanation

    Traditional programming requires explicit rules, while machine learning algorithms derive rules from examples.

  4. 4

    What is the key idea of deep learning?

    Model answer

    Deep learning automatically extracts useful pieces of information needed to make predictions or decisions directly from raw data.

    Explanation

    This automatic feature extraction replaces hand-engineering of features and allows learning hierarchical representations.

  5. 5

    List three reasons why deep learning has become popular now.

    Model answer

    Deep learning has become popular due to the pervasive availability of big data, the parallelizability of algorithms benefiting from modern GPUs, and the development of open-source toolboxes like TensorFlow that streamline building and deploying models.

    Explanation

    These factors address the historical limitations of data scarcity, computational power, and ease of implementation.

  6. 6

    How does deep learning automatically extract features from raw data?

    Model answer

    Deep learning builds a hierarchical representation: it first detects simple features like lines and edges, then combines them into mid-level features (eyes, nose), and finally into high-level features (face structure) to detect the target object.

    Explanation

    This layered approach allows the network to learn increasingly abstract representations without manual feature engineering.

  7. 7

    Describe the forward propagation of information through a single neuron (perceptron).

    Model answer

    The neuron takes inputs x1,x2,...,xmx_1, x_2, ..., x_mx1​,x2​,...,xm​, multiplies each by its corresponding weight wiw_iwi​, sums the products and adds a bias bbb, then passes the result through a nonlinear activation function ggg to produce the output yyy.

    Explanation

    Mathematically, y=g(∑i=1mwixi+b)y = g(\sum_{i=1}^m w_i x_i + b)y=g(∑i=1m​wi​xi​+b) or in vector form y=g(W⋅X+b)y = g(W \cdot X + b)y=g(W⋅X+b).

  8. 8

    What is the purpose of the bias term in a neuron?

    Model answer

    The bias allows the activation function to be shifted left or right, independent of the inputs, giving the neuron more flexibility to fit the data.

    Explanation

    Without a bias, the decision boundary would always pass through the origin, limiting the model's representational capacity.

  9. 9

    Why are nonlinear activation functions crucial in neural networks?

    Model answer

    Nonlinear activation functions allow the network to model complex, nonlinear relationships in data; without them, stacking linear layers would still result in a linear model, limiting representational power.

    Explanation

    Real-world data is almost always nonlinear, so nonlinearities enable neural networks to approximate arbitrary functions.

  10. 10

    What is the sigmoid activation function, and what is a common use case?

    Model answer

    The sigmoid function maps any real number to a value between 0 and 1, making it useful for representing probabilities, especially in binary classification.

    Explanation

    Its bounded output directly models the probability of a binary outcome.

  11. 11

    What happens if you use a linear activation function in all layers of a neural network?

    Model answer

    Composing linear functions results in another linear function, so the network can only learn linear decision boundaries, no matter how many layers it has.

    Explanation

    This severely limits the network's ability to model complex, nonlinear patterns in data.

  12. 12

    How do nonlinearities enable neural networks to approximate complex functions?

    Model answer

    Nonlinearities allow the network to create nonlinear decision boundaries by composing simple nonlinear transformations, enabling it to approximate arbitrarily complex functions.

    Explanation

    This is the key power of deep learning: it can learn highly nonlinear mappings from inputs to outputs.

  13. 13

    What is a dense layer in a neural network?

    Model answer

    A dense layer is a fully connected layer where every neuron in the layer connects to every neuron in the previous layer, each with its own weight.

    Explanation

    Dense layers are the fundamental building blocks of feedforward neural networks, also called fully connected layers.

  14. 14

    How do you create a multi-output perceptron layer?

    Model answer

    A multi-output perceptron layer consists of multiple perceptrons (neurons) that each receive the same inputs but have their own set of weights and biases, producing multiple outputs.

    Explanation

    Each output neuron independently computes its output as yj=g(∑iwijxi+bj)y_j = g(\sum_i w_{ij} x_i + b_j)yj​=g(∑i​wij​xi​+bj​).

  15. 15

    What is a hidden layer, and why are its states not directly observable?

    Model answer

    A hidden layer is a layer between the input and output layers; its states (activations) are learned by the network and not directly enforced by the data, making them unobservable.

    Explanation

    Hidden layers enable the network to learn increasingly abstract representations of the input.

  16. 16

    In a single hidden layer network, what are the two weight matrices?

    Model answer

    The first weight matrix W1W_1W1​ connects the input layer to the hidden layer, and the second weight matrix W2W_2W2​ connects the hidden layer to the output layer.

    Explanation

    Each layer's weights are learned during training to minimize the loss function.

  17. 17

    How can you implement a dense layer in TensorFlow?

    Model answer

    A dense layer can be implemented using tf.keras.layers.Dense(units, activation), where units specifies the number of output neurons and activation specifies the activation function.

    Explanation

    TensorFlow provides pre-built layers that handle weight initialization and forward propagation automatically.

  18. 18

    What is a sequential model in TensorFlow?

    Model answer

    A sequential model is a wrapper that allows layers to be stacked in sequence, so the output of each layer is passed as input to the next.

    Explanation

    It is the simplest way to build feedforward neural networks in TensorFlow.

  19. 19

    How do you build a deep neural network in TensorFlow?

    Model answer

    A deep neural network is built by stacking multiple dense layers inside a tf.keras.Sequential model, with each layer having its own parameters.

    Explanation

    Adding more layers creates a deeper hierarchy of representations.

  20. 20

    Why must we train a neural network before using it for predictions?

    Model answer

    Initially, the network's weights are random, so it has no knowledge of the task; training adjusts the weights to minimize the loss, enabling accurate predictions.

    Explanation

    Training uses labeled data to learn the mapping from inputs to outputs.

  21. 21

    What is the purpose of a loss function?

    Model answer

    The loss function quantifies the error between the network's prediction and the true target, providing a measure of how wrong the network is.

    Explanation

    The goal of training is to minimize this loss by updating the weights.

  22. 22

    Name the loss function used for binary classification problems in the lecture.

    Model answer

    Softmax cross-entropy loss is used for binary classification (and also multi-class).

    Explanation

    Cross-entropy measures the difference between the predicted probability distribution and the true distribution.

  23. 23

    Name the loss function used for regression problems in the lecture.

    Model answer

    Mean squared error (MSE) loss is used for regression problems.

    Explanation

    MSE computes the average squared difference between predictions and true values.

  24. 24

    What is the empirical risk or objective function?

    Model answer

    The empirical risk is the average of individual loss values over all training examples, denoted as J(W)=1N∑i=1NL(yi,y^i)J(W) = \frac{1}{N}\sum_{i=1}^N L(y_i, \hat{y}_i)J(W)=N1​∑i=1N​L(yi​,y^​i​).

    Explanation

    Minimizing the empirical risk during training helps the network generalize to new data.

  25. 25

    Explain the gradient descent algorithm in your own words.

    Model answer

    Gradient descent starts with random weights, computes the gradient of the loss with respect to each weight (which points uphill), and updates the weights in the opposite direction by a small step called the learning rate.

    Explanation

    This process is iterated to find the weight configuration that minimizes the loss.

  26. 26

    What is the role of the learning rate in gradient descent?

    Model answer

    The learning rate (η\etaη) determines the size of the step taken in the direction opposite to the gradient at each iteration.

    Explanation

    A properly set learning rate balances convergence speed and stability.

  27. 27

    What problems can occur if the learning rate is too small? Too large?

    Model answer

    A too-small learning rate can cause the model to get stuck in local minima or converge very slowly; a too-large learning rate can cause the model to overshoot the minimum and diverge.

    Explanation

    Choosing an appropriate learning rate is critical for successful training.

  28. 28

    What are adaptive learning rates, and why are they useful?

    Model answer

    Adaptive learning rates adjust the learning rate during training (e.g., increase or decrease based on the loss landscape) to avoid local minima and improve convergence.

    Explanation

    Examples include Adam, RMSprop, etc.; they are more robust than using a fixed learning rate.

  29. 29

    What is backpropagation, and how does it compute gradients?

    Model answer

    Backpropagation computes the gradient of the loss with respect to each weight by applying the chain rule of calculus, propagating the error from the output layer back through the network to the input.

    Explanation

    It efficiently calculates all partial derivatives needed for gradient descent.

  30. 30

    Explain how the chain rule is used in backpropagation.

    Model answer

    For a weight w2w_2w2​ connecting the hidden layer to the output, the gradient ∂L/∂w2\partial L/\partial w_2∂L/∂w2​ is computed as (∂L/∂y)(∂y/∂w2)(\partial L/\partial y)(\partial y/\partial w_2)(∂L/∂y)(∂y/∂w2​). For a deeper weight like w1w_1w1​, it requires further application of the chain rule, e.g., ∂L/∂w1=(∂L/∂y)(∂y/∂z)(∂z/∂w1)\partial L/\partial w_1 = (\partial L/\partial y)(\partial y/\partial z)(\partial z/\partial w_1)∂L/∂w1​=(∂L/∂y)(∂y/∂z)(∂z/∂w1​).

    Explanation

    This recursive application propagates gradients from the output back to the input.

  31. 31

    How does automatic differentiation help in training neural networks?

    Model answer

    Automatic differentiation frameworks like TensorFlow compute gradients automatically via backpropagation, so the practitioner does not need to manually derive or implement gradient calculations.

    Explanation

    This simplifies training and enables rapid prototyping of complex networks.

  32. 32

    Why must backpropagation be repeated for every weight in the network?

    Model answer

    Gradient descent requires the gradient of the loss with respect to every weight; backpropagation computes all these gradients efficiently in a single pass.

    Explanation

    Each weight needs its own update step based on its contribution to the loss.

  33. 33

    What is mini-batch gradient descent, and why is it preferred over full batch or stochastic gradient descent?

    Model answer

    Mini-batch gradient descent computes the gradient using a small batch of BBB data points, balancing between the noise of stochastic gradient descent (one point) and the computational cost of full batch gradient descent (all points).

    Explanation

    It is more efficient and often leads to faster convergence with more accurate gradient estimates.

  34. 34

    How does mini-batching enable parallelization?

    Model answer

    Each sample in a mini-batch can be processed independently, so computations can be distributed across multiple GPUs or machines, achieving significant speedups.

    Explanation

    This parallel computation is a major advantage for training large models on large datasets.

  35. 35

    Define overfitting and underfitting in machine learning.

    Model answer

    Overfitting occurs when the model learns to memorize the training data too well, including noise, and fails to generalize to new data. Underfitting happens when the model is too simple to capture the underlying pattern in the data.

    Explanation

    The ideal model balances bias and variance to generalize well.

  36. 36

    What is the goal of regularization in neural networks?

    Model answer

    Regularization aims to discourage the model from learning overly complex patterns or memorizing training data, thereby improving generalization to unseen data.

    Explanation

    It helps prevent overfitting.

  37. 37

    Explain the dropout regularization technique.

    Model answer

    During training, dropout randomly sets the activations of a fraction of hidden neurons to zero with probability ppp (typically 0.5), effectively dropping them out for that iteration.

    Explanation

    This prevents the network from relying on specific neurons and forces it to learn more robust representations.

  38. 38

    How does dropout prevent overfitting?

    Model answer

    By randomly dropping neurons each iteration, the network cannot build memorization pathways that rely on specific neurons, forcing it to utilize multiple redundant pathways and thus generalize better.

    Explanation

    It also acts as an ensemble method by training different subnetworks.

  39. 39

    What is early stopping, and how does it combat overfitting?

    Model answer

    Early stopping monitors the loss on a validation set during training and stops when the validation loss begins to increase (the inflection point), preventing further training that would lead to overfitting.

    Explanation

    It ensures the model does not memorize the training data beyond the point of optimal generalization.

  40. 40

    During training, what indicates that a model is overfitting?

    Model answer

    Overfitting is indicated when the training loss continues to decrease while the validation (or test) loss starts to increase, signaling that the model is memorizing the training data rather than learning general patterns.

    Explanation

    This divergence is a key sign to stop training or apply regularization.

1 of 40
Question 1 of 40

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent