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

Add BaryScore #852

Open
stancld opened this issue Feb 21, 2022 · 9 comments
Open

Add BaryScore #852

stancld opened this issue Feb 21, 2022 · 9 comments
Assignees
Labels
Milestone

Comments

@stancld
Copy link
Contributor

stancld commented Feb 21, 2022

🚀 Feature

Add BaryScore

Sources:

Motivation

The recent NLG metrics are more often based on BERT (or related) embeddings. As such, I believe, we should also start adding such metrics into TorchMetrics with an extra dependency on transformers if a user wants to use any of these metrics. The BaryScore metric is from a family of untrained metrics (i.e. the model is not fine-tuned on any specific task) so it should be easier for us to begin with it.

Abstract:

A new metric BaryScore to evaluate text generation based on deep contextualized embeddings e.g., BERT, Roberta, ELMo) is introduced. This metric is motivated by a new framework relying on optimal transport tools, i.e., Wasserstein distance and barycenter. By modelling the layer output of deep contextualized embeddings as a probability distribution rather than by a vector embedding; this framework provides a natural way to aggregate the different outputs through the Wasserstein space topology. In addition, it provides theoretical grounds to our metric and offers an alternative to available solutions e.g., MoverScore and BertScore). Numerical evaluation is performed on four different tasks: machine translation, summarization, data2text generation and image captioning. Our results show that \texttt{BaryScore} outperforms other BERT based metrics and exhibits more consistent behaviour in particular for text summarization.

@stancld stancld added enhancement New feature or request New metric labels Feb 21, 2022
@stancld stancld added the good first issue Good for newcomers label Feb 21, 2022
@ashutoshml
Copy link
Contributor

Interested!

@stancld
Copy link
Contributor Author

stancld commented Feb 22, 2022

Great, @ashutoshml! Just let's wait on #849 as we discussed as there'll be many common dependencies :]

@stancld
Copy link
Contributor Author

stancld commented Mar 31, 2022

Hi @ashutoshml - I'd like to apologize for my delay here. I've been quite busy and unable to complete my part yet. Gonna try to proceed this weekend as much as possible.

@stancld stancld mentioned this issue Jun 24, 2022
4 tasks
@stancld
Copy link
Contributor Author

stancld commented Jun 25, 2022

Hello @ashutoshml, very sorry for my really huge delay, last months have been pretty turbulent for me. Let me know if you're still interested in contributing this metric to torchmetrics. If so, I believe you can checkout branch metric/InfoLM and start working on BaryScore metric implementation. One thing is that the reference metrics are still not possible to install as a package. We are thus enforced to hardcode the results in our tests. If you want to generate test results for your metric, I really recommend you to use my repo infolm-docker. Would be also happy if you send a PR there to contain all reference results on one place.

@ashutoshml
Copy link
Contributor

Hi @stancld. I hope things are ok now.
I will be able to take up this only after Aug 5.

@stancld stancld self-assigned this Jul 12, 2022
@stancld stancld added this to the v0.10 milestone Jul 14, 2022
@stancld stancld removed this from the v0.10 milestone Jul 27, 2022
@stancld
Copy link
Contributor Author

stancld commented Jul 27, 2022

Hi @ashutoshml, it's completely fine - the time is really flying so we're almost there. If you're then interested, just let me know. I have some WIP we can discuss and can create a MR together :]

@stancld
Copy link
Contributor Author

stancld commented Sep 8, 2022

Helo @ashutoshml, any updates here? :]

@ashutoshml
Copy link
Contributor

Hi @stancld - Was occupied with some work. I will have a look at it this weekend.

@SkafteNicki SkafteNicki added this to the future milestone Oct 26, 2022
@stancld stancld removed the good first issue Good for newcomers label Nov 6, 2022
@Borda
Copy link
Member

Borda commented Nov 7, 2022

I will have a look at it this weekend.

great, looking forward @ashutoshml 🚀

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

No branches or pull requests

6 participants
@ashutoshml @Borda @SkafteNicki @stancld and others