prompter: Traditional GAN:s have problems when the data is in discrete format since there are no derivata between true and false values. So how can GAN:s be able to generate text? Some sources claim that the text should be preprocessed in a transformer model, but are the values not still discrete?

assistant: You are correct.

To overcome this issue, researchers have developed a variant of GANs called "Sequence GANs" that are specifically designed for generating discrete data, such as text. In these models, the generator and discriminator are trained on sequences of tokens (e.g., words or characters) instead of continuous data.

Text generation with GANs often involves preprocessing the text into a numerical representation, such as a one-hot encoding or a word embedding, to convert the discrete data into a continuous representation that can be used as input to the GAN.

The GAN architecture may also be augmented with additional components, such as a recurrent neural network (RNN) or a transformer, to capture the underlying structure in the text data. These models can be trained to generate sequences of text tokens that are conditioned on a given prompt or conditioned on the previous tokens generated by the model.

It's important to note that while GANs have shown promising results in generating text, they can still be challenging to train due to the instability of the GAN training process. Additionally, the generated text may still contain grammatical errors, irrelevant or nonsensical content, or lack coherence and cohesiveness compared to human-written text.

prompter: Is there still ongoing research with GAN-based text generators, or have they been phased out? What would the advantages of a GAN be over traditional transformers?

assistant: To generate text using GANs, it is necessary to address the challenge posed by the discrete nature of text data. One solution is to preprocess the text by encoding it into a continuous space using a transformer-based language model. This transformation allows the GAN to treat the text as a continuous signal, rather than a series of discrete tokens, and use standard GAN architectures. After generation, the output from the generator network is decoded back into text form, producing generated text sequences.

prompter: How can one address biases in training and data of a ML model?

assistant: Below are some of the techniques and processes that we can implement to address bias in ML.

Anonymization and Direct Calibration: 
Removing names and gendered pronouns from documents as they’re processed is a good first step, as is excluding clear markers of protected classes. Although this is an important start, it’s not a complete solution. These signals still show up in many places that are impossible to wholly disentangle. Research has shown that the bias remains in second-order associations between words: For example, “female” and “male” associated words still cluster and can still form undesired signals for the algorithms as a result. Nevertheless, randomizing names as we feed data into a model prevents the algorithm from using preconceptions about the name in its decision making. This is also a good practice in initial resume screening even when done by humans.

Linear Models: 
Deep models and decision trees can more easily hide their biases than linear models, which provide direct weights for each feature under consideration. For some tasks, then, it may be appropriate to trade the accuracy of more modern methods for the simple explanations of traditional approaches. In other cases, we can use deep learning as a “teacher” algorithm for linear classifiers: a small amount of annotated data is used to train a deep network, which then generates predictions for many more documents. These then train the linear classifier. This can approach deep learning accuracy, but allows a human to view the reasons for a classification, flagging potentially biased features in use.

Adversarial Learning: 
If a model can’t reliably determine gender or race, it’s difficult for it to perform in a biased manner. Adversarial learning shares the weights in a deep network between two classifiers: One solves the problem of interest, and the other one determines some fact such as the author’s gender. The main classifier is trained like usual, but the adversarial classifier, for example a gender classifier, penalizes weights when the model makes a correct prediction until that classifier consistently fails. If the internal representation of the document contained gender signal, we’d expect the second classifier to eventually discover it. Since it can’t, we can assume the first classifier isn’t making use of this information.

Data Cleaning: 
In many ways, the best way to reduce bias in our models is to reduce bias in our businesses. The data sets used in language models are too large for manual inspection, but cleaning them is worthwhile. Additionally, training humans to make less biased decisions and observations will help create data that does the same. Employee training in tandem with review of historic data is a great way to improve models while also indirectly addressing other workplace issues. Employees are taught about common biases and sources of them, and review training data looking for examples of biased decisions or language. The training examples can be pruned or corrected, while the employees hopefully become more careful in their own work in the future.

Audits and KPI: 
Machine learning is complicated, and these models exist within larger human processes that have their own complexities and challenges. Each piece in a business process may look acceptable, yet the aggregate still displays bias. An audit is an occasional deeper examination of either an aspect of a business or how an example moves through the whole process, actively looking for issues. Key performance indicators, or KPIs, are values that can be monitored to observe whether things are trending in the right direction, such as the percentage of women promoted each year. Audited examples may be atypical, and KPIs fluctuate naturally, but looking for possible issues is the first step toward solving them, however that may end up being accomplished.

Human Exploration: 
This is one of the best ways of finding issues in real systems. Studies that sent employers identical resumes with stereotypically white and Black names as their only variable have demonstrated hiring biases in corporate America. Allowing people to play with inputs or search through aggregate statistics is a valuable way to discover unknown systemic issues. For particularly important tasks, you can even implement “bias bounties,” offering cash rewards to people who find clear flaws in an implementation. Depending on data sensitivity, this could be access to the results of models in practice, so researchers can statistically demonstrate ways the models acted biased in the past, or an opportunity to create fake data in an effort to show that some pattern of use causes undesired behavior by the model.

prompter: Can you Tl;dr; that please?

assistant: You can try and diversify your data sources as much as possible. For instance, you might want to aim for equal representation of various minority populations in your data, rather than predominantly choosing the majority. You may also consider asking a member of a minority population to see if your data is possibly discriminatory or biased.

prompter: Can you please give me further tips to avoid such biases?