Deep Learning Fundamentals - The Multi-Layer Perceptron Flashcards

1
Q

What is a perceptron?

A

A perceptron is the simplest type of artificial neural network that acts as a binary classifier, introduced by Frank Rosenblatt in 1958.

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

What are the main components of a perceptron?

A

Inputs, weights, bias, summation function, and activation function.

  • Inputs:These are the features or attributes of the data (e.g., pixel values in an image).
  • Weights:Each input is multiplied by a corresponding weight, which signifies its importance.
  • Bias:A constant added to adjust the decision boundary.
  • Summation Function:Adds the weighted inputs and the bias.
  • Activation Function:Determines the output based on the summation function. Typically, for a perceptron, the step function is used, which outputs 1 or 0.

Example:If the perceptron has inputsx1,x2,…,xnx1​,x2​,…,xn​and corresponding weightsw1,w2,…,wnw1​,w2​,…,wn​, the output is calculated as:
y={1if∑i=1nwixi+b>00otherwisey={10​if∑i=1n​wi​xi​+b>0otherwise​

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

Write the formula for calculating the perceptron’s weighted sum.

A

z=∑wixi+bz=∑wi​xi​+b, wherewiwi​are weights,xixi​are inputs, andbbis the bias.

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

What is the role of the activation function in a perceptron?

A

The activation function determines the output of the perceptron based on the weighted sum.

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

What is the main limitation of a single-layer perceptron?

A

It cannot classify non-linearly separable data or capture complex patterns.

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

What is the difference between weights and bias in a perceptron?

A

Weights determine the importance of each input, while bias shifts the decision boundary.

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

What is a Multi-Layer Perceptron (MLP)?

A

A Multi-Layer Perceptron (MLP) is a type of artificial neural network composed of multiple layers of neurons: an input layer, one or more hidden layers, and an output layer. Unlike a single-layer perceptron that can only model linear relationships, an MLP can model complex, non-linear relationships due to its multiple layers and non-linear activation functions. For example, an MLP can be trained to recognize handwritten digits by learning patterns in pixel data through its layered structure, enabling it to distinguish between different numbers based on their shapes.

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

Why are activation functions important in an MLP?

A

Activation functions introduce non-linearity into the network, allowing the MLP to learn and model complex patterns that linear models cannot capture. Without activation functions, the network would be equivalent to a linear regression model, regardless of the number of layers, and would fail to solve non-linear problems. Activation functions enable the network to stack layers and learn intricate representations of data, which is essential in tasks like image and speech recognition.

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

How does backpropagation work in an MLP?

A

Backpropagation is the algorithm used to train MLPs by updating their weights to minimize the error between predicted and actual outputs. It involves:
Forward Pass: Inputs are passed through the network to generate an output.
Error Calculation: The loss function computes the difference between the network’s output and the true output.
Backward Pass: The error is propagated backward through the network, layer by layer, by computing the gradient of the loss function with respect to each weight using the chain rule.
Weight Update: Weights are adjusted in the opposite direction of the gradient to reduce the loss.
Example: In teaching the network to recognize handwritten digits, backpropagation adjusts the weights so the network’s output increasingly matches the correct digit labels over time.

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

What is the role of the loss function in training an MLP?

A

The loss function quantifies the difference between the network’s predicted outputs and the actual target values. It serves as a guide for the training process by indicating how well the network is performing. During backpropagation, the gradients of the loss function with respect to the network’s weights are calculated to adjust the weights in a direction that minimizes the loss.

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

Which optimization algorithms are commonly used to train MLPs?

A

Common optimization algorithms include:
Stochastic Gradient Descent (SGD): Updates weights using the gradient of the loss function with respect to the weights, calculated on small batches of data. It’s simple but can be slow to converge.
Adam (Adaptive Moment Estimation): An extension of SGD that maintains adaptive learning rates for each parameter by computing running averages of the gradients and their squares. Adam often converges faster and requires less tuning of the learning rate.
Comparison: While SGD might require careful tuning of the learning rate and can get stuck in local minima, Adam adapts the learning rate during training, making it more robust and efficient.

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

What are some common applications of MLPs?

A

MLPs are used in various fields due to their ability to model complex relationships:
Image Recognition: Classifying images, such as handwriting recognition in postal mail sorting.
Natural Language Processing (NLP): Sentiment analysis, language translation, and text classification.
Time Series Prediction: Forecasting stock prices, weather patterns, or sales figures.
Regression Tasks: Predicting continuous outcomes like housing prices based on features like size, location, and amenities.
Medical Diagnosis: Assisting in diagnosing diseases by analyzing patient data.
Example: An MLP can analyze customer data to predict purchasing behavior, aiding in targeted marketing campaigns.

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

What is a limitation of MLPs compared to simpler models?

A

Limitations of MLPs include:
Data Requirements: They require large amounts of labeled data to learn effectively, which might not be available for all problems.
Computational Complexity: MLPs are computationally intensive, often necessitating specialized hardware like GPUs for training.
Overfitting Risk: With their high capacity, MLPs can easily overfit the training data if not properly regularized.
Lack of Interpretability: The models are often considered “black boxes,” making it difficult to interpret how they make decisions compared to simpler models like decision trees.
Comparison: Simpler models like linear regression or decision trees might perform better on small datasets and are easier to interpret but cannot capture complex patterns as MLPs can

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

What is the difference between an MLP and a deep learning network?

A

An MLP is a type of neural network with at least one hidden layer and uses feedforward connections. Deep learning networks are neural networks with multiple hidden layers (deep architectures) that can include various types of layers like convolutional layers, recurrent layers, or others.
Key Differences:

Depth: Deep learning networks have many more layers, enabling them to learn hierarchical representations.
Architectures: Deep learning encompasses a variety of architectures beyond the traditional MLP, such as Convolutional Neural Networks (CNNs) for image data and Recurrent Neural Networks (RNNs) for sequential data.
Example: While an MLP might suffice for simple classification tasks, a deep learning network like a CNN is more suitable for complex image recognition tasks due to its ability to capture spatial hierarchies.

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

What is a common misconception about MLPs?

A

A common misconception is that MLPs are synonymous with deep learning. While MLPs are a fundamental type of neural network and can be deep if they have multiple hidden layers, the term “deep learning” encompasses a broader range of architectures and techniques. Deep learning includes networks like CNNs for image processing and RNNs for sequential data, which are designed to handle specific types of data more effectively than a standard MLP.
Clarification: MLPs are part of the deep learning family when they have many layers, but not all deep learning models are MLPs.

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

What happens if an MLP is trained on insufficient data?

A

If an MLP is trained on insufficient data:
Overfitting: The network may memorize the training data, including noise and outliers, leading to poor generalization on new, unseen data.
Underfitting: The network might not capture the underlying patterns due to inadequate examples, resulting in poor performance both on training and test data.
Unstable Training: With limited data, the gradients computed during training may be unreliable, causing the training process to be erratic.
Mitigation Strategies:

Data Augmentation: Artificially increasing the dataset size by applying transformations to existing data.
Regularization Techniques: Methods like dropout or weight decay to prevent overfitting.
Simplifying the Model: Reducing the number of layers or neurons to match the complexity of the data.
Example: In image classification, training an MLP on only a few images per category would likely result in a model that cannot accurately classify new images.

16
Q
A