I have a training set where each row is a series of user actions on a website (logged in, sent an invoice, etc.) and times deltas in ms between these actions. Each row has a label — a corresponding user class (10 classes):

action132, 2340, action21, 300, ...  3
action238, 1240, action22, 350, ...  6
action763, 1240, action42, 750, ...  2 

Say, I have 500 unique action types and each row has a variable length. Max sequence length is 100k and there are 10k rows in the training set (10k users).

I need to predict labels for the test set.

If I had only the action sequence, it would be a more understandable task similar to DNA sequence classification of text classification which are normally solved with LSTM/CNN models or transformers. But in my problem these time deltas are good indicators of user behavior and I'd like to make use of these features. Also, the action order is important as well.

What would be an efficient model for this problem?


1 Answer 1


NN is automatic feature extractor, it will find columns that you suspect are valuable, if you encode it right

Dont worry about indicating specifically these columns. Worry about optimising your DNN architecture. Since you say you have variable input lengths, one optimisation method would be utilising dynamic sequence bucketing

There is no ultimate theory (without some serious assumptions being made) that says if only X is satisfied than you can be sure Y will beat all other methods, or that it will converge. Try a couple of different approaches in all stages (models, preprocessing etc) and see what works. Just make sure you make minimum viable experiment enviroment, i.e. representative train/test set where you can quickly iterate at test different approaches

  • $\begingroup$ good answer - but what I am missing is how to handle user_id ? I assume multiple rows can belong to one single unique user_id - how one should inform DNN about it ?! $\endgroup$
    – user702846
    Jun 1, 2021 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.