Why ANN Can’t Be Used In Sequential Data?


Why ANN Can’t Be Used In Sequential Data?

Table Of Contents:

  1. Input Text Having Varying Size.
  2. Zero Padding – Unnecessary Computation.
  3. Prediction Problem On Different Input Length.
  4. Not Considering Sequential Information.

Reason-1:Input Text Having Varying Size.

  • In real life, input sentences will have different word counts.
  • Suppose you make an ANN having the below structure.
  • It has 3 input nodes.
  • Our first sentence contains 6 words, hence the weight metrics will be 6 * 3 structure.
  • The second sentence contains 3 words hence the weight metrics will be 3 * 3 structure.
  • The third sentence contains 4 words hence the weight metrics will be 4 * 3 structure.
  • You can see here the structure of the input weight metrics is changing based on the input text.
  • Which is not practical for designing.

Reason-2:Zero Padding Unnecessary Computation.

  • To solve the first issue of varying length we can use the zero padding technique.
  • First, we can count the sentence having maximum words.
  • In our case we have the first sentence having a maximum of 6 number of words.
  • So we will fix our input text size to a maximum of 6 words.
  • In the second sentence, we have a number of words, as we have fixed our input to  6 words, but we have 3 words in 2nd sentence hence we will append 3 more vectors having zero values inside it.
  • Hence it is called zero padding.
  • The problem with zero padding is that if we have the maximum word of a sentence is 1000 words.
  • Then we will fix the input length to 1000 nodes.
  • But if we got a sentence having only 5 words then for the rest of the 995 words we have to use zero padding.
  • Which will take extra memory and computation power.
  • Which will decrease the training speed of the model.
  • Which is undesirable

Reason-3: Prediction Problem On Different Input Length

  • In our case, we have set our input length to 6 words while training the model.
  • But while predicting suppose we got an input text having the length of 10 words, at that time our model will fail.
  • Because we have trained our model with a fixed input size of 6 words, it will not be able to predict for 10 words.

Reason-4: Not Considering Sequential Information

  • ANN architecture does not take into account the sequence information of the input text.
  • When we pass the input text to the ANN model it will take all the input at a time.
  • When you enter vales at a time it will be mixed up inside the network, hence the sequence information is discarded.
  • The sequence information is discarded in the ANN model.
  • Hence it is not suitable for the sequential data.

Leave a Reply

Your email address will not be published. Required fields are marked *