NN Exam 2

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

26 Terms

1
New cards

What is a sequence?

ordered list of observations where order matters

2
New cards

Why is a standard feedforward network (FFNN) limited for sequence data?

doesnt carry mem from one time step to next, works well when input is fixed sized and indep, order must be encoded

3
New cards

Name the three common sequence modeling task types and an example of each.

many to one: classification, one to many: image captions, many to many: translation

4
New cards

What makes an RNN different from a feedforward network?

RNNs process one element at a time while carrying info forward

5
New cards

Write the RNN state update in general form and explain it.

h_t = f(x_t, h_t-1) cur input + prev mem = updated mem

6
New cards

Write the simple RNN equations for the hidden state and output.

h_t = sig(W_hh h_t-1 + W_xh x_t + b_h) y_t = W_hy * h_t

7
New cards

What does unrolling an RNN over time reveal, and why does parameter sharing matter?

shows same cell applied repeatedly and lets model handle variable length seq

8
New cards

What is Backpropagation Through Time (BPTT)?

bp applied to network thats unfolded over time

9
New cards

How does Backpropagation Through Time work?

unroll RNN across time steps, compute losses at one or more outputs, bp gradients thru repeated cells

10
New cards

What are the four design criteria for a good sequence model?

variable length, long term dep, order info, shared param

11
New cards

How is language converted to numbers for a neural network? (3 steps)

build list of known tokens, assign each token an int ID, map each ID to dense vector

12
New cards

Why does order matter?

model has to represent both token identity and token order

13
New cards

What causes vanishing gradients in RNNs, and what are common responses?

products of factors less than 1 become small so earlier time steps get little learning signal. LSTM/GRU, careful initialization, residual paths, or attention

14
New cards

What causes exploding gradients in RNNs, and what is the common fix?

products of factors bigger than 1 become large and training is unstable. gradient clipping where large gradients are rescaled

15
New cards

What is the long-term dependency problem?

RNNs favor recent info, error signal becomes weaker going back in time. attention addresses this

16
New cards

What do the three LSTM gates do?

forget gate decides which past info to remove from cell state, input gate decides which new info to write into mem, output gate decides how much of cell state is exposed as hidden state

17
New cards

What two states does an LSTM keep, and why does the cell state help training?

hidden and separate cell state, which provides more direct path for gradient flow during BPTT

18
New cards

What is a GRU and how does it differ from a standard RNN?

gated recurrent unit uses two learned gates and has hidden state but no separate cell state

19
New cards

What does the GRU update gate z_t do? Give its equation.

controls balance between retraining prev hidden state and adding candidate state. z_t = sig(W_z * x_t + U_z * h_t-1 + b_z)

20
New cards

What does the GRU reset gate r_t do? Give its equation.

controls how much of prev hidden state contributes to candidate state. r_t = sig(W_r x_t + U_r * h_t-1 + b_r)

21
New cards

Compare GRU and LSTM.

gru has update and reset gates, hidden state, less param, faster training. lstm has forget, input, output gates, hidden and cell state

22
New cards

What are the limitations of RNNs that motivate attention and Transformers?

encoding bottleneck, slow training, weak long range mem, performance drops for long seq

23
New cards

What is the core idea of attention compared with an RNN hidden state?

attention lets model look back by assigning weights to input elements based on relevance

24
New cards

Explain Query, Key, and Value using the search analogy.

query is what token is looking for, key is how each token shows what it has, value is the info passed forward if chosen

25
New cards

Describe scaled dot-product attention.

attention(q,k,v) = softmax(qk^t . sqrt(d_k) * V

26
New cards

In scaled dot-product attention, is the score multiplied or divided by √dₖ? What is dₖ?

divided, d_k is key/query dimension