Slides met chatgpt Flashcards

1
Q

What is regularization in machine learning?

A

Regularization consists of strategies explicitly designed to reduce test error, potentially at the expense of increased training error. Its goal is to move a model from overfitting to matching the data complexity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List some common regularization techniques used in deep learning.

A

Common techniques include parameter norm penalties, dataset augmentation, ensemble methods, increasing noise robustness, semi-supervised learning, multitask learning, early stopping, parameter tying and sharing, dropout, and adversarial learning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a parameter norm penalty, and how is it used in regularization?

A

Parameter norm penalties limit model capacity by adding a penalty term,
Ξ©(πœƒ), to the objective function
𝐽J. This regularizes weights
wβŠ‚ΞΈ (excluding biases) to reduce overfitting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define L1 norm penalty and its application in regularization.

A

The L1 norm penalty is defined as
Ξ©(πœƒ)=βˆ₯𝑀βˆ₯1=βˆ‘π‘–βˆ£|π‘€π‘–βˆ£βˆ£. This approach, also known as LASSO, encourages sparsity in the model parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define L2 norm penalty and its application in regularization.

A

The L2 norm penalty is defined as
Ξ©(πœƒ)=βˆ₯ 𝑀 βˆ₯=𝑀𝑇w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is dataset augmentation, and why is it useful?

A

Dataset augmentation involves generating additional synthetic data to enhance the training set. Examples include image transformations (rotation, flips), noise addition in audio, and synonym replacement in text, helping improve model generalization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain ensemble methods and their role in reducing model error.

A

Ensemble methods combine multiple learners to reduce error by averaging predictions. Techniques like bagging, boosting, and stacking are used to generate diverse models that reduce the variance in predictions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe dropout as a regularization technique.

A

Dropout is a technique where units in a neural network are randomly β€œdropped” (set to zero) during training, forcing the network to learn redundant representations. This can be thought of as training an ensemble of subnetworks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the early stopping technique in model training?

A

Early stopping involves monitoring validation error during training and halting training when validation error no longer improves, preventing overfitting to the training data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define parameter tying and parameter sharing.

A

Parameter tying keeps parameters close by adding a penalty to the loss, while parameter sharing enforces identical parameters, common in CNNs, to reduce memory usage and improve efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the difference between deterministic and stochastic gradient descent.

A

Deterministic gradient descent uses the whole dataset for each update, while stochastic gradient descent (SGD) updates weights based on individual data points or small minibatches, adding noise to the learning process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is momentum in optimization, and why is it used?

A

Momentum is a technique that accelerates gradient descent by maintaining a moving average of past gradients, helping the model navigate along consistent gradient directions and dampen oscillations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe the Adam optimizer.

A

Adam (Adaptive Moments) is an optimization algorithm that adjusts learning rates based on the moments (mean and uncentered variance) of the gradients, providing more efficient convergence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are Convolutional Neural Networks (CNNs) designed for?

A

CNNs are designed for data with grid-like structure, such as images (2D grids of pixels) and time-series data (1D grids of samples). They use convolution in place of general matrix multiplication in certain layers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a convolution operation in CNNs?

A

Convolution in CNNs involves sliding a filter (kernel) over the input to compute feature maps, capturing spatial hierarchies in data by leveraging sparse interactions, parameter sharing, and equivariance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define pooling in the context of CNNs.

A

Pooling reduces the spatial dimensions of feature maps, typically by taking the max or average in each neighborhood. This introduces translation invariance and reduces the number of parameters in the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are Recurrent Neural Networks (RNNs) used for?

A

RNNs are designed for sequential data and allow parameter sharing over time, making them effective for tasks like language modeling and time-series forecasting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain the concept of unfolding in RNNs.

A

Unfolding is the process of representing the computational graph of an RNN across time steps, allowing the network to learn temporal dependencies through recurrent connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Summarize the bias-variance trade-off in machine learning.

A

The bias-variance trade-off describes how increasing model complexity reduces bias but increases variance. A balanced model minimizes both to avoid underfitting and overfitting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How do you determine the number of trainable weights in a neural network, excluding biases?

A

Count the total connections (arrows) between nodes. Each connection represents a unique weight to be trained.

21
Q

How do you determine the total number of weights in a neural network, including biases?

A

Count each connection plus one bias per non-input node.

22
Q

In backpropagation, which paths in a computational graph are relevant?

A

Only paths that connect trainable parameters to the final loss (J). Paths that don’t lead to J are irrelevant.

23
Q

Compute the partial derivative of y-hat with respect to weight w^(2)_i if y-hat = h^T * w^(2).

A

The answer is h_i, which represents the activation from the previous layer at node i.

24
Q

