Skip to content

Commit

Permalink
docs: Updated paper with feedback from @sap218
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Mar 11, 2024
1 parent 4672b01 commit 4bf0cb2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,29 @@ bibliography: paper.bib
---

# Summary
Text augmentation is a useful tool for training [@wei-zou-2019-eda] and evaluating [@ribeiro-etal-2020-beyond] natural language processing models and systems. Despite its utility, existing libraries are often limited in terms of functionality and flexibility. They are confined to basic tasks such as text-classification or by catering to specific downstream use-cases such as estimating robustness [@goel-etal-2021-robustness]. Recognizing these constraints, `Augmenty` is a tool for structured augmentation of text along with its annotations. `Augmenty` integrates seamlessly with the popular NLP library `spaCy` [@honnibal_efficient_2020] and seeks to be compatible with all models and tasks supported by `spaCy`. Augmenty provides a wide range of augmenters which can be combined in a flexible manner to create complex augmentation pipelines. It also includes a set of primitives that can be used to create custom augmenters such as word replacement augmenters. This functionality allows for augmentations within a range of applications such as named entity recognition (NER), part-of-speech tagging, and dependency parsing.
Text augmentation - the process of generating new text samples by applying transformations to existing samples - is a useful tool for training [@wei-zou-2019-eda] and evaluating [@ribeiro-etal-2020-beyond] natural language processing (NLP) models and systems. Despite its utility, existing libraries are often limited in terms of functionality and flexibility. They are confined to basic tasks such as text-classification or by catering to specific downstream use-cases such as estimating robustness [@goel-etal-2021-robustness]. Recognizing these constraints, `Augmenty` is a tool for structured augmentation of text along with its annotations. `Augmenty` integrates seamlessly with the popular NLP library `spaCy` [@spacy] and seeks to be compatible with all models and tasks supported by `spaCy`. Augmenty provides a wide range of augmenters which can be combined in a flexible manner to create complex augmentation pipelines. It also includes a set of primitives that can be used to create custom augmenters such as word replacement augmenters. This functionality allows for augmentations within a range of applications such as named entity recognition (NER), part-of-speech tagging, and dependency parsing.

# Statement of need
<!-- augmentation is useful -->
Augmentation has proven to be a powerful tool within disciplines such as computer vision [@wang2017effectiveness] and speech recognition [@Park2019SpecAugmentAS] where it is used for both training more robust models and for evaluating the ability of the models to handle pertubations. Within natural language processing (NLP) augmentation has seen some uses as a tool for generating additional training data [@wei-zou-2019-eda], but has shined as a tool for model evaluation, such as estimating robustness [@goel-etal-2021-robustness] and bias [@lassen-etal-2023-detecting], or for creating novel datasets [@nielsen-2023-scandeval].
Augmentation has proven to be a powerful tool within disciplines such as computer vision [@wang2017effectiveness] and speech recognition [@Park2019SpecAugmentAS] where it is used for both training more robust models and for evaluating the ability of the models to handle pertubations. Within NLP augmentation has seen some uses as a tool for generating additional training data [@wei-zou-2019-eda], but has shined as a tool for model evaluation, such as estimating robustness [@goel-etal-2021-robustness] and bias [@lassen-etal-2023-detecting], or for creating novel datasets [@nielsen-2023-scandeval].

Despite its utility, existing libraries for text augmentation often exhibit limitations in terms of functionality and flexibility. Commonly they only provide pure string augmentation which typically leads to the annotations becoming misaligned with the text. This has limited the use of augmentation to tasks such as text classification while neglecting structured prediction tasks such as named entity recognition (NER) or coreference resolution. This has limited the use of augmentation to a wide range of tasks both for training and evaluation.

<!-- limitation of existing methods -->
Existing tools such as `textgenie` [@pandya_hetpandyatextgenie_2023], and `textaugment` [@marivate2020improving] implements powerful techniques such as backtranslation and paraprashing, which are useful augmentations for text-classification tasks. However, these tools neglect a category of tasks which require that the annotations are aligned with the augmentation of the text. For instance even simple augmentations such as replacing the named entity "Jane Doe" with "John" will lead to a misalignment of the NER annotation, part-of-speech tags, etc., which if not properly handled will lead to a misinterpretation of the model performance or generation of incorrect training samples.

