Deep Learning

Endsem 2025 solved

This page solves the IIIT Kottayam endsem paper of November 2025 for IoE-414. It shows every number in full detail for backprop, Markov chains, RNN, GAN, and RBM. After this page you can repeat each method on any similar exam question.

IIIT Kottayam held this paper in November 2025. The course is IoE-414 Deep Learning. Maximum marks are 100. Batch 2022 attempted it. The paper has five questions. Each question carries 20 marks.

Q1 Fix training symptomsSearch on YouTube

Q1 tests diagnosis. Each part gives one symptom. You must name the fix and give the reason.

Q1(a) Oscillation and covariate shiftSearch on YouTube

Large oscillation across minibatches shows unstable layer inputs. The distribution of inputs shifts during training. batch norm fixes this shift.

x^=x−μσ2+ϵ,y=γx^+β\hat{x} = \frac{x - \mu}{\sqrt{\sigma^2 + \epsilon}}, \quad y = \gamma \hat{x} + \beta

μ\mu is minibatch mean. σ2\sigma^2 is minibatch variance. ϵ\epsilon is a small constant for stability. γ\gamma and β\beta are learnable scale and shift.

Normalization keeps each layer input stable. Gradients stay steadier. Training oscillates less.

Q1(b) Overfitting gapSearch on YouTube

Train accuracy 99 percent and validation accuracy 70 percent show overfitting. The gap widens with more epochs. The network memorises training labels. dropout is the primary fix.

y=m⊙a1−p,m∼Bernoulli(1−p)y = \frac{m \odot a}{1 - p}, \quad m \sim \text{Bernoulli}(1-p)

aa is layer activation. mm is a random binary mask. pp is drop probability.

Dropout drops random units during training. It breaks co-adaptation between units. It acts like an ensemble average at test time. Early stopping and L2 regularization also help. Early stopping halts before memorisation grows. L2 regularization penalises large weights. Pick dropout as the main answer.

Q1(c) Slow tiny updatesSearch on YouTube

Tiny updates show slow progress in flat regions. The optimizer needs momentum. optimizers solve this problem.

v=βv+g,θ=θ−ηvv = \beta v + g, \quad \theta = \theta - \eta v

gg is current gradient. vv is velocity from past gradients. β\beta is momentum factor. η\eta is learning rate. θ\theta is parameter vector.

Momentum accumulates past gradients. Nesterov momentum looks ahead before the step. Adam adapts the rate per weight. A higher learning rate also helps.

Q1(d) Smooth but low accuracySearch on YouTube

Smooth loss with low train and validation accuracy shows underfitting. Capacity is too small. The optimizer or setting may also limit learning.

Tune learning rate, minibatch size, and epoch count. Add layers or neurons for more capacity. Change optimizer or initialization.

Write symptom, fix, and one-line reason for full marks. Name one primary fix per part. Mention one alternative only when time permits.

Q2 Two backprop iterationsSearch on YouTube

Q2 asks for two full updates on a 2-2-1 sigmoid network. Learning rate η\eta is 0.5. Input XX is [1,0][1, 0] and label yy is 1. Initial weights are W1W_1, W2W_2, and W3W_3. All biases start at 0. The backprop rule updates each weight.

σ(z)=11+e−z,σ′(z)=σ(z)(1−σ(z))\sigma(z) = \frac{1}{1 + e^{-z}}, \quad \sigma^{\prime}(z) = \sigma(z)(1 - \sigma(z))

σ\sigma is sigmoid activation function. zz is weighted input. σ′\sigma^{\prime} is its derivative.

L=(O−y)2,δo=2(O−y)O(1−O)L = (O - y)^2, \quad \delta_o = 2(O - y) O (1 - O)

OO is network output. yy is label. LL is per-sample loss. δo\delta_o is output delta.

θnew=θold−ηg\theta_{new} = \theta_{old} - \eta g

θ\theta is parameter vector. gg is gradient of loss. η\eta is 0.5 here.

