[D] Best deal with varying number of inputs each with variable size using and RNN? (for an NLP task)
Submitted by danilo62 t3_126ndw1 in deeplearning
Hollo, I am tying to do personality trait prediction using Facebook posts and I'm currently facing an issue, as I have multiple users each with a different number of posts and each post has different lenght as well.
I am using BERT to get embeddings for each word in the post and using multiple other feature extraction methods to get additional features per post (sentiment analysis, TF-IDF, etc). So the prediction would be made for each user, the input having the size of the number of posts and each of those would be comprised of N embeddings (N = number of words in a post) as well as the additional features.
The issue I'm facing is that I don't know how to design my prediction model in order to deal with these 2 varying inputs sizes. If I had variable number of inputs of the same size I could simply use an RNN, but here that doesn't work since the number of words per post varies. What architecture could I use for this?
I considered using an RNN to process the word embeddings and TF-IDF scores (the features which size varies) to process into a fixed size output which would be combined with the other features and inserted into a second RNN to predict the personality scores.
Another option that I consideres is simply padding the input but I don't know if this will decrease the accuracy in a significant manner.
--dany-- t1_jedo4gy wrote
How about using the embeddings of the whole post? Then you just have to train a model to predict trait from one post. A person’s overall trait can be the average of all traits predicted by all of his posts. I don’t see a point in using RNN over posts.