Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Machine Learning by (19k points)

Can someone please explain this? I know bidirectional LSTMs have a forward and backward pass but what is the advantage of this over a unidirectional LSTM?

What is each of them better suited for?

1 Answer

0 votes
by (33.1k points)

LSTM processes information from inputs that have already passed through it using the hidden state.

Unidirectional LSTM stores information of the past because the only inputs it has seen from the past.

Using bidirectional LSTM will manage your inputs in two ways, one from past to future and one from future to past and it differs this approach from unidirectional is that in the LSTM which  runs backward you preserve information from the future and using the two hidden states combined, you will be able at any point in time to preserve information from both past and future.

BiLSTMs show quite good results as they understand the context better. 

For example:

Let's say we want to predict the next word in a sentence, on a high level that a unidirectional LSTM will see is

The boys went to ....

And will try to predict the next word only by this context, with bidirectional LSTM you will be able to see the information.

Forward LSTM:

The boys went to ...

Backward LSTM:

... and then they got out of the pool

Here you can notice that using the information from the future it could be easier for the network to understand what the next word is.

Hope this answer helps.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...