
\input{tables/augCounts}

\section{Data Augmentation}
\label{sec:augmentation}
In very low-resource settings, data augmentation can be highly effective at improving output quality and performance. We employ a number of strategies for augmentation. \autoref{tab:augmented_data} summarizes the training splits and number of artificial examples created by each strategy. Examples of each augmentation strategy appear in \autoref{tab:aug_examples} (Appendix~\ref{sec:aug-appendix}).

\paragraph{Sentence copying (\textsc{Copy}).}
A major challenge in this task is that the sentences in the evaluation set include lemmas and words which are not present in the training set. To address this, we use a variation of the \textit{lemma copying} technique described in \citet{liu-hulden-2022-transformer, yang-etal-2022-generalizing}, which we designate \textit{sentence copying}. 

In this technique, we create additional training examples where the source and target sentence are identical and the \textit{Change} field is blank. We create examples for every source sentence and target sentence in the training set ($\textsc{Copy}_{tr}$). We also experiment with creating examples for every source sentence in the dataset being used for evaluation, and add these to the former to create $\textsc{Copy}_{all}$. This technique, a form of domain adaptation, provides the model with a bias towards copying and aids the decoder in producing coherent sentences in the language. $\textsc{Copy}_{all}$ was not an allowable strategy for our final shared task submission, but we include the results here for comparison.

\paragraph{External sentence copying ($\textsc{Copy}_{ext}$).}
% \mb: feel free to cut down and summarize this section, I went for detailed rather than succinct. Anything we don't have to mention explicitly we can cut for space.
As external resources are valid for the shared task, we can extend the coverage provided by the sentence copying technique by using data from outside the provided datasets, similar to the approach used in \citet{kann-schutze-2017-unlabeled}. We find existing unlabeled text corpora in the languages and create additional $\textsc{Copy}$ rows for every sentence. 

%Specifically, 
For Maya, we extract transcriptions from the ELAN\footnote{\url{https://archive.mpi.nl/tla/elan}} \cite{sloetjes-wittenburg-2008-annotation} data in the Yucatec Maya DoReCo dataset \cite{doreco-yuca1254}. We discard non-utterance transcriptions (such as pauses) but keep the same segmentation as the original transcription (which may not be grammatically complete sentences).
For Bribri, we leverage the dataset provided by the AmericasNLP 2024 Shared Task 1;\footnote{\url{https://turing.iimas.unam.mx/americasnlp/2024\_st\_1.html}} we also use the provided orthographic conversion tool.\footnote{\url{https://github.com/AmericasNLP/americasnlp2024/}} 
Finally, for Guaran\'{i}, we use a portion of the CC-100 corpus \cite{conneau-etal-2020-unsupervised}.

All datasets were sanity-checked to ensure they used orthographies comparable to the training data for a given language, but no comprehensive analysis was performed for orthographic alignment. We also filter the datasets by excluding utterances which are significantly longer than those in the shared task training or dev sets.\footnote{Arbitrarily defined, per language, as 1.5 times the max length in characters of a sentence in the training or dev set.}

\paragraph{Transitive transformations (\textsc{Trans}).}
In the standard inflection task, inputs are lemmas and outputs are inflected word forms. In this task, however, the inputs are grammatical sentences (as there is no clear equivalent for a lemma form of a sentence) and have non-null linguistic features already. 

For example, there are instances in the datasets which transform a sentence to carry second person inflection. Presumably, the source sentence in these instances is either first or third person; the linguistic features of the source sentences are not specified. If there is \emph{also} an instance in the dataset where the same source sentence is transformed to carry third person inflection, then we know there is a relationship between the two target sentences (in addition to their relationships to the common source sentence).

In these cases, we can create an additional example that takes one of the target sentences as input and produces the other target sentence, using the linguistic change from the latter instance (and vice versa). We can use this strategy for any pair of examples where the source sentence is identical and the linguistic change of the latter sentence replaces all of the feature values of the former. We describe this strategy as \textit{transitive transformations}.

\paragraph{Stem perturbation (\textsc{Per}).}
We follow the insights of \citet{silfverberg-etal-2017-data} and \citet{anastasopoulos-neubig-2019-pushing}, which seek to replace stems with random character sequences from the language. Different approaches have been used to identify stems: \citet{silfverberg-etal-2017-data} uses the longest common substring, while \citet{anastasopoulos-neubig-2019-pushing} uses character alignment to select substrings that are aligned between the lemma and inflected form.

We use an alternate strategy based on edit trees. Starting with a source sentence, we randomly change one or two characters (via deletion, or via insertion of or replacement with a random character from the domain character set); if the edit trees which could be applied to the original source can be also applied to the altered sentence, the latter is considered valid and added to the pool of possible augmentations. We repeat this process ten times per original source sentence (with each altered sentence serving as the new `source' sentence), then randomly sample from the pool of possible augmentations for training.
%\mb:  Feel free to cut down on this description, it's pretty verbose.

\paragraph{Concatenation (\textsc{Con}).}
For this strategy, we select 
%examples 
sentence pairs that have exactly the same set of linguistic 
%features, 
transformations. We then produce a new training example by concatenating the two source sentences to be the new source, and concatenating the two target sentences to be the new target output.
%and simply concatenate the source and target sentences together into a single example.\cyan{[AP: this needs clarification - what does it mean for examples to have the same linguistic features?]}

\paragraph{Embedding-based augmentation.}

A more structured approach to augmentation is to replace words with their synonyms whenever possible while keeping the sentence structure and type of transformation constant. To find synonyms in our vocabulary, we first train language-specific static embeddings over external datasets for Guaran\'{i} and Bribri. For this purpose, we simply use the data provided as part of the first shared task of AmericasNLP 2024.

Deviating from our previous character-based approach, we use byte-pair encoding to tokenize our data. We then train a word2vec model and use these vectors as subword representations. Words that are not inflected in the training data\footnote{After byte-pair encoding, we create a list of standalone tokens and use them as candidates for synonym replacement. Our BPE encoder uses underscores to denote that a token is inflected or acts as an inflection. We assume that these standalone tokens that frequently appear without underscores can be replaced with a synonym.} are replaced with a randomly sampled word from its top 3 most similar words in the embedding space. This allows us to create duplicates of both source and target sentences with minimal, targeted alteration to the semantic and morpho-syntactic content of the data.

\input{tables/resultsNoAug}