liveBook · Manning

Bidirectional rnn

As explained in Build AI Drug Discovery Pipelines

A bidirectional recurrent neural network contains forward and backward recurrent networks whose outputs jointly represent each sequence position.

A bidirectional recurrent neural network encodes a complete sequence with two recurrent networks: one reads left to right, the other right to left. Their hidden states give each position information from both preceding and succeeding tokens. For molecular generation, this encoder processes a SMILES string before a decoder reconstructs or generates another string. section 10.4.3

A practical molecular encoder typically follows these steps:

  • Process the embedded sequence with forward and backward recurrent layers. section 10.4.3

Bidirectional GRU molecular encoder

A PyTorch encoder embeds padded SMILES batches, optionally packs sequences using their lengths, runs a bidirectional GRU, reshapes its directional hidden states, and concatenates the final forward and backward states.

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains directional hidden states, concatenation, packed sequences, and latent projection, but not recurrent-cell equations.
Examples
Demonstrates molecular SMILES encoding with a bidirectional GRU and concatenated directional hidden states.
What you can do after
Build it from scratch as a PyTorch encoder that produces a combined sequence or molecular representation.
How it connects
Connects SMILES, GRU, sequence-to-sequence models, encoders, decoders, and latent spaces.

Also explained in

Compare how 5 books explain bidirectional rnn →

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.