Replication of Study 2 from Human heuristics for AI-generated language are flawed (PNAS) by Jakesch et al. 2023
Author
Cid Decatur (cdecatur@stanford.edu)
Published
December 9, 2023
Introduction
Generative language models mediate communicative processes with humans and the psychological mechanisms of AI-mediated communication (AI-MC). People use AI to autocomplete or craft entire messages for their digitally communicative practices. My research program revolves around understanding how humans construct the identity of themselves and others with media (AI is of growing interest). As identity becomes psychologically salient while crafting a message online, we know communicators are likelier to bend or break the truth about themselves. AI plagiarism of a dating profile bio is unique in that the content of the message may be factually correct, yet the credit for compositional skill and cues given off from the AI-generated bio take advantage of pretenses. This study will verify the accuracy with which message receivers can identify AI-plagiarized biographies. Attempting to replicate this study will bring me up to speed on managing the analytic chain of research and allow me to get my hands dirty with collecting and analyzing crowd worker data for the first time. The methods of analysis and statistics computed for the study are also challenging to me but not outside of my potential capability for the next eight weeks.
Justification
The most interesting portion of the original paper’s findings is the “truth default” finding replicated in the context of A.I. In this experiemnt, they saw that participants defaulted to thinking the text was human-written even when they were alerted to the possibility that this wasn’t the case.
The most interesting part of this replication will be the finding around whether participants select true or false more often.
Stimuli and Procedure
The stimuli for this project are not publically available but are retrievable from my advisor and co-author on the original project, Jeffrey Hancock. The project has a repository with all data and procedures available on OSF. The supplemental materials that describe data-collection procedures for the six studies in the original paper are in this directory.
The procedure for this experiment is relatively straightforward, using the AI-generated messages provided by the original authors. If training and scraping a new set of stimuli becomes more appropriate, this would be outside of my current skillset but would be possible if I wanted to take the paper to publication. The original study recruited 1,000 gender-balanced participants on Prolific and sampled from 1,000 user-generated dating bios and 1,000 AI-generated dating bios. They then briefed the participants on their task to identify the bios generated by AI, which they completed in a digital format.
Regarding challenges, I’ve never run an experiment by myself from start to finish, nor have I been the sole analyst on a dataset. Conducting the statistical analysis, managing the analytic pipeline, and keeping data organized by myself without the help of others will be enough of a challenge for me. If I’m completing the project with too much ease, I’ll find ways to produce a more complete and challenging procedure.
Materials and Methods From Jakesch 2023 “Experiment Design. The six experiments combined elements of a simplified Turing test (21) with a data labeling task. After providing informed consent, participants were introduced to the hospitality, dating, or professional scenario. They were told that they were browsing an online platform where some users had written their self-presentations while an AI system generated other self-presentations. Participants completed two comprehension checks and rated 16 self-presentations, half generated by a state-of-the-art AI language model. They were asked to evaluate whether each self-presentation was generated by AI on a five-point Likert scale from “definitely AI-generated” to “definitely human-written.” Mirroring truth default behaviors observed in deception research (34), participants marked the self-presentations as “likely human-written” or “definitely human-written” in 53.8% of cases. In the remaining 46.2% of cases, they showed suspicion and selected either “not sure,” “likely AI-generated,” or “definitely AI-generated.” To allow for concise analysis, we used these two roughly balanced groups to create a binary signal corresponding to participants’ suspicion that a self-presentation may not be human-written. A robustness check using the full scale as the primary outcome metric showed similar results. Halfway through the rating task, participants in the three main experiments were asked to explain their judgment in an open-ended response. Asking participants to explain their reasoning did not change the accuracy of their subsequent ratings (see SI Appendix for details). Following the rating task, participants provided demographic information and indicated their experience with computer programming and AI technologies. Participants were debriefed about their performance and the purpose of the study. The Cornell University Institutional Review Board approved the study protocols. We preregistered the final two validation experiments prior to data collection (https://aspredicted.org/bz7x7.pdf). We performed the experiments in three social contexts to increase robustness and generalizability. In addition, minor variations across experiments explored auxiliary hypotheses. We used longer self-presentations in the dating and professional-context experiments to test whether the length of self-presentations limited participants’ accuracy. To keep the three main experiments’ duration comparable, we reduced the number of rated self-presentations to 12 in these two experiments. To explore the effect of increased effort (23), we offered half of the participants in the dating context a bonus payment if they rated at least 75% of the self-presentations correctly. There was no difference in performance between the bonus and no-bonus groups. Finally, to test whether participants could learn to detect generated self-presentations if they received feedback (18), half of the participants in the professional context were told whether their choice was correct after every rating, again with no difference in outcomes. An overview of the experimental designs is included in SI Appendix.”
Modifications
The authors note that they used 2,000 participants for the original experiment with the hospitality context. They note that a sample size of 1,000 is good enough for replication at end of PNAS report.
Each participant reads 12 self-descriptions, half AI-generated, and half-human-written, sampled from an anonymized set of profile bios and paired.
Will not include the incentivization procedure
Power Analysis
Given there is no reported effect size, this will require a different estimate of effect. The authors don’t actuall report which analyses they conducted to statistically compare means in different experimental conditions.
Planned Sample
According to the paper, we’re aiming for close to 1,000 participants.
Materials
The stimuli for all three contexts have been retrieved from the authors. There are thousands of profiles, 50% AI-generated and 50% human written. I will use embedded data in qualtrics to create a survey that with a significant subset of the data as input of all 2,000 stimuli per context will take an estimated 15 hours of work to complete in of itself.
Procedure
Participants will be presented with one of three AI-detection scenarios (dating, business, hospitality). They will then be asked to review the anonymized bios and make a judgement as to whether the bio is generated by a human or an AI. This will be repeated for 12 trials with each participant, with 6 of the profiles generated by humans and 6 generated by chatGPT.
For replication
Analysis Plan
Can also quote directly, though it is less often spelled out effectively for an analysis strategy section. The key is to report an analysis strategy that is as close to the original - data cleaning rules, data exclusion rules, covariates, etc. - as possible.
Key analysis: two-tailed, two-sample t(z)-test. (Potential Chi-squqred test of distrobutions)
The means of accuracy scores and distributions between human/ai factor levels will be analyzed.
With accuracy data collected through Prolific/Qualtrics:
Run python script to anonymize data stimuli and data
Filter for each scenario’s human-generated, ai-generated response ratings.
Run two-sample, two-tailed t(z?, chi-sq homogeneity?)-tests for each accuracy type and each treatment.
Data cleaning rules: this should be straightforward. This should be analyzed with TaT. It’s likely that all participants that start the study will finish it. No identifying data is required.
Differences from Original Study
The main differences to the original study are that there will be a smalller sample size of particiapnts (reccommended by original authors). Additionally, the stimuli will be subsetted such that there won’t be thousands of possible profiles to pull from. Finally, I will be testing only one of the contexts mentioned in the original paper.
Methods Addendum (Post Data Collection)
You can comment this section out prior to final report with data collection.
Actual Sample
Sample size, demographics, data exclusions based on rules spelled out in analysis plan
Differences from pre-data collection methods plan
Any differences from what was described as the original plan, or “none”.
Results
Data preparation
Data preparation following the analysis plan.
Below is for the pilot data collection
Load Libraries
Import Data >Please note: I implemented the AI_QX_ID col to capture stimuli IDs after running the 3 participants for pilot b, hence NAs. Additionally, Ive re-runthe analyses with pilot_b put in a variable called pilota so I don’t have to recode the whole thing.
#putting pilot b data in the pilota variable for ease of run.pilota <-read.csv("pilotb_data.csv")
Warning in read.table(file = file, header = header, sep = sep, quote = quote, :
incomplete final line found by readTableHeader on 'pilotb_data.csv'
head(pilota)
Informed.Consent. AI_Q1 AI_Q1_ID AI_Q2 AI_Q2_ID AI_Q3 AI_Q3_ID AI_Q4 AI_Q4_ID
1 4 2 NA 1 NA 2 NA 1 NA
2 4 2 NA 2 NA 2 NA 2 NA
3 4 1 NA 2 NA 1 NA 1 NA
AI_Q5 AI_Q5_ID AI_Q6 AI_Q6_ID HU_Q1 HU_Q1_ID HU_Q2 HU_Q2_ID HU_Q3 HU_Q3_ID
1 2 NA 2 NA 1 NA 1 NA 4 NA
2 2 NA 1 NA 2 NA 2 NA 4 NA
3 1 NA 2 NA 2 NA 2 NA 4 NA
HU_Q4 HU_Q4_ID HU_Q5 HU_Q5_ID HU_Q6 HU_Q6_ID PROLIFIC_PID
1 1 NA 1 NA 1 NA 5f5ce2af3329104f89c492a9
2 2 NA 2 NA 2 NA 63d7dde96fa9a6315a382aed
3 2 NA 2 NA 2 NA 5fc3e64a30dfe729ed0f5224
SESSION_ID STUDY_ID
1 657004eb6b87c2ed61a6a646 656d34064a6b0986237291e6
2 657004ff8aae019b0f0a51e5 656d34064a6b0986237291e6
3 6570053427b3159f87283601 656d34064a6b0986237291e6
Data Exclusion/Wrangling
##Filtering cols that don't have data#pilota<- pilota %>% select(AI_Q1:HU_Q6)#pilota <- pilota[!apply(pilota == "", 1, all),] #some rows don't have complete data (these were me testing survey)#pilota <- pilota %>% filter(row_number() !=6)#pilota <- pilota %>% filter(row_number() !=c(1,2))#head(pilota)
Data Tidying
#Need to convert data from raw responses to accuracy (0/1 binary variable)#AI colspilota$AI_Q1 <-ifelse(pilota$AI_Q1 ==2, 0, pilota$AI_Q1)pilota$AI_Q2 <-ifelse(pilota$AI_Q2 ==2, 0, pilota$AI_Q2)pilota$AI_Q3 <-ifelse(pilota$AI_Q3 ==1, 0, ifelse(pilota$AI_Q3 ==2, 1, pilota$AI_Q3))pilota$AI_Q4 <-ifelse(pilota$AI_Q4 ==2, 0, pilota$AI_Q4)pilota$AI_Q5 <-ifelse(pilota$AI_Q5 ==1, 0, ifelse(pilota$AI_Q5 ==2, 1, pilota$AI_Q5))pilota$AI_Q6 <-ifelse(pilota$AI_Q6 ==1, 0, ifelse(pilota$AI_Q6 ==2, 1, pilota$AI_Q6))#Human cols pilota$HU_Q1 <-ifelse(pilota$HU_Q1 ==2, 0, pilota$HU_Q1)pilota$HU_Q2 <-ifelse(pilota$HU_Q2 ==2, 0, pilota$HU_Q2)##NOTE: Weird qualtrics coding had AI selection as fourpilota$HU_Q3 <-ifelse(pilota$HU_Q3 ==4, 0, pilota$HU_Q3)pilota$HU_Q4 <-ifelse(pilota$HU_Q4 ==1, 0, ifelse(pilota$HU_Q4 ==2, 1, pilota$HU_Q4))pilota$HU_Q5 <-ifelse(pilota$HU_Q5 ==1, 0, ifelse(pilota$HU_Q5 ==2, 1, pilota$HU_Q5))pilota$HU_Q6 <-ifelse(pilota$HU_Q6 ==1, 0, ifelse(pilota$HU_Q6 ==2, 1, pilota$HU_Q6))#Now, we wrangle#make df with only ai_qs in long form ai_cols <-grep("^AI_Q[1-6]$", names(pilota), value =TRUE)pilota_ai <- pilota %>%select(all_of(ai_cols)) %>%pivot_longer(cols =all_of(ai_cols), names_to ="AI_Q", values_to ="AI_acc")#make df with only hu_qs in long form hu_cols <-grep("^HU_Q[1-6]$", names(pilota), value =TRUE)pilota_hu <- pilota %>%select(all_of(hu_cols)) %>%pivot_longer(cols =all_of(hu_cols), names_to ="HU_Q", values_to ="HU_acc")# make a row for participant numbers (6 obs/participant)participants <-data.frame(Participant =rep(1:nrow(pilota), each =6))#Combine AI, HU, and participant data framespilota_long <-cbind(participants, pilota_ai, pilota_hu)head(pilota_long)
#for some reason, the accuracy data is being stored as a factor so I changed it to numeric pilota_long$AI_acc <-as.numeric(pilota_long$AI_acc)pilota_long$HU_acc <-as.numeric(pilota_long$HU_acc)mean_accuracy <- pilota_long %>%summarize(Mean_AI_acc =mean(AI_acc), Mean_HU_acc =mean(HU_acc))# Gather the data into long format for plottingmean_accuracy_long <- mean_accuracy %>%gather(key ="Condition", value ="Mean_Accuracy", Mean_AI_acc, Mean_HU_acc)# Create a bar plot with error barsggplot(mean_accuracy_long, aes(x = Condition, y = Mean_Accuracy, fill = Condition)) +geom_bar(stat ="identity", position =position_dodge(width =0.8), width =0.7) +geom_errorbar(aes(ymin = Mean_Accuracy -sd(Mean_Accuracy) /sqrt(length(Mean_Accuracy)), ymax = Mean_Accuracy +sd(Mean_Accuracy) /sqrt(length(Mean_Accuracy))), position =position_dodge(width =0.8), width =0.25) +labs(x ="Condition", y ="Mean Accuracy") +theme_minimal() +geom_text(aes(label =round(Mean_Accuracy, 2), x = Condition), position =position_dodge(width =0.8), vjust =-0.5, hjust =2)
Analysis
##Start here only with long form data with condition cols and _accs
# Calculate overall accuracy for both AI and HU conditions (compare raw means)overall_accuracy <-mean(c(pilota_long$AI_acc, pilota_long$HU_acc))# Print the overall accuracyprint(overall_accuracy)
#Binomial Test# Observed accuracyobserved_accuracy <-mean(c(pilota_long$AI_acc, pilota_long$HU_acc))# Expected (chance) accuracychance_accuracy <-0.5# Perform a one-sample binomial testbinomial_test <-binom.test(sum(c(pilota_long$AI_acc, pilota_long$HU_acc)), length(c(pilota_long$AI_acc, pilota_long$HU_acc)), p = chance_accuracy, alternative ="two.sided")# Print the results of the binomial testprint(binomial_test)
Exact binomial test
data: sum(c(pilota_long$AI_acc, pilota_long$HU_acc)) and length(c(pilota_long$AI_acc, pilota_long$HU_acc))
number of successes = 18, number of trials = 36, p-value = 1
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.3292218 0.6707782
sample estimates:
probability of success
0.5
##Start here only with pilot a with AI_Qs and HU_Qs coded for 0-1 acc.
pilota_lr <- pilota %>%pivot_longer(cols =starts_with("AI_Q") |starts_with("HU_Q"),names_to ="Question",values_to ="Accuracy")# Create a binary 'Condition' variable (0 for AI, 1 for HU)pilota_lr$Condition <-ifelse(grepl("^AI_", pilota_lr$Question), 0, 1)# Create a unique participant identifier columnpilota_lr$Participant <-rep(1:(nrow(pilota_lr)/12), each =12)# Add 'Participant' as a factor variablepilota_lr$Participant <-as.factor(pilota_lr$Participant)# Convert 'Accuracy' to a numeric variable if it's not alreadypilota_lr$Accuracy <-as.numeric(pilota_lr$Accuracy)# Fit a logistic regression model controlling for nested observationslogistic_model <-glmer(Accuracy ~ Condition + (1| Participant), data = pilota_lr, family = binomial)
boundary (singular) fit: see help('isSingular')
# Summary of the logistic regression modelsummary(logistic_model)
Generalized linear mixed model fit by maximum likelihood (Laplace
Approximation) [glmerMod]
Family: binomial ( logit )
Formula: Accuracy ~ Condition + (1 | Participant)
Data: pilota_lr
AIC BIC logLik deviance df.resid
55.5 60.2 -24.7 49.5 33
Scaled residuals:
Min 1Q Median 3Q Max
-1.1180 -0.8944 0.0000 0.8944 1.1180
Random effects:
Groups Name Variance Std.Dev.
Participant (Intercept) 3.195e-16 1.787e-08
Number of obs: 36, groups: Participant, 6
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.2231 0.4743 0.470 0.638
Condition -0.4463 0.6708 -0.665 0.506
Correlation of Fixed Effects:
(Intr)
Condition -0.707
optimizer (Nelder_Mead) convergence code: 0 (OK)
boundary (singular) fit: see help('isSingular')
Doing a t-test comparison
#for pilot b need to grepl out Q_ID rows so we can group_by: pilota_lr <- pilota_lr[!grepl("_ID", pilota_lr$Question), ]#then get individual avgs individual_avg <- pilota_lr %>%group_by(Participant, Condition) %>%summarize(Avg_Accuracy =mean(Accuracy))
`summarise()` has grouped output by 'Participant'. You can override using the
`.groups` argument.
t_test_result <-t.test(Avg_Accuracy ~ Condition, data = individual_avg)# Display the t-test resultt_test_result
Welch Two Sample t-test
data: Avg_Accuracy by Condition
t = 0.70711, df = 2.56, p-value = 0.5384
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
-0.4412838 0.6635060
sample estimates:
mean in group 0 mean in group 1
0.5555556 0.4444444
Confirmatory analysis
The analyses as specified in the analysis plan.
Side-by-side graph with original graph is ideal here
### Exploratory analyses
Any follow-up analyses desired (not required).
Discussion
Summary of Replication Attempt
Open the discussion section with a paragraph summarizing the primary result from the confirmatory analysis and the assessment of whether it replicated, partially replicated, or failed to replicate the original result.
Commentary
Add open-ended commentary (if any) reflecting (a) insights from follow-up exploratory analysis, (b) assessment of the meaning of the replication (or not) - e.g., for a failure to replicate, are the differences between original and present study ones that definitely, plausibly, or are unlikely to have been moderators of the result, and (c) discussion of any objections or challenges raised by the current and original authors about the replication attempt. None of these need to be long.