Protein secondary structure prediction — GRU demo
Pred:
True:
Helix (H)
Strand (E)
Coil (C)
GRU cell
h
t-1
old state highway
e_t = φ(aa_t)
W_r e_t
W_z e_t
W_h e_t
σ_r
reset
σ_z
update
tanh
candidate
U_r h_t-1
U_z h_t-1
×
1-z_t
×
×
+
z_t
h_t-1
U_h (r_t ⊙ h_t-1)
h_t
W_y h_t
+ b_y → logits
softmax
H
E
C
Hidden state h_t (d_h = 16):
Amino acid sequence:
e_t / x_t features:
h_t-1 (16-dim):
h_t (16-dim):
logits / softmax:
GRU forward pass: reset/update gates + candidate + explicit output head | d_h=16, 3-class softmax
h_t = z_t ⊙ h_{t-1} + (1-z_t) ⊙ h̃_t | Protein secondary structure from PDB