Lecture 10 - LSTM - CNN -GAN - BatchNorm Flashcards

1
Q

LSTM stands for

A

Long Short-Term Memory

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

LSTM is used for

A

Image captioning, stock market prediction, machine translation and text classification (for sequence processing)

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

What are the Components of LSTM?

A

Memory cell, input gate, forget gate, output gate

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

What is the function of the input gate?

A

Control what information gets stored in long-term state/memory cell

Note: Before the input gate, there is one more gate which controls the flow into the input gate

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

What is the function of the forget gate?

A

Regulate how much of information in long-term state is persisted across time instants

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

What is the function of the output gate?

A

Controls how much information to output from cell at a time instant

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

GRU cell is a simplified version of ___ cell

A

GRU cell is a simplified version of LSTM cell

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

GRUs combine which two LSTM gates to decide what information should be committed to long-term memory?

A

Forget and Input gates

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

For real - Use this website to learn RNNs/LSTM etc

A

http://colah.github.io/posts/2015-08-Understanding-LSTMs/

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

What is BatchNorm primarily used for?

A

Stabilising data - Also makes ANN faster and more stable through normalization (by recentering and rescaling)

Very useful for deep learning - Makes hidden layers very efficient

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

BatchNorm is tricky to use in

A

RNN (Recurrent Neural Networks)

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

What are adversarial examples?

A

Adversarial examples are inputs to machine learning models that an attacker has intentionally designed to cause the model to make a mistake; they’re like optical illusions for machines.

https://openai.com/blog/adversarial-example-research/

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

What are the two types of adversarial image attacks?

A

Untargeted adversarial attacks: cannot control output label of adversarial image

Targeted adversarial attacks: can control output label of image

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

Name some ML models that have had adversarial attacks

A

DNN, Clustering, Naive Bayes, Decision tree, multilayer perceptron, SVM

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

Adversarial attacks impact model performance by

A

Injecting adversarial/malicious data into training datasets that can cause decreased performance. Model failure is known as poisoning

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

There are two types of adversarial attacks in DL. What are they?

A

Black Box Attacks

The main feature of a black box attack is that the attacker does not have access to the training data. Black box attacks are usually applied when the model is too complex for the attacker to understand. The goal of a black box attack is to reverse engineer the model and find a way to manipulate the input data to force the model to output the desired value.

White Box Attacks

In a white box attack, the attacker has access to the input data and the model definition. The attacker then tries to find a way to manipulate the input data to force the model to output a specific value.

17
Q

How can we generate adversarial images?

A
  1. Take input image –> Make prediction (using CNN)
  2. Compute loss of prediction based on true class label
  3. Calculate gradients of loss with respect to input image
  4. Compute gradient sign –> Use to construct adversarial image (output)
18
Q

What is adversarial training?

A

Having a model learn to correctly classify adversarial examples

19
Q

What are Generative Adversial Networks? (GANs)

A

Primary idea: Let NNs compete against each other to perform better.

GAN composed of two neural networks with different objectives

  • Generator: Takes a random distribution as input (typically Gaussian) and outputs some data. Typically, an image
  • Discriminator: Takes either a fake image from generator or a real image from training set as input, and guesses whether input image is fake or real.
20
Q

What are the difficulties of training Generative Adversial Networks (GANs)?

A
  1. Generator and discriminator constantly try to outsmart each other -> Leads to no player would be better off changing their own strategy, assuming other players do not change theirs
  2. Generator produces perfectly realistic images and discriminator is forced to guess (50% real, 50% fake)
  3. Generators outputs gradually become less diverse (called mode collapse)
  4. Generator and discriminator are constantly pushing against each other, parameters may end up oscillating and becoming unstable
21
Q

What are Deep Convolutional GANs? (DGANs)

A

Idea: Build GANs based on deeper convolutional nets for larger images

22
Q

What are Convolutional Neural Networks? (CNN)

A

Deep Neural Networks does not work well for large image recognition. -> Now we have CNNs!

In CNNs, each layer is represented in 2D which makes it easier to match neurons with their corresponding inputs

23
Q

What is convolution?

A

A mathematical operation that slides one function over another and measures the integral of their pointwise multiplication.

Has deep connections with Fourier transform + Laplace transform

24
Q

Convolutional Neural Networks (CNN) have three fundamental layers. Name them

A
  1. Convolutional layer
  2. Pooling layer
  3. Fully connected layer
25
Q

True or false: The convolutional layer is the most important building block of a CNN

A

TRUE!

26
Q

How does the convolutional layer work?

A

Convolution layer is made up of filters and feature maps

  • A filter is passed over the input image pixels to capture a specific set of features in a process called convolution
    • Convolution is the process by which a function is applied to a matrix to extract specific information from the matrix
  • Feature maps are outputs of a filter in a convolutional layer
    • Exposes certain patterns of input images (such as horizontal lines, vertical lines)
27
Q

What does the pooling layer do?

A

Goal: Reduce feature map of convolutional layer

Summarizes image features learned in previous network layers

28
Q

True or False: Once a CNN has learned to recognize a pattern in one location, it can recognize it in any other location

A

True

29
Q

True or False: All neurons in a feature map share the same parameters, which reduces the number of parameters in the model

A

True

30
Q

The Fulle Connected Network (FCN) layer is

A

feedforward neural network or multilayer perceptron (MLP)