`Augmenty` seeks to remedy this by providing a flexible and easy-to-use interface for structured text augmentation. `Augmenty` is built to integrate well with `spaCy` [@honnibal_efficient_2020] and seeks to be compatible with the broad set of tasks supported by `spaCy`. Augmenty provides augmenters which take a spaCy `Doc`-object (but works just as well with `string`-objects) and return a new `Doc`-object with the augmentations applied. This allows for augmentations of both the text and the annotations present in the `Doc`-object.
Other tools for data augmentation focus on specific downstream application such as `textattack` [@morris2020textattack] which is useful for adversarial attacks of classification systems or `robustnessgym` [@goel-etal-2021-robustness] which is useful for evaluating robustness of classification systems.


`Augmenty` introduced a flexible and easy-to-use interface for structured text augmentation, seeking to augment the annotations along with the text. `Augmenty` is built to integrate well with `spaCy` [@spacy] and seeks to be compatible with the broad set of tasks supported by `spaCy`. Augmenty provides augmenters which take a spaCy `Doc`-object (but works just as well with `string`-objects) and return a new `Doc`-object with the augmentations applied. This allows for augmentations of both the text and the annotations present in the `Doc`-object.
`Augmenty` does not seek to replace useful tools such as `textattack`, but seeks to provide a general purpose tool for augmentation of both the text and its annotations. This allows for augmentations within a range of applications such as named entity recognition, part-of-speech tagging, and dependency parsing.

Other tools for data augmentation focus on specific downstream application such as `textattack` [@morris2020textattack] which is useful for adversarial attacks of classification systems or `robustnessgym` [@goel-etal-2021-robustness] which is useful for evaluating robustness of classification systems. `Augmenty` does not seek to replace any of these tools
but seeks to provide a general purpose tool for augmentation of both the text and its annotations. This allows for augmentations within a range of applications such as named entity recognition, part-of-speech tagging, and dependency parsing.

# Features & Functionality

`Augmenty` is a Python library that implements augmentations based on `spaCy`'s `Doc` object. `spaCy`'s `Doc` object is a container for a text and its annotations. This makes it easy to augment text and annotations simultaneously. The `Doc` object can easily be extended to include custom augmentation not available in `spaCy` by adding custom attributes to the `Doc` object. While `Augmenty` is built to augment `Doc`s the object is easily converted into strings, lists or other formats. The annotations within a `Doc` can be provided either by human annotations or using a trained model.

Augmenty implements a series of augmenters for token-, span- and sentence-level augmentation. These augmenters range from primitive augmentations such as word replacement to language specific augmenters such as keystroke error augmentations based on a French keyboard layout. Augmenty also integrates with other libraries such as `NLTK` [bird2009natural] to allow for augmentations based on WordNet [@miller-1994-wordnet] and allows for specification of static word vectors [pennington-etal-2014-glove] to allow for augmentations based on word similarity. Lastly, `augmenty` provides a set of utility functions for repeating augmentations, combining augmenters or adjust the percentage of documents that should be augmented. This allow for the flexible construction of augmentation pipelines specific to the task at hand.
Augmenty implements a series of augmenters for token-, span- and sentence-level augmentation. These augmenters range from primitive augmentations such as word replacement to language specific augmenters such as keystroke error augmentations based on a French keyboard layout. Augmenty also integrates with other libraries such as `NLTK` [@bird2009natural] to allow for augmentations based on WordNet [@miller-1994-wordnet] and allows for specification of static word vectors [pennington-etal-2014-glove] to allow for augmentations based on word similarity. Lastly, `augmenty` provides a set of utility functions for repeating augmentations, combining augmenters or adjust the percentage of documents that should be augmented. This allow for the flexible construction of augmentation pipelines specific to the task at hand.

# Example Use Cases

Expand Down

0 comments on commit 4bf0cb2

Please sign in to comment.