Compute the derivative of h_i with respect to u_j if h_i = ReLU(u_i).

A
  • If i β‰  j, the answer is 0.

If i = j:
The derivative is 1 if u_i > 0.
The derivative is 0 if u_i <= 0.

25
Q

What is the XOR problem, and why is it significant for neural networks?

A

XOR is a linearly non-separable problem, meaning it cannot be solved by a single layer. It shows the need for hidden layers to solve non-linear problems.

26
Q

In an XOR network with ReLU activation and hidden biases of -0.5, what should the hidden-output weights v1 and v2 be?

A

Set v1 = v2 = 2. This allows the network to output 1 when inputs differ and 0 when they are the same.

27
Q

List two advantages of using ReLU activation over sigmoid activation.

A

1) ReLU is computationally efficient to calculate and backpropagate.
2) ReLU does not saturate when x > 0, preventing gradient vanishing for positive values.

28
Q

Name three regularization techniques for neural networks.

A

Examples include:

Parameter Norm Penalties
Dataset Augmentation
Noise Robustness
Semi-Supervised Learning
Early Stopping
Dropout

29
Q

Which regularization technique (L1 or L2) encourages sparsity in weights? Why?

A

L1 norm, as it drives small weights to zero, whereas L2 norm results in weights that are small but usually not zero.

30
Q

Dropout in neural networks is an approximation of what ensemble method?

A

Dropout approximates β€œbagging,” training a kind of ensemble by randomly omitting units, effectively training many subnetworks.

31
Q

Describe the difference between SMOTE and mixup data augmentation techniques.

A

SMOTE generates synthetic data within a single class, often for upsampling minorities. Mixup interpolates between classes, creating soft memberships for classes.

32
Q

Which regularization technique is used by convolutional filters in CNNs?

A

Parameter sharing, where filters use the same weights across different input regions, saving memory and improving efficiency.

33
Q

What is the result of a 2D convolution on an image with a 3x3 filter and stride 1?

A

The output matrix is smaller than the input. Each entry is the sum of element-wise products between the filter and image patch it overlays.

34
Q

Describe the result of a 2x2 max pooling operation on a 3x3 matrix.

A

Max pooling with stride 1 slides a 2x2 window over the matrix, reducing spatial dimensions by taking the maximum value in each window.

35
Q

What are two key advantages of ReLU activation in neural networks?

A

1) Efficiency in computation, making ReLU fast to evaluate.
2) It does not saturate for positive inputs, avoiding gradient vanishing in the positive range.

36
Q

List three regularization techniques specific to deep neural networks.

A

Examples include Dropout, Early Stopping, and Adversarial Learning.

37
Q

Which norm (L1 or L2) is more likely to yield sparse weights, and why?

A

L1 norm, because it tends to drive small weights to zero, leading to fewer active features compared to L2.

38
Q

What ensemble method does dropout approximate in a practical way for deep networks?

A

Dropout approximates β€œbagging” by training many subnetworks, each with a random subset of active units, making it a practical ensemble method for large networks.

39
Q

What is the main difference between SMOTE and mixup for data augmentation?

A

SMOTE focuses on generating new samples within a single class for upsampling, while mixup interpolates between classes, creating data that can belong partially to multiple classes.

40
Q

Which regularization technique do convolutional filters in CNNs use to improve efficiency?

A

Parameter sharing, where the same weights are reused across different spatial regions, reducing the number of parameters.

41
Q

How do you perform a convolution operation on a binary input image with a binary filter?

A

Slide the filter over the image, multiplying and summing the overlapping values in each position to produce a new matrix (output image).

42
Q

After applying a 3x3 convolution filter with stride 1 on a 4x4 image, what is the size of the resulting image?

A

The resulting image will be 2x2, since the filter moves one step at a time, covering 3x3 sections of the original image.

43
Q

What is max pooling, and how does it work in a CNN?

A

Max pooling reduces dimensionality by taking the maximum value in a defined window (e.g., 2x2), summarizing the most significant feature in that region.

44
Q

What is the purpose of max pooling after a convolution operation?

A

Max pooling introduces translation invariance and reduces the spatial size, retaining only the strongest feature responses in each region.

45
Q

How do you perform a 2x2 max pooling operation on a 3x3 matrix with stride 1?

A

Slide a 2x2 window across the matrix with one-step strides, and replace each region with its maximum value to create a reduced matrix.

46
Q

: Why is max pooling useful in convolutional neural networks?

A

It reduces computation by downsampling, and it introduces invariance to small translations, allowing the network to focus on more significant features.

47
Q

In a neural network, why might dropout be preferred over training a full ensemble?

A

Dropout is faster and less memory-intensive, as it approximates ensemble training by randomly deactivating units rather than training many separate networks.

48
Q
A