Keep the sign of δo\delta_o. The gradient is negative when OO is less than yy. The update subtracts the gradient, so weights grow. Dropping the minus sign reverses the update.

Do not confuse bias with decision threshold. Bias is a learnable weight. Decision threshold 0.5 decides the label. The value w0w_0 equals negative threshold in perceptron notation.

Q2 Iteration 1 forward passSearch on YouTube

Initial data are X=[1,0]X = [1, 0], y=1y = 1, W1=[[0.1,0.2],[0.3,0.4]]W_1 = [[0.1, 0.2], [0.3, 0.4]], W2=[[0.5,0.6],[0.7,0.8]]W_2 = [[0.5, 0.6], [0.7, 0.8]], W3=[0.9,1.0]W_3 = [0.9, 1.0]. All biases are 0.

Step 1. First hidden input. Multiply W1W_1 by XX.

z1=W1X+b1=[0.1⋅1+0.2⋅0,  0.3⋅1+0.4⋅0]=[0.1,0.3]\begin{aligned} z_1 &= W_1 X + b_1 \\ &= [0.1 \cdot 1 + 0.2 \cdot 0, \; 0.3 \cdot 1 + 0.4 \cdot 0] \\ &= \mathbf{[0.1, 0.3]} \end{aligned}

Step 2. First hidden activation. Apply sigmoid.

a1=[σ(0.1),  σ(0.3)]=[1/(1+e−0.1),  1/(1+e−0.3)]=[0.5250,0.5744]\begin{aligned} a_1 &= [\sigma(0.1), \; \sigma(0.3)] \\ &= [1/(1+e^{-0.1}), \; 1/(1+e^{-0.3})] \\ &= \mathbf{[0.5250, 0.5744]} \end{aligned}

Step 3. Second hidden input. Multiply W2W_2 by a1a_1.

z2,1=0.5⋅0.5250+0.6⋅0.5744=0.2625+0.3446=0.6072z2,2=0.7⋅0.5250+0.8⋅0.5744=0.3675+0.4595=0.8270\begin{aligned} z_{2,1} &= 0.5 \cdot 0.5250 + 0.6 \cdot 0.5744 = 0.2625 + 0.3446 = \mathbf{0.6072} \\ z_{2,2} &= 0.7 \cdot 0.5250 + 0.8 \cdot 0.5744 = 0.3675 + 0.4595 = \mathbf{0.8270} \end{aligned}

Step 4. Second hidden activation. Apply sigmoid.

a2=[σ(0.6072),  σ(0.8270)]=[0.6473,0.6957]\begin{aligned} a_2 &= [\sigma(0.6072), \; \sigma(0.8270)] \\ &= \mathbf{[0.6473, 0.6957]} \end{aligned}

Step 5. Output and loss. Combine with W3W_3.

z3=0.9⋅0.6473+1.0⋅0.6957=0.5826+0.6957=1.2783O=σ(1.2783)=0.7822L=(0.7822−1)2=(−0.2178)2=0.04745\begin{aligned} z_3 &= 0.9 \cdot 0.6473 + 1.0 \cdot 0.6957 = 0.5826 + 0.6957 = \mathbf{1.2783} \\ O &= \sigma(1.2783) = \mathbf{0.7822} \\ L &= (0.7822 - 1)^2 = (-0.2178)^2 = \mathbf{0.04745} \end{aligned}

Q2 Iteration 1 backward pass and updateSearch on YouTube

Loss derivative uses factor 2 because L=(O−y)2L = (O-y)^2. Sigmoid derivative is O(1−O)O(1-O) at output.

Step 1. Output delta. Combine loss slope with sigmoid slope.

δo=2(O−y)O(1−O)=2⋅(−0.2178)⋅0.7822⋅0.2178=−0.07423\begin{aligned} \delta_o &= 2(O-y) O (1-O) \\ &= 2 \cdot (-0.2178) \cdot 0.7822 \cdot 0.2178 \\ &= \mathbf{-0.07423} \end{aligned}

