Input Limitations

#3
by f1amigo - opened

I'm quite new to this, so bear with me.

I want to use this model on texts that are not from Wikipedia, and in fact, the texts are not articles at all. However, from what I understand, this model seemed to use Wikipedia as its knowledge base. So is it possible to train and use the model for non-Wikipedia text inputs? So far, the results I got from testing using Wikipedia articles have been great, and I would like to extend this to other types of texts as well.

Babelscape org

Hi, welcome to the ever-changing NLP field :)

Indeed, REBEL was trained on a lot of Wikipedia texts. This means that it will work better on text that is similar to Wikipedia, especially to the text before Table of Contents, since that is what was used.

So, how the model will work on Out-of-Domain (OOD, is how we refer to text from a different source/nature than the one used at train time) can really depend on how different that text is.

I would first try REBEL on that text and see how the output looks. Then, if it is not that good, I suggest you fine-tune the model with text that is more similar to yours. This requires a bit more work. First, you would need to annotate some text with the relations that you are interested in extracting. Then you need to fine-tune on top of REBEL with your annotations. Be aware that when fine-tuning on top of REBEL you may face catastrophic forgetting, which means that the model "forgets" what it was first trained on (i.e., to extract the relation types you see using REBEL). So you either cover all the relation types you want to extract on your new annotation or you can mix the data with the (REBEL dataset).

I know this is quite a lot, but you can check the REBEL github for more details on training. Also, if by any chance you are interested in news text, there is a dataset (NYT) that covers 25 relation types, which may cover your needs. On the GitHub page, you can find how to finetune REBEL on NYT, but if you don't figure that out, I can find a way to share with you a trained checkpoint.

Hope this helps, and sorry if some of these were redundant for you, I figured if you said you were new to this, it was better to assume not.

PereLluis13 changed discussion status to closed

Sign up or log in to comment