Objective

Online courses with thousands of learners often have discussion forums where questions pile up and instructors cannot answer every post. Large language models (LLMs), the AI systems behind chatbots, could write quick replies at any hour. Many students also need encouragement, not only facts, so the emotional tone of a reply matters.

The worry is bias. LLMs learn from huge amounts of text that can carry stereotypes. If a model answered posts from women in a different emotional tone than posts from men, some learners could get less support. The authors call this sentiment bias, meaning an unfair difference in the emotional tone of replies for different groups. They looked at gender as a case study.

The paper had three aims, framed as research questions:

  1. What emotional tone (sentiment) do LLM replies in forums have, compared with human replies?
  2. Do LLMs show sentiment bias when replying to posts?
  3. How can support be made fairer and easier to explain?

The authors also introduced a new fairness measure called absolute distributional sentiment divergence (ADSD). It compares how replies to original posts and to gender-swapped copies of those posts are spread across the sentiment scale.

Methods

This was a computational study. It did not involve students directly. It used text data and computer-based scoring, so it can show how models behave on this data but not how real learners respond to them.

The data came from the Stanford MOOC Posts dataset, which holds 29,604 anonymized learner forum posts from 11 public Stanford online courses in humanities, medicine and education. Human raters had scored each post's sentiment from 1 (negative) to 7 (positive), with 4 as neutral. After cleaning, the authors matched parent posts with replies to get 8,322 pairs.

To test gender bias, the authors used the GPT-4 API to rewrite each post so that only the gender reference changed (for example, women became men). These are called counterfactual posts.

Three models were fine-tuned (trained further) to reply to forum posts: GPT-2 small, Gemma 7B and LLaMA3 8B. Each was trained two ways, and 80% of the pairs were used for training:

  • Original fine-tuning, using only the real posts and replies.
  • Counterfactual fine-tuning, using the real pairs plus the gender-swapped pairs.

Reply tone was scored with two tools. One was a BERT model fine-tuned for the 1 to 7 scale (76.66% accurate on validation data). The other was a simple word-counting method using the AFINN word list (62% accurate), which is less likely to carry hidden bias. ADSD was computed as the area between the two tone curves. A smaller value means more similar tone and so more fairness.

Reply quality was checked with TIGERSCORE, a tool that finds errors in generated text, labels them and subtracts points, without needing a model answer. A random sample of 200 replies was used for similarity checks. A human evaluation is shown in the paper's figure, but the text gives no results from it.

Key Findings

Overall, the AI replies were more neutral than human replies and showed gender-linked tone differences. Counterfactual training narrowed those differences by small amounts, and the newer models made fewer errors than GPT-2.

Tone of AI replies compared with human replies

  • Neutral replies made up 62% of human replies. GPT-2 produced 59% neutral replies, while Gemma and LLaMA each produced 80% or more.
  • Negative replies were 11% for humans, 10% for Gemma and 11% for LLaMA.
  • Positive replies were 27% for humans but only 12% for GPT-2, 10% for Gemma and 6% for LLaMA.
  • None of the model replies were extremely negative or extremely positive (below 2 or above 6 on the 7-point scale).
  • Average BERT scores were 4.18 for humans, 3.84 for GPT-2, 4.01 for Gemma and 4.05 for LLaMA. All differences from human replies were statistically significant with both scoring tools.
  • Reply length averaged 35.04 words for GPT-2, 43.20 for Gemma and 50.08 for LLaMA. Readability was about fifth-grade level for GPT-2 (5.24) and about seventh-grade level for Gemma (7.19) and LLaMA (7.02).

Gender-linked bias

  • Replies to original posts and to gender-swapped posts had different tone patterns in all three models, which the authors read as gender bias. For example, Gemma's replies to the swapped posts leaned more negative, and both Gemma and LLaMA gave fewer very positive replies to them.
  • The two scoring tools disagreed on how large the bias was. For LLaMA the ADSD was 0.8261 with BERT and 0.1983 with the word-counting tool.