Step 2. Gradients for W3W_3 and b3b_3. Multiply delta by a2a_2.

gW3=δo⋅a2=−0.07423⋅[0.6473,0.6957]=[−0.04805,−0.05165]gb3=−0.07423\begin{aligned} g_{W3} &= \delta_o \cdot a_2 = -0.07423 \cdot [0.6473, 0.6957] = \mathbf{[-0.04805, -0.05165]} \\ g_{b3} &= \mathbf{-0.07423} \end{aligned}

Step 3. Second hidden deltas. Push delta back through W3W_3.

a2(1−a2)=[0.6473⋅0.3527,  0.6957⋅0.3043]=[0.2283,0.2117]d2=δo⋅W3⊙a2(1−a2)=[−0.07423⋅0.9⋅0.2283,  −0.07423⋅1.0⋅0.2117]=[−0.01525,−0.01571]\begin{aligned} a_2(1-a_2) &= [0.6473 \cdot 0.3527, \; 0.6957 \cdot 0.3043] = [0.2283, 0.2117] \\ d_2 &= \delta_o \cdot W_3 \odot a_2(1-a_2) \\ &= [-0.07423 \cdot 0.9 \cdot 0.2283, \; -0.07423 \cdot 1.0 \cdot 0.2117] \\ &= \mathbf{[-0.01525, -0.01571]} \end{aligned}

Step 4. Gradients for W2W_2. Outer product of d2d_2 and a1a_1.

gW2=[−0.01525⋅0.5250−0.01525⋅0.5744−0.01571⋅0.5250−0.01571⋅0.5744]=[−0.00801−0.00876−0.00825−0.00903]\begin{aligned} g_{W2} &= \begin{bmatrix} -0.01525 \cdot 0.5250 & -0.01525 \cdot 0.5744 \\ -0.01571 \cdot 0.5250 & -0.01571 \cdot 0.5744 \end{bmatrix} \\ &= \mathbf{ \begin{bmatrix} -0.00801 & -0.00876 \\ -0.00825 & -0.00903 \end{bmatrix}} \end{aligned}

Step 5. First hidden deltas. Push d2d_2 back through W2W_2.

W2Td2=[0.5⋅(−0.01525)+0.7⋅(−0.01571),  0.6⋅(−0.01525)+0.8⋅(−0.01571)]=[−0.01862,−0.02172]a1(1−a1)=[0.2494,0.2445]d1=[−0.01862⋅0.2494,  −0.02172⋅0.2445]=[−0.00465,−0.00531]\begin{aligned} W_2^T d_2 &= [0.5 \cdot (-0.01525) + 0.7 \cdot (-0.01571), \; 0.6 \cdot (-0.01525) + 0.8 \cdot (-0.01571)] \\ &= [-0.01862, -0.02172] \\ a_1(1-a_1) &= [0.2494, 0.2445] \\ d_1 &= [-0.01862 \cdot 0.2494, \; -0.02172 \cdot 0.2445] = \mathbf{[-0.00465, -0.00531]} \end{aligned}

Step 6. Gradients for W1W_1. Outer product of d1d_1 and XX.

gW1=[−0.00465⋅1−0.00465⋅0−0.00531⋅1−0.00531⋅0]=[−0.004650−0.005310]\begin{aligned} g_{W1} &= \begin{bmatrix} -0.00465 \cdot 1 & -0.00465 \cdot 0 \\ -0.00531 \cdot 1 & -0.00531 \cdot 0 \end{bmatrix} = \mathbf{ \begin{bmatrix} -0.00465 & 0 \\ -0.00531 & 0 \end{bmatrix}} \end{aligned}

Step 7. Update with η=0.5\eta = 0.5. Subtract half the gradient.

