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

Negated antonym #255

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Mayukhga83
Copy link

@Mayukhga83 Mayukhga83 commented Aug 31, 2021

Added a novel perturbation named negated antonym perturbation. This perturbation changes and adjective or adverb to its negated antonym, and thereby preserving the semantics.

@marco-digio
Copy link
Contributor

marco-digio commented Sep 14, 2021

Hi @Mayukhga83
I was assigned as one of your reviewers.
Thanks for this contribution!
My main concern is that this perturbation is very similar to #222 , with the only difference of adding the "not" word. I believe that this could be merged into the other PR as a special case.

Correctness: No checks performed (1 workflow awaiting approval)
Interface: I think you have chosen the correct interface(s).
Applicable Tasks & Keywords: I think you have chosen the relevant tasks. Please also insert keywords as explained here
Specificity: The change involves only texts with adjectives or adverbs.
Novelty: This transformation is very similar to #222 and #150 implemented in NL-Augmenter.
Adding New Libraries: No
Description: The README is clear and explains what the transformation is aiming to do.
Data and code source: Data and code source missing.
Test Cases: 7 test cases have been added.
Evaluating Robustness: No robustness evaluation has been performed.
Languages other than English: No

@Mayukhga83
Copy link
Author

Mayukhga83 commented Sep 15, 2021

Hi @Mayukhga83
I was assigned as one of your reviewers.
Thanks for this contribution!
My main concern is that this perturbation is very similar to #222 , with the only difference of adding the "not" word. I believe that this could be merged into the other PR as a special case.

Correctness: No checks performed (1 workflow awaiting approval)
Interface: I think you have chosen the correct interface(s).
Applicable Tasks & Keywords: I think you have chosen the relevant tasks. Please also insert keywords as explained here
Specificity: The change involves only texts with adjectives or adverbs.
Novelty: This transformation is very similar to #222 and #150 implemented in NL-Augmenter.
Adding New Libraries: No
Description: The README is clear and explains what the transformation is aiming to do.
Data and code source: Data and code source missing.
Test Cases: 7 test cases have been added.
Evaluating Robustness: No robustness evaluation has been performed.
Languages other than English: No

Have added Robustness Metric and Key word
The code has not been taken from any source
#222 and #150 are different as they completely changes the semantics, therefore they are not a valid adversarial perturbation
while NegatedAntonym retains the meaning/semantics to a high degree and also lowers the accuracy

@james-simon
Copy link
Contributor

I'm also a reviewer for this task. I agree with @marco-digio's comments; this transformation certainly adds functionality to the project that #222 and #150 don't, but given that all three perform similar tasks and use the same library for identifying antonyms, it'd make the project cleaner if they were consolidated. @kaustubhdhole, do you have an opinion as to whether these PRs should be combined?

Aside from that, I have a few other minor comments that should be addressed before merging. Here's a list:

  • The README says that it "detects all type of adjectives and adverb". This should read "detects all typeS of adjectives and adverbS." More importantly, tho, you later say that it "is limited to only adjectives and adverbs (comparative and superlative)." Does this transformation detect all modifiers, or only comparative and superlative modifiers?
  • The tests are extremely similar: each is a short sentence in which one word is negated. Longer, more creative examples would be much more illustrative of this transformation's effect and much more convincing that it's correct. One easy solution would be to add several examples where the input is a full paragraph from a website or book.
  • The tests contain errors. Every example has an extra space before the period in the desired output. Also, in one example, "smarter" is replaced by "not stupid," when it should be replaced by "not stupider." The transformation code, it seems, has some errors to find and fix.

Let me know if you have any questions!

@Mayukhga83
Copy link
Author

Mayukhga83 commented Oct 11, 2021

@james-simon , @ashish3586 and @marco-digio

Sorry for the late reply,

  • I have fixed the README
  • I have added new test, including full paragraph from wkikipedia
  • Have resolved the error with extra space before the period and commas
  • Have added keywords and robustness

This will benefit for robustness of text classification like sentiment analysis, etc.


## What are the limitations of this transformation?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This transformation is unfortunately the same as #222 as it too uses negated antonyms. @Mayukhga83 is there anything different?

Copy link
Author

@Mayukhga83 Mayukhga83 Oct 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaustubhdhole unfortunately yes except for the 'not' word as @marco-digio pointed. Secondly, this always does double negation for both even and odd number of adjective unlike #222 which only does it for even number of adjective words.
As the addition of 'not' gives a better robustness score than #222 (I have only checked for roberta-base-imdb) , It could be merged as a special case of the other PR if suited.

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

Successfully merging this pull request may close these issues.

6 participants