Effect of counterfactual training

  • ADSD fell for every model and both tools. The drops were 1.48% (BERT) and 1.38% (word-counting) for GPT-2, 1.46% and 3.68% for Gemma, and 2.22% and 2.65% for LLaMA.

Quality of replies

  • Average TIGERSCORE point deductions were 6.23 for GPT-2, 1.09 for Gemma and 0.97 for LLaMA. Lower is better.
  • Over 80% of GPT-2 replies lost 4 or 8 points. For Gemma and LLaMA, nearly 20% lost no points and over 70% lost only 1 point.
  • The checker flagged problems with accuracy, comprehension and how informative replies were, such as a reply about teaching theorem proofs that had nothing to do with the post.

Implications

The authors suggest that curriculum designers and platform developers might fine-tune models to better match students' emotional needs, and that counterfactual training is a practical step toward fairer tone. They also present ADSD and TIGERSCORE as reusable tools for checking fairness and quality at scale.

Developers and researchers

  • Test replies for tone differences across groups before release. Swapping a gender word in test posts and comparing the tone of replies is the approach used here.
  • Use more than one tone scorer, because the two scorers here gave very different ADSD values.
  • Check quality with more than one tool, since the error checker was built on the LLaMA family and may favor LLaMA3.

Instructors and course teams

  • The authors note that mostly neutral replies may lack the warmth that human replies often show, so AI replies might not replace personal encouragement.

Our reading (not the authors' recommendation): because replies still contained accuracy and comprehension errors, a human could review or spot-check AI replies before students see them, at least for sensitive or confusing posts.

Our reading (not the authors' recommendation): course teams could look at replies to posts that mention gender, in case they differ in tone from replies to similar posts.

The evidence is too thin to say how students would feel about these replies or whether fairer tone scores would change learning. No students were involved in rating the replies.

Limitations

The authors name several limits. The training data is smaller than the sets usually used to train models. Counterfactual posts were generated with a paid GPT-4 service, which can be costly. Only gender, treated as two categories, was examined. Only one error-checking tool, TIGERSCORE, was used, and it is built on LLaMA models, which may favor LLaMA3 over Gemma. Not all AI text was reviewed by people, so some errors and biases may remain unseen, and the authors call for more manual analysis and human satisfaction ratings.

The paper does not mention, but the gender-swapped posts were written by another AI model, and the paper gives no check on how natural or accurate those rewrites were. Any flaws in them could affect the bias results.

The paper does not mention, but the size of the bias reduction is small, between 1.38% and 3.68%, and no statistical test is reported for it. It is therefore hard to say whether the improvement is large enough to matter to a learner.

The paper does not mention, but the study measures emotional tone only. A reply could be neutral in tone and still be unfair, or warm in tone and still be unhelpful, and the study did not test whether learners felt supported.

The paper does not mention, but all posts come from 11 Stanford online courses in three subject areas, so the results may differ in other platforms, languages or age groups. Also, the tone scorers were imperfect, with accuracies of 76.66% and 62%.

Future Directions

The authors plan to test sensitive attributes other than gender, such as race, occupation and geographic location, and to apply the method to several attributes at once. They also plan to try open-source tools for creating counterfactual posts instead of a paid service. They suggest measuring the tone of human educators' replies as a baseline, so AI replies can be compared with real teachers, and using other quality metrics, such as GPTScore, alongside TIGERSCORE. Finally, they call for more human review of replies and for ratings of learner satisfaction.

Open questions that follow from the study:

  • Do real learners feel more supported by neutral AI replies or by warmer human ones?
  • Does fairer tone change engagement, persistence or learning?
  • Does the gap between the two scoring tools shrink with better measures of tone?

The bottom line: This computational study of 8,322 forum post and reply pairs found that fine-tuned AI models, especially Gemma and LLaMA, wrote mostly neutral replies with few positive ones, and that the tone of their replies differed between original and gender-swapped posts. Training with both versions reduced those differences by only 1.38% to 3.68%, and replies still showed accuracy and comprehension errors. No learners took part, only gender was tested, and the tone scorers disagreed in size, so the results are an early signal. Anyone using AI replies in a course should check tone and accuracy before relying on them.