Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading unprocessed corpus documents with CTM and Optimizer #46

Open
lfmatosm opened this issue Nov 29, 2021 · 4 comments
Open

Loading unprocessed corpus documents with CTM and Optimizer #46

lfmatosm opened this issue Nov 29, 2021 · 4 comments

Comments

@lfmatosm
Copy link
Contributor

  • OCTIS version: 1.10.0
  • Python version: 3.7.6
  • Operating System: Ubuntu 20.04 LTS

Description

I've asked this at #29, but decided to open a new issue because this is a more specific scenario. So, here it is:

Hi @silviatti. So, if I understand correctly, currently there's no way to load the unprocessed corpus documents on OCTIS' CTM while using its optimizer, in a manner similar to the one done on standalone CTM's README?

Originally posted by @lffloyd in #29 (comment)

What I Did

I gave a look at the docs.

@silviatti
Copy link
Collaborator

Thanks for open the specific issue, because I had lost the question. Yes, I confirm that there's currently no way to load the unpreprocessed corpus.
As mentioned before, this would require to rethink how we pre-process the corpus and the format of the pre-processed corpus. This is currently a .tsv file with no header. The first two columns are mandatory, and they contain the pre-processed text and the partition of the dataset to which the document belong. Then we may have an additional column representing the label associated with the doc.

A possibility could be to add an additional column representing the unpreprocessed text. This could be mandatory (although it's not necessary if one doesn't use CTM) or this could be optional. In case it's optional, this can create some confusion (how can we recognize that a specific column represents the unpreprocessed text, the labels, etc?), unless we provide a header to the .tsv file.

Happy to discuss if you want. Unfortunately my time to dedicate to this project has been reduced lately. So I am be slow to respond. However I think OCTIS can be useful for the community and I'm trying to keep it alive :)

@rbroc
Copy link

rbroc commented Sep 9, 2022

following up on this cause I stumbled on the same issue (I think) and want to double-check I understand correctly.

I need to do hyperparameter optimization + model comparison for multiple CTMs, and I want to pass unpreprocessed text to the transformer part of the pipeline, while passing processed text to the neural topic model.

It seems like at the moment this is not supported here, I have to stick to manually trying different HP combinations and computing metrics through https://github.com/MilaNLProc/contextualized-topic-models, correct?

Amazing work, by the way 🙏

@silviatti
Copy link
Collaborator

Thanks Roberta! :)

yes, that is correct.

My suggestion is to first try hyperparameter configurations that "usually" work well. You can find some reference values in these papers:

Moreover, make sure you select an appropriate pre-trained model for generating the contextualized representations of the documents. In this paper we noticed that this has an impact on the results. And also the pre-processing is quite important. It seems CTM works better with smaller vocabularies.

Hope it helps :)

Silvia

@rbroc
Copy link

rbroc commented Sep 13, 2022

thanks for the super quick reply and the pointers! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants