liveBook · Manning

Reset gate

As explained in Build AI Drug Discovery Pipelines

A reset gate is a gated-recurrent-unit mechanism that controls how much of the previous hidden state contributes to computing the candidate state.

A reset gate is a GRU mechanism that controls how much of the previous hidden state contributes to computing the candidate hidden state. This selective forgetting helps sequence models handle long-range dependencies in complex molecular structures. section 10.4.2

At each sequence step, the reset gate:

  • Combines the previous hidden state and current input through learned weights and a bias, then applies a sigmoid to produce values between zero and one. section 10.4.2
  • Filters the previous hidden state before the candidate state is computed; lower values suppress prior information, while higher values retain it. section 10.4.2
  • Works alongside the update gate, which blends the candidate state with the previous hidden state to produce the next state. section 10.4.2

Molecular sequence continuity

When processing a SMILES string such as CC(C)CC(=O)NC1=CC=C(C=C1)O, gated memory helps track an earlier parenthesis or ring opening until its later closure. The reset gate controls how much of the prior context enters each candidate state. section 10.4.2

Figure 10.6 Internal architecture of a Gated Recurrent Unit (GRU) cell. The diagram illustrates the information flow through a GRU cell, showing the two key gates (reset gate rt and update gate zt) that control memory retention and updates. The reset gate determines how much previous hidden state information to retain when computing the candidate hidden state h̃t, while the update gate controls the blend between the previous hidden state ht-1 and the new candidate state to produce the final output ht. The mathematical equations on the right define the computations for each component, with σ representing the sigmoid activation function and ⊗ denoting elementwise multiplication.

Inspect the GRU-cell diagram to follow reset-gate information flow and its interaction with the update gate. section 10.4.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines the gate, gives its sigmoid equation, connects it to candidate-state computation, and shows a PyTorch cell implementation.
Examples
Uses a SMILES string with delayed parenthesis and ring closures to illustrate retained molecular context.
What you can do after
Understand how reset gating filters prior context before candidate-state computation in a GRU.
How it connects
Connects reset gates to GRUs, update gates, hidden states, candidate states, long-range dependencies, and vanishing gradients.

Also explained in

Compare how 3 books explain reset gate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.