W1=[[0.1,0.2],[0.3,0.4]]−0.5⋅gW1=[[0.10232,0.2],[0.30266,0.4]]b1=[0,0]−0.5⋅d1=[0.00232,0.00266]W2=[[0.5,0.6],[0.7,0.8]]−0.5⋅gW2=[[0.50400,0.60438],[0.70412,0.80451]]b2=[0,0]−0.5⋅d2=[0.00763,0.00786]W3=[0.9,1.0]−0.5⋅gW3=[0.92403,1.02582]b3=0−0.5⋅(−0.07423)=0.03712\begin{aligned} W_1 &= [[0.1, 0.2],[0.3, 0.4]] - 0.5 \cdot g_{W1} = \mathbf{[[0.10232, 0.2],[0.30266, 0.4]]} \\ b_1 &= [0,0] - 0.5 \cdot d_1 = \mathbf{[0.00232, 0.00266]} \\ W_2 &= [[0.5, 0.6],[0.7, 0.8]] - 0.5 \cdot g_{W2} = \mathbf{[[0.50400, 0.60438],[0.70412, 0.80451]]} \\ b_2 &= [0,0] - 0.5 \cdot d_2 = \mathbf{[0.00763, 0.00786]} \\ W_3 &= [0.9, 1.0] - 0.5 \cdot g_{W3} = \mathbf{[0.92403, 1.02582]} \\ b_3 &= 0 - 0.5 \cdot (-0.07423) = \mathbf{0.03712} \end{aligned}

Q2 Iteration 2 forward and backward passSearch on YouTube

The second iteration starts from updated weights. It repeats the same chain rule.

Step 1. Forward pass. Use updated W1W_1 and b1b_1.

z1=[0.10232+0.00232,  0.30266+0.00266]=[0.10464,0.30532]a1=[σ(0.10464),  σ(0.30532)]=[0.5261,0.5757]z2=[0.6207,0.8415]a2=[σ(0.6207),  σ(0.8415)]=[0.6504,0.6988]z3=0.92403⋅0.6504+1.02582⋅0.6988+0.03712=1.3550O=σ(1.3550)=0.7949L=(0.7949−1)2=0.04205\begin{aligned} z_1 &= [0.10232 + 0.00232, \; 0.30266 + 0.00266] = \mathbf{[0.10464, 0.30532]} \\ a_1 &= [\sigma(0.10464), \; \sigma(0.30532)] = \mathbf{[0.5261, 0.5757]} \\ z_2 &= [0.6207, 0.8415] \\ a_2 &= [\sigma(0.6207), \; \sigma(0.8415)] = \mathbf{[0.6504, 0.6988]} \\ z_3 &= 0.92403 \cdot 0.6504 + 1.02582 \cdot 0.6988 + 0.03712 = \mathbf{1.3550} \\ O &= \sigma(1.3550) = \mathbf{0.7949} \\ L &= (0.7949-1)^2 = \mathbf{0.04205} \end{aligned}

Step 2. Backward pass. Recompute deltas at new point.

δo=2⋅(0.7949−1)⋅0.7949⋅0.2051=−0.06688gW3=−0.06688⋅[0.6504,0.6988]=[−0.04350,−0.04673]d2=[−0.01405,−0.01444]gW2=[−0.00739−0.00809−0.00760−0.00831]d1=[−0.00430,−0.00491]gW1=[−0.004300−0.004910]\begin{aligned} \delta_o &= 2 \cdot (0.7949-1) \cdot 0.7949 \cdot 0.2051 = \mathbf{-0.06688} \\ g_{W3} &= -0.06688 \cdot [0.6504, 0.6988] = \mathbf{[-0.04350, -0.04673]} \\ d_2 &= \mathbf{[-0.01405, -0.01444]} \\ g_{W2} &= \mathbf{ \begin{bmatrix} -0.00739 & -0.00809 \\ -0.00760 & -0.00831 \end{bmatrix}} \\ d_1 &= \mathbf{[-0.00430, -0.00491]} \\ g_{W1} &= \mathbf{ \begin{bmatrix} -0.00430 & 0 \\ -0.00491 & 0 \end{bmatrix}} \end{aligned}

