ULMFiT for tag recommendation system for newspaper articles


I have a small dataset of articles 2500 with tags (maximum of 10 tags) . I want to use ULMFit to build a model that can generate the tags for a new article.

It would be great if someone can help me or give guidance on how to do this.


1 Like

This is like lesson3-imdb but instead of 2 classes (positive, negative) you have 10 categories.

So i would start with lesson3-imdb using a pretrained model and understand what is going on .

I english is not your language then look for a pretrained ULMFit model in your language language and use that in lesson 3imd with your data. You would also need to adapt the the way data is loaded

Hi , My confusion is there are not just ten categories. As each article has a different tag, we might end up with different tags.
For example
article 1 - tag1, tag2, tag3, tag4, tag5
article 2 - tag6, tag9 ,tag10, tag1, tag2

In my example problem, i have 1970 tags and out of these tags, 1500 tags are unique. So am a bit confused as how to solve this particular one.

To begin with 2500 article is very little to train a system-too little. When you also have almost as many tags then the situation is even worse. Maybe you should look at this as a datascience problem and not a deeplearning problem to begin with:

  • what does those tags represent ?
  • what is the purpose of predicting them ?
1 Like

I think this is multi label classification, it was discussed here: Multilabel Classification with ULMFiT

It should be more than enough! :slight_smile: Look at the ULMFiT paper - we showed how with just 100 examples you can create a good classifier.


I am interested in building an automatic label/ tag generator. This would be used to predict labels for articles in the future.

I you have little experience with AI then i would start modest with a few labels say 5-10 that make a rough grouping of the articles and i would probably start by a unique label pr article. this would get you going with the ulmfit model.
Then i would go on to taking on multilabel classification (its another objective function).

This might help


1 Like