Step 3. Update again. Subtract half the new gradient.

W1=[[0.10447,0.2],[0.30511,0.4]]b1=[0.00447,0.00511]W2=[[0.50770,0.60842],[0.70792,0.80867]]b2=[0.01465,0.01508]W3=[0.94577,1.04918]b3=0.07055\begin{aligned} W_1 &= \mathbf{[[0.10447, 0.2],[0.30511, 0.4]]} \\ b_1 &= \mathbf{[0.00447, 0.00511]} \\ W_2 &= \mathbf{[[0.50770, 0.60842],[0.70792, 0.80867]]} \\ b_2 &= \mathbf{[0.01465, 0.01508]} \\ W_3 &= \mathbf{[0.94577, 1.04918]} \\ b_3 &= \mathbf{0.07055} \end{aligned}

Step 4. Final check. Run forward once more.

O=0.8060L=(0.8060−1)2=0.03762\begin{aligned} O &= \mathbf{0.8060} \\ L &= (0.8060-1)^2 = \mathbf{0.03762} \end{aligned}

Loss falls across iterations: 0.04745 to 0.04205 to 0.03762.

Write zz, aa, OO, LL, then δo\delta_o, d2d_2, d1d_1 in order. Keep the factor 2 from (O−y)2(O-y)^2. Examiners give marks per line.

Q3 Markov chainsSearch on YouTube

Q3 tests two Markov chains. Part (a) evolves a distribution. Part (b) cubes a transition matrix.

Q3(a) Streetlight distributionSearch on YouTube

States are ON and OFF in order [ON,OFF][ON, OFF]. Rows of TT are current state. Columns are next state. Start vector μ0\mu_0 is [0,1][0, 1], so light is OFF.

μt+1=μtT\mu_{t+1} = \mu_t T

μt\mu_t is row distribution at time tt. TT is transition matrix. Each row of TT sums to 1.

π=πT,πON+πOFF=1\pi = \pi T, \quad \pi_{ON} + \pi_{OFF} = 1

π\pi is stationary distribution. It stays unchanged after one step.

Step 1. One step from OFF. Pick OFF row of TT.

μ1=[0,1][0.750.250.150.85]=[0.15,0.85]\begin{aligned} \mu_1 &= [0,1] \begin{bmatrix} 0.75 & 0.25 \\ 0.15 & 0.85 \end{bmatrix} \\ &= \mathbf{[0.15, 0.85]} \end{aligned}

Step 2. Second step. Multiply μ1\mu_1 by TT.

μ2,ON=0.15⋅0.75+0.85⋅0.15=0.1125+0.1275=0.24μ2,OFF=0.15⋅0.25+0.85⋅0.85=0.0375+0.7225=0.76μ2=[0.24,0.76]\begin{aligned} \mu_{2,ON} &= 0.15 \cdot 0.75 + 0.85 \cdot 0.15 = 0.1125 + 0.1275 = \mathbf{0.24} \\ \mu_{2,OFF} &= 0.15 \cdot 0.25 + 0.85 \cdot 0.85 = 0.0375 + 0.7225 = \mathbf{0.76} \\ \mu_2 &= \mathbf{[0.24, 0.76]} \end{aligned}

Stationary solution. Solve balance plus sum 1.

πON=0.75πON+0.15πOFF0.25πON=0.15πOFFπON=0.150.15+0.25=0.150.40=0.375πOFF=0.625\begin{aligned} \pi_{ON} &= 0.75 \pi_{ON} + 0.15 \pi_{OFF} \\ 0.25 \pi_{ON} &= 0.15 \pi_{OFF} \\ \pi_{ON} &= \frac{0.15}{0.15+0.25} = \frac{0.15}{0.40} = \mathbf{0.375} \\ \pi_{OFF} &= \mathbf{0.625} \end{aligned}

Stationary vector is [0.375,0.625]\mathbf{[0.375, 0.625]}.

For two states use q/(p+q)q/(p+q). Here p=0.25p = 0.25 is ON to OFF. Here q=0.15q = 0.15 is OFF to ON. Then πON=q/(p+q)\pi_{ON} = q/(p+q).

Q3(b) Thermostat cubeSearch on YouTube

States are Cooling and Heating. Matrix PP holds one-hour moves. The query spans three hours. It needs P^3.

P2=PP,P3=P2PP^2 = P P, \quad P^3 = P^2 P

P2P^2 holds two-step probabilities. P3P^3 holds three-step probabilities.

Step 1. Square PP. Multiply rows by columns.

P2=[0.650.350.450.55][0.650.350.450.55]=[0.65⋅0.65+0.35⋅0.450.65⋅0.35+0.35⋅0.550.45⋅0.65+0.55⋅0.450.45⋅0.35+0.55⋅0.55]=[0.580.420.540.46]\begin{aligned} P^2 &= \begin{bmatrix} 0.65 & 0.35 \\ 0.45 & 0.55 \end{bmatrix} \begin{bmatrix} 0.65 & 0.35 \\ 0.45 & 0.55 \end{bmatrix} \\ &= \begin{bmatrix} 0.65\cdot0.65+0.35\cdot0.45 & 0.65\cdot0.35+0.35\cdot0.55 \\ 0.45\cdot0.65+0.55\cdot0.45 & 0.45\cdot0.35+0.55\cdot0.55 \end{bmatrix} \\ &= \mathbf{ \begin{bmatrix} 0.58 & 0.42 \\ 0.54 & 0.46 \end{bmatrix}} \end{aligned}

Step 1. Cube PP. Multiply P2P^2 by PP.

P3=[0.580.420.540.46][0.650.350.450.55]=[0.58⋅0.65+0.42⋅0.450.58⋅0.35+0.42⋅0.550.54⋅0.65+0.46⋅0.450.54⋅0.35+0.46⋅0.55]=[0.5660.4340.5580.442]\begin{aligned} P^3 &= \begin{bmatrix} 0.58 & 0.42 \\ 0.54 & 0.46 \end{bmatrix} \begin{bmatrix} 0.65 & 0.35 \\ 0.45 & 0.55 \end{bmatrix} \\ &= \begin{bmatrix} 0.58\cdot0.65+0.42\cdot0.45 & 0.58\cdot0.35+0.42\cdot0.55 \\ 0.54\cdot0.65+0.46\cdot0.45 & 0.54\cdot0.35+0.46\cdot0.55 \end{bmatrix} \\ &= \mathbf{ \begin{bmatrix} 0.566 & 0.434 \\ 0.558 & 0.442 \end{bmatrix}} \end{aligned}

Step 2. Read the query. Cooling at 02PM to Cooling at 05PM is three steps.

P(Cooling 05PM∣Cooling 02PM)=0.566\begin{aligned} P(\text{Cooling 05PM} \vert \text{Cooling 02PM}) = \mathbf{0.566} \end{aligned}

It is row 1, column 1 of P3P^3.

Count steps first. From 02PM to 05PM is 3 moves. Square first, then cube. Read entry (start, end).

Q4 Sequence modelsSearch on YouTube

Q4 tests recurrent models. Part (a) asks for RNN and BPTT. Part (b) asks for bidirectional models.

Q4(a) RNN and BPTTSearch on YouTube

An RNN reads one token per time step. It keeps a hidden state. The same weights apply at every step.

ht=tanh⁡(Uxt+Wht−1+b),ot=Vht+ch_t = \tanh(U x_t + W h_{t-1} + b), \quad o_t = V h_t + c

hth_t is hidden state at step tt. xtx_t is input. UU, WW, VV are shared weights. bb and cc are biases.

Backprop through time unfolds the loop. It sums gradients over steps. Repeated multiplication shrinks or grows gradients. Shrinking causes vanishing gradients.

∂L∂W=∑t∂Lt∂ht∂ht∂W\frac{\partial L}{\partial W} = \sum_t \frac{\partial L_t}{\partial h_t} \frac{\partial h_t}{\partial W}

LtL_t is loss at step tt. The sum shares one WW across time.

Q4(b) Bidirectional modelsSearch on YouTube

A bidirectional model reads both ways. Forward pass reads past to future. Backward pass reads future to past. Translation needs both sides because later words fix earlier meaning.

ht=[h→t;h←t]h_t = [\overrightarrow{h}_t ; \overleftarrow{h}_t]

h→t\overrightarrow{h}_t is forward hidden state. h←t\overleftarrow{h}_t is backward hidden state. Brackets mean concat. Sum is an alternative merge.

Bi-LSTM uses two LSTM chains. One moves forward. One moves backward. The merge holds past plus future context.

Draw unfolded boxes with shared UU, WW, VV for RNN. Draw two opposite arrows for bidirectional. Label concat or sum.

Q5 Generative modelsSearch on YouTube

Q5 tests generative ideas. Part (a) asks for GAN. Part (b) asks for RBM.

Q5(a) GAN gameSearch on YouTube

A GAN has a generator and a discriminator. The generator makes fake samples. The discriminator scores real against fake. Training alternates the two updates.

V(G,D)=Ex[log⁡D(x)]+Ez[log⁡(1−D(G(z)))]V(G,D) = E_x[\log D(x)] + E_z[\log(1 - D(G(z)))]

D(x)D(x) is score of real sample. G(z)G(z) is fake sample from noise zz. VV is minimax value.

min⁡Gmax⁡DV(G,D)\min_G \max_D V(G,D)

Discriminator maximises VV. Generator minimises VV.

Value trace from l14. Watch VV rise then fall.

V0=−0.5798V1=−0.3285after discriminator updateV2=−1.0217after generator update\begin{aligned} V_0 &= \mathbf{-0.5798} \\ V_1 &= \mathbf{-0.3285} \quad \text{after discriminator update} \\ V_2 &= \mathbf{-1.0217} \quad \text{after generator update} \end{aligned}

Discriminator step raises VV. Generator step lowers VV. Alternation drives the game.

State roles in one line each. Write minimax VV exactly. Say discriminator maximises and generator minimises.

Q5(b) RBM structureSearch on YouTube

An RBM is bipartite, symmetric, and generative. Visible units link only to hidden units. No links stay inside one layer. Weights are symmetric in both directions.

E(v,h)=−bTv−cTh−vTWhE(v,h) = -b^T v - c^T h - v^T W h

EE is energy. vv is visible vector. hh is hidden vector. bb and cc are biases. WW holds symmetric weights.

P(hj=1∣v)=σ(cj+vTW:,j),P(vi=1∣h)=σ(bi+Wi,:h)P(h_j = 1 \vert v) = \sigma(c_j + v^T W_{:,j}), \quad P(v_i = 1 \vert h) = \sigma(b_i + W_{i,:} h)

Each conditional uses sigmoid activation function. Columns of WW drive hidden units. Rows of WW drive visible units.

Contrastive divergence trains the RBM. It runs one Gibbs step from data. It lowers energy of data and raises energy of reconstruction. A feedforward network is discriminative and directed. It maps input to label. An RBM models the joint distribution instead.

Draw two layers with cross links only. Write energy first, then conditionals. Contrast with feedforward network in one line.

RecapSearch on YouTube

  • Use batch norm for shifting inputs and dropout for overfitting gap.
  • Use momentum, Nesterov, or Adam for tiny slow updates.
  • Add layers, neurons, or better settings for underfitting.
  • Apply sigmoid chain rule with sign check for backprop.
  • Evolve with row rule and solve balance for stationary distribution.
  • Square then cube PP and read entries for multi-step queries.
  • Alternate GAN minimax updates and contrast RBM with feedforward maps.