-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalyze_transcripts.R
3496 lines (3170 loc) · 196 KB
/
analyze_transcripts.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#' ---
#' title: "AI Researcher Interview Analysis"
#' author: "Maheen Shermohammed & Vael Gates"
#' output:
#' html_document:
#' toc: true
#' toc_float: true
#' ---
#+ include = FALSE
knitr::opts_chunk$set(echo=FALSE, message = FALSE, warning=FALSE)
if (!require(ggplot2)) {install.packages("ggplot2"); require(ggplot2)}
if (!require(plotly)) {install.packages("plotly"); require(plotly)}
if (!require(reshape2)) {install.packages("reshape2"); require(reshape2)}
if (!require(knitr)) {install.packages("knitr"); require(knitr)}
if (!require(kableExtra)) {install.packages("kableExtra"); require(kableExtra)}
if (!require(gridExtra)) {install.packages("gridExtra"); require(gridExtra)}
if (!require(grid)) {install.packages("grid"); require(grid)}
if (!require(stringr)) {install.packages("stringr"); require(stringr)}
if (!require(ggcorrplot)) {install.packages("ggcorrplot"); require(ggcorrplot)}
if (!require(psych)) {install.packages("psych"); require(psych)}
# CHANGE THIS to the path of your directory that holds the scripts
# and all relevant data files.
mydir <- "~/Documents/AISFB/analysis/new/"
# mydir <- "~/quantanalysis_interviews_maheen/"
# CHANGE THIS to toggle between interactive (T) and static (F) graphs
interactive_mode <- TRUE
##### Functions ----
plot_data_column = function (data, col, startchr, type="wrap") {
category <- substr(question_key[col,"question"],startchr,nchar(question_key[col,"question"]))
names(data)[col] <- "response"
data$mytitle <- category
g <- ggplot(data, aes(x = response)) + geom_bar(stat = "count") +
labs(x = "") #+ facet_wrap(~mytitle)
if (type=="wrap") {
g <- g + facet_wrap(~mytitle)
} else {
mytitle <- paste(strwrap(category, 70), collapse = "\n")
g <- g + labs(x = "",title = mytitle)
}
g
}
#function for standard error of the mean
sem <- function(x){
sd(na.omit(x))/sqrt(length(na.omit(x)))
}
#function for standard error of a proportion
sep <- function(p,n) {
prop_mult <- p * (1 - p)
sqrt( prop_mult / n)
}
#function to pull out a subset of data whose column
#names start with a certain prefix
datawprefix <- function(data,prefix) {
newdat = data[names(data)[startsWith(names(data),prefix)]]
return(newdat)
}
#function to convert numbers to labels and then combine
#those labels across columns
combine_labels <- function(df,mysep="") {
for (colN in names(df)) {
df[,colN] <- ifelse(df[,colN] == 1, colN, "")
}
combined_label <- do.call(paste, c(df, sep=mysep))
combined_label[combined_label==""] <- "None/NA"
return(combined_label)
}
#more advanced version of combine labels
#function that handles separators better
combine_labels_adv <- function(df,mysep="",noneval="None/NA") {
for (colN in names(df)) {
df[,colN] <- ifelse(df[,colN] == 1, colN, "")
}
combined_label <- unlist(apply(df, 1, function(x) paste(x[x!=''], collapse=mysep)))
combined_label[combined_label==""] <- noneval
return(combined_label)
}
# make a bar plot of the various responses in a dataframe
resp_barplt_sums = function(df, ord="cnt") {
#for data that is ~one-hot encoded but non-exclusive (someone could be flagged for multiple columns)
df <- subset(df, rowSums(df)!=0)
counts <- colSums(df)
percentage <- round(counts/nrow(df)*100)
counts <- data.frame(response=names(df), percentage=percentage, count=counts, row.names=NULL)
if (sum(ord == "cnt")==1) {
counts$response <- reorder(factor(counts$response), -counts$percentage)
} else {
counts$response <- reorder(factor(counts$response), ord)
}
g <- ggplot(counts, aes(x = response, y = count, label=percentage)) +
geom_bar(stat = "identity") +
labs(x = "", y = "Count") +
theme(axis.text.x = element_text(angle = 50, hjust = 1))
g
}
# make a bar plot of the % of various responses in a dataframe
resp_barplt_sumsperc = function(df, ord="perc") {
#for data that is ~one-hot encoded but non-exclusive (someone could be flagged for multiple columns)
df <- subset(df, rowSums(df)!=0)
counts <- colSums(df)
percs <- round(counts/nrow(df)*100)
percs <- data.frame(response=names(percs), percentage=percs, count=counts, row.names=NULL)
if (sum(ord == "perc")==1) {
percs$response <- reorder(factor(percs$response), -percs$percentage)
} else {
percs$response <- reorder(factor(percs$response), ord)
}
g <- ggplot(percs, aes(x = response, y = percentage, label=count)) + geom_bar(stat = "identity") +
labs(x = "", y = "Percentage") +
theme(axis.text.x = element_text(angle = 50, hjust = 1))
g
}
# Make a new data frame of all columns starting with a prefix,
# then remove that prefix from the column names
df_from_prefix <- function(df,prefix) {
newdf <- datawprefix(df,prefix)
names(newdf) <- substring(names(newdf),nchar(prefix)+1)
return(newdf)
}
# Display a plotly histogram and basic stats for a numeric vector
display_numeric_stats <- function(vect,tit = deparse(substitute(vect)),binnum=0) {
cat(sprintf("mean: %s\nmedian: %s\nrange: %s - %s\n# with value of 0: %s",
mean(vect,na.rm = T),median(vect,na.rm = T),
min(vect,na.rm = T),max(vect,na.rm = T),
sum(vect==0,na.rm=T)))
if (interactive_mode) {
p <- plot_ly(x = vect, type = "histogram",
marker = list(line = list(color = 'rgb(8,48,107)',
width = 1.5)),
nbinsx = binnum) %>%
layout(title = 'Histogram', xaxis = list(title = tit),
yaxis = list(title = 'Frequency'))
return(p)
} else {
hist(vect,breaks=binnum,xlab = tit,main = "Histogram",
col = rgb(8,48,150,maxColorValue = 255),
xlim=c(min(vect,na.rm = T),max(vect,na.rm = T)))
}
}
# Function to calculate the mean and the standard deviation
# for each group
# data : a data frame
# varname : the name of a column containing the variable
#to be summariezed
# groupnames : vector of column names to be used as
# grouping variables
data_summary <- function(data, varname, groupnames){
require(plyr)
summary_func <- function(x, col){
c(mean = mean(x[[col]], na.rm=TRUE),
sd = sd(x[[col]], na.rm=TRUE),
sem = sem(x[[col]]),
total = length(x[[col]]))
}
data_sum<-ddply(data, groupnames, .fun=summary_func,
varname)
data_sum <- rename(data_sum, c("mean" = varname))
return(data_sum)
}
# Create a table that computes the counts for certain categories
# of a vector, grouped by the counts of a one-hot (ish) encoded
# data frame.
create_cross_table <- function(df,vect,grpname) {
dfXvect <- NULL
for (f in names(df)) {
myt <- table(data.frame(df[f],vect))
myt_in_grp <- myt["1",] #pick out the ppl in the given group (usually: field)
newdat <- data.frame(grp=f,as.list(myt_in_grp))
names(newdat)[names(newdat) == "grp"] <- grpname
dfXvect <- rbind(dfXvect,newdat)
}
return(dfXvect)
}
# Get proportions from a cross-table (created as above)
cross_tbl_proportions <- function(crosstbl,rm_col_list) {
if (any(is.na(rm_col_list))) {
crosstbl_prop <- crosstbl
} else {
crosstbl_prop <- crosstbl[,-which(names(crosstbl) %in% rm_col_list)]
}
crosstbl_prop$total <- rowSums(crosstbl_prop[-1])
colind <- ncol(crosstbl_prop)-1
crosstbl_prop[2:colind] <- crosstbl_prop[2:colind]/crosstbl_prop$total
for (c in names(crosstbl_prop[2:colind])) {
crosstbl_prop[,paste0("se_",c)] <- sep(crosstbl_prop[,c],crosstbl_prop$total)
}
crosstbl_prop[2:colind] <- round(crosstbl_prop[2:colind],2)
return(crosstbl_prop)
}
# Create a table that computes the mean / sem for certain categories
# of a vector, grouped by the counts of a one-hot (ish) encoded
# data frame.
create_cross_table_means <- function(df,vect,grpname) {
dfXvect <- NULL
for (f in names(df)) {
vect_in_grp <- vect[df[f]==1]
newdat <- data.frame(grp=f,mean=mean(vect_in_grp,na.rm = T),sem=sem(vect_in_grp))
names(newdat)[names(newdat) == "grp"] <- grpname
dfXvect <- rbind(dfXvect,newdat)
}
return(dfXvect)
}
# Only use ggplotly if interactive mode is on
ggplotly_toggle <- function(x) {
if (interactive_mode) {
return(ggplotly(x))
} else {
return(x+theme(plot.margin = margin(10,10,10,70)))
}
}
# Only use subplot (from plotly) if interactive mode is on
subplot_toggle <- function(x1,x2,mar=0.08,titY=T,maintitle="",ncl=2) {
if (interactive_mode) {
x2<-x2+labs(title = maintitle)
return(subplot(x1,x2, margin = mar, titleY = titY))
} else {
if (maintitle=="") {
return(grid.arrange(x1,x2,ncol=ncl))
} else {
return(grid.arrange(x1,x2,ncol=ncl,top=textGrob(maintitle)))
}
}
}
## $
#####
#import data
# manually edit this file to remove "extra_" and "extraN_" from some subids
rawdata <- read.csv(paste0(mydir,"MAXQDA2022 Code Matrix Browser CLEAN-TAG-NAMES(thatdontcorrespondwithMaxQDA)_edited.csv"),stringsAsFactors = FALSE)
table(unlist(lapply(rawdata, class))) # good, everything is numeric but subject ID
#binarize data
# Note: most non-zero values are 1's, but there are some others (we'll binarize going forward):
# table(rawdata[2:ncol(rawdata)][rawdata[2:ncol(rawdata)]>0])
## take all non-zero values and make them 1
rawdata[2:ncol(rawdata)][rawdata[2:ncol(rawdata)]>0] <- 1
#rename subject ID column
names(rawdata)[1] <- "subjID"
#create a subjID_init column to be able to combine w/ demographics later
rawdata$subjID_init <- substr(rawdata$subjID,1,5)
##### all internal reference link anchors (https://stackoverflow.com/questions/33913780/internal-links-in-rmarkdown-dont-work)
# <a href="#introduction">(Source)</a>
# <a href="#overview">(Source)</a>
# <a href="#findings-summary">(Source)</a>
# <a href="#tags">(Source)</a>
# <a href="#limitations">(Source)</a>
# <a href="#about-this-report">(Source)</a>
# <a href="#demographics-of-interviewees">(Source)</a>
# <a href="#basic-demographics">(Source)</a>
# <a href="#basic-demographics_gender">(Source)</a>
# <a href="#basic-demographics_age">(Source)</a>
# <a href="#basic-demographics_location">(Source)</a>
# <a href="#basic-demographics_location_country-of-origin">(Source)</a>
# <a href="#basic-demographics_location_current-country-of-work">(Source)</a>
# <a href="#what-area-of-ai">(Source)</a>
# <a href="#what-area-of-ai_field1">(Source)</a>
# <a href="#what-area-of-ai_field2">(Source)</a>
# <a href="#sector">(Source)</a>
# <a href="#status-experience">(Source)</a>
# <a href="#status-experience_h-index">(Source)</a>
# <a href="#status-experience_years-of-experience">(Source)</a>
# <a href="#status-experience_professional-rank">(Source)</a>
# <a href="#status-experience_institution-rank">(Source)</a>
# <a href="#status-experience_institution-rank_academia">(Source)</a>
# <a href="#status-experience_institution-rank_industry">(Source)</a>
# <a href="#preliminary-attitudes">(Source)</a>
# <a href="#what-motivates-you">(Source)</a>
# <a href="#benefits">(Source)</a>
# <a href="#risks">(Source)</a>
# <a href="#future">(Source)</a>
# <a href="#primary-questions-descriptives">(Source)</a>
# <a href="#when-will-we-get-agi">(Source)</a>
# <a href="#when-will-we-get-agi_field">(Source)</a>
# <a href="#when-will-we-get-agi_field_field1">(Source)</a>
# <a href="#when-will-we-get-agi_field_field2">(Source)</a>
# <a href="#when-will-we-get-agi_sector">(Source)</a>
# <a href="#when-will-we-get-agi_age">(Source)</a>
# <a href="#when-will-we-get-agi_h-index">(Source)</a>
# <a href="#alignment-problem">(Source)</a>
# <a href="#alignment-problem_field">(Source)</a>
# <a href="#alignment-problem_field_field1">(Source)</a>
# <a href="#alignment-problem_field_field2">(Source)</a>
# <a href="#alignment-problem_heard-of-ai-alignment">(Source)</a>
# <a href="#alignment-problem_heard-of-ai-safety">(Source)</a>
# <a href="#alignment-problem_when-will-we-get-agi">(Source)</a>
# <a href="#instrumental-incentives">(Source)</a>
# <a href="#instrumental-incentives_field">(Source)</a>
# <a href="#instrumental-incentives_field_field1">(Source)</a>
# <a href="#instrumental-incentives_field_field2">(Source)</a>
# <a href="#instrumental-incentives_heard-of-ai-alignment">(Source)</a>
# <a href="#instrumental-incentives_heard-of-ai-safety">(Source)</a>
# <a href="#instrumental-incentives_when-will-we-get-agi">(Source)</a>
# <a href="#merged-extended-discussion">(Source)</a>
# <a href="#alignment-instrumental-combined">(Source)</a>
# <a href="#alignment-instrumental-combined_field">(Source)</a>
# <a href="#alignment-instrumental-combined_field_field1">(Source)</a>
# <a href="#alignment-instrumental-combined_field_field2">(Source)</a>
# <a href="#alignment-instrumental-combined_heard-of-ai-alignment">(Source)</a>
# <a href="#alignment-instrumental-combined_heard-of-ai-safety">(Source)</a>
# <a href="#alignment-instrumental-combined_when-will-we-get-agi">(Source)</a>
# <a href="#alignment-instrumental-combined_sector">(Source)</a>
# <a href="#alignment-instrumental-combined_age">(Source)</a>
# <a href="#alignment-instrumental-combined_h-index">(Source)</a>
# <a href="#work-on-this">(Source)</a>
# <a href="#work-on-this_about-this-variable">(Source)</a>
# <a href="#work-on-this_field">(Source)</a>
# <a href="#work-on-this_field_field1">(Source)</a>
# <a href="#work-on-this_field_field2">(Source)</a>
# <a href="#work-on-this_heard-of-ai-alignment">(Source)</a>
# <a href="#work-on-this_heard-of-ai-safety">(Source)</a>
# <a href="#work-on-this_when-will-we-get-agi">(Source)</a>
# <a href="#work-on-this_alignment-problem">(Source)</a>
# <a href="#work-on-this_instrumental-incentives">(Source)</a>
# <a href="#work-on-this_sector">(Source)</a>
# <a href="#work-on-this_age">(Source)</a>
# <a href="#work-on-this_h-index">(Source)</a>
# <a href="#heard-of-ai-safety">(Source)</a>
# <a href="#heard-of-ai-safety_field">(Source)</a>
# <a href="#heard-of-ai-safety_field_field1">(Source)</a>
# <a href="#heard-of-ai-safety_field_field2">(Source)</a>
# <a href="#heard-of-ai-alignment">(Source)</a>
# <a href="#heard-of-ai-alignment_field">(Source)</a>
# <a href="#heard-of-ai-alignment_field_field1">(Source)</a>
# <a href="#heard-of-ai-alignment_field_field2">(Source)</a>
# <a href="#policy">(Source)</a>
# <a href="#policy_about-this-variable">(Source)</a>
# <a href="#public-media">(Source)</a>
# <a href="#public-media_about-this-variable">(Source)</a>
# <a href="#colleagues">(Source)</a>
# <a href="#colleagues_about-this-variable">(Source)</a>
# <a href="#did-you-change-your-mind">(Source)</a>
# <a href="#did-you-change-your-mind_about-this-variable">(Source)</a>
# <a href="#general">(Source)</a>
# <a href="#follow-up-questions">(Source)</a>
# <a href="#lasting-effects">(Source)</a>
# <a href="#lasting-effects_when-will-we-get-agi">(Source)</a>
# <a href="#lasting-effects_alignment-problem">(Source)</a>
# <a href="#lasting-effects_instrumental-incentives">(Source)</a>
# <a href="#lasting-effects_align-instrum-combo">(Source)</a>
# <a href="#lasting-effects_work-on-this">(Source)</a>
# <a href="#lasting-effects_did-you-change-your-mind">(Source)</a>
# <a href="#new-actions">(Source)</a>
# <a href="#new-actions_when-will-we-get-agi">(Source)</a>
# <a href="#new-actions_alignment-problem">(Source)</a>
# <a href="#new-actions_instrumental-incentives">(Source)</a>
# <a href="#new-actions_align-instrum-combo">(Source)</a>
# <a href="#new-actions_work-on-this">(Source)</a>
# <a href="#new-actions_did-you-change-your-mind">(Source)</a>
# <a href="#correlation-matrices">(Source)</a>
# <a href="#demographics-x-main-questions">(Source)</a>
# <a href="#demographics-x-main-questions_using-field1-labels">(Source)</a>
# <a href="#demographics-x-main-questions_using-field2-labels">(Source)</a>
# <a href="#main-questions-x-main-questions">(Source)</a>
##### Intro ----
#' # Introduction {#introduction}
#'
#' ### Overview {#overview}
#' The following is a quantitative analysis of 97 interviews conducted
#' in Feb-March 2022 with machine learning researchers, who were asked
#' about their perceptions of artificial intelligence (AI) now and in
#' the future, with particular focus on risks from advanced AI systems
#' (imprecisely labeled "AGI" for brevity in the rest of this document).
#' Of the interviewees, 92 were selected from NeurIPS or ICML 2021 submissions
#' and 5 were outside recommendations.
#' For each interviewee, a transcript was generated, and common responses were identified and tagged to support quantitative analysis.
#' The <a href="https://drive.google.com/drive/folders/1qNN6GpAl6a4KswxnJcdhN4fqnMQgZ9Vg">transcripts</a>,
#' as well as a qualitative
#' <a href="https://ai-risk-discussions.org/perspectives/introduction">walkthrough of the interviews</a>
#' are available at <a href="https://ai-risk-discussions.org/interviews">Interviews</a>.
#'
#' ### Findings Summary {#findings-summary}
#' Some key findings from our primary questions of interest (not discussing Demographics or "Split-By" subquestions):
#'
#' * Most participants (75%), at some point in the conversation, said that they thought humanity would achieve advanced AI (imprecisely labeled "AGI" for the rest of this summary) eventually, but their timelines to AGI varied <a href="#when-will-we-get-agi">(source)</a>. Within this group:
#' * 32% thought it would happen in 0-50 years
#' * 40% thought 50-200 years
#' * 18% thought 200+ years
#' * and 28% were quite uncertain, reporting a very wide range.
#' * (These sum to more than 100% because several people endorsed multiple timelines over the course of the conversation.)
#' * Among participants who thought humanity would never develop AGI (22%), the most commonly cited reason was that they couldn't see AGI happening based on current progress in AI. <a href="#when-will-we-get-agi">(Source)</a>
#' * Participants were pretty split on whether they thought the alignment problem argument was valid. Some common reasons for disagreement were <a href="#alignment-problem">(source)</a>:
#' 1. A set of responses that included the idea that AI alignment problems would be solved over the normal course of AI development (caveat: this was a very heterogeneous tag).
#' 2. Pointing out that humans have alignment problems too (so the potential risk of the AI alignment problem is capped in some sense by how bad alignment problems are for humans).
#' 3. AI systems will be tested (and humans will catch issues and implement safeguards before systems are rolled out in the real world).
#' 4. The objective function will not be designed in a way that causes the alignment problem / dangerous consequences of the alignment problem to arise.
#' 5. Perfect alignment is not needed.
#' * Participants were also pretty split on whether they thought the instrumental incentives argument was valid. The most common reasons for disagreement were that 1) the loss function of an AGI would not be designed such that instrumental incentives arise / pose a problem and 2) there would be oversight (by humans or other AI) to prevent this from happening. <a href="#instrumental-incentives">(Source)</a>
#' * Some participants brought up that they were more concerned about misuse of AI than AGI misalignment (n = 17), or that potential risk from AGI was less dangerous than other large-scale risks humanity faces (n = 11). <a href="#merged-extended-discussion">(Source)</a>
#' * Of the 55 participants who were asked / had a response to this question, some (n = 13) were potentially interested in working on AI alignment research. (<a href="#work-on-this_about-this-variable">Caveat for bias</a>: the interviewer was less likely to ask this question if the participant believed AGI would never happen and/or the alignment/instrumental arguments were invalid, so as to reduce participant frustration. This question also tended to be asked in later interviews rather than earlier interviews.) Of those participants potentially interested in working on AI alignment research, almost all reported that they would need to learn more about the problem and/or would need to have a more specific research question to work on or incentives to do so. Those who were not interested reported feeling like it was not their problem to address (they had other research priorities, interests, skills, and positions), that they would need examples of risks from alignment problems and/or instrumental incentives within current systems to be interested in this work, or that they felt like they were not at the forefront of such research so would not be a good fit. <a href="#work-on-this">(Source)</a>
#' * Most participants had heard of AI safety (76%) in some capacity <a href="#heard-of-ai-safety">(source)</a>; fewer had heard of AI alignment (41%) <a href="#heard-of-ai-alignment">(source)</a>.
#' * When participants were followed-up with ~5-6 months after the interview, 51% reported the interview had a lasting effect on their beliefs <a href="#lasting-effects">(source)</a>, and 15% reported the interview caused them to take new action(s) at work <a href="#new-actions">(source)</a>.
#' * Thinking the alignment problem argument was valid, or the instrumental incentives argument was valid, both tended to correlate with thinking AGI would happen at some point. The effect wasn't symmetric: if participants thought these arguments were valid, they were quite likely to believe AGI would happen; if participants thought AGI would happen, it was still more likely that they thought these arguments were valid but the effect was less strong. <a href="#main-questions-x-main-questions">(Source)</a>
#'
#' ### Tags {#tags}
#' The tags were developed arbitrarily, with the goal of describing common
#' themes in the data. These tags are succinct and not described in detail. Thus,
#' to <b>get a sense for what the tags mean, please search the tag name in the
#' <a href="https://docs.google.com/spreadsheets/d/1FlBcctFLWTYY3NiIklgcuQtVYxuU-plDmUeQjn-2Cfk/edit?usp=sharing">Tagged-Quotes</a>
#' document</b>,
#' which lists most of the tags used (column 1) and attached quotes (column 2).
#' (This document is also available in <a href="https://ai-risk-discussions.org/interviews">Interviews</a>.)
#'
#' Many of the tags are also rephrased
#' and included in the <a href="https://ai-risk-discussions.org/perspectives/introduction">walkthrough of the interviews</a>.
#'
#' ### Limitations {#limitations}
#' There are two large methodological weaknesses that
#' should be kept in mind when interpreting the results. First, not every
#' question was asked of every researcher. While some questions were just
#' added later in the interview process, some questions were intentionally
#' asked or avoided based on interviewer judgment of participant
#' interest; questions particularly susceptible to this have
#' an "About this variable" section below to describe the situation in
#' more detail.
#'
#' The second issue is with the tagging, which was somewhat
#' haphazard. One person (not the interviewer) did the majority of the
#' tagging, while another person (the interviewer) assisted and
#' occasionally made corrections. Tagging was not blinded, and
#' importantly, tags were not comprehensively double-checked by the
#' interviewer. If anyone reading this document wishes to do a more
#' systematic tagging of the raw data, we welcome this: much of the
#' raw data is available on this website for analysis, and we're happy
#' to be contacted for further advice.
#'
#' With these caveats in mind, we think there is much to be learned
#' from a quantitative analysis of these interviews and present the
#' full results below.
#'
#' ###### Note: All error bars represent standard error.
#'
#' ### About this Report {#about-this-report}
#' There are two versions of this report: one with interactive graphs,
#' and one with static graphs. To access all of the features of this
#' report, like hovering over graphs to see the number of participants
#' in each category, you need to be using the
#' <a href="https://ai-risk-discussions.org/analyze_transcripts">interactive version</a>.
#' However, the
#' <a href="https://ai-risk-discussions.org/analyze_transcripts_static">static version</a>
#' loads significantly faster in a browser.
#####
##### Demographics ----
#' # Demographics of Interviewees {#demographics-of-interviewees}
# Import demographics data
#note that I manually edited the spreadsheet to remove rows 88-89 and to remove text indicating that one of the h-index values is an outlier
demographics <- read.csv(paste0(mydir,"Demographics_full_edited.csv"),stringsAsFactors = FALSE)
# table(unlist(lapply(demographics, class))) # checking column data classes
#add variable indicating order that participants were interviewed
demographics$interview_order <- 1:nrow(demographics)
#rename subject ID column
names(demographics)[1] <- "subjID_init" #"init" because it's just initial 5 chrs of subj_ID
#clean up some other columns
names(demographics)[13] <- "industry_size"
demographics$h_index <- as.numeric(demographics$h_index)
#add demographic data to full data set for future analyses
rawdata <- merge(rawdata,demographics,by = "subjID_init")
rownames(rawdata) <- rawdata[,"subjID_init"]
#' ## Basic Demographics {#basic-demographics}
#' ### Gender {#basic-demographics_gender}
genders <- factor(demographics$Gender, labels = c("Female","Other","Male","Other"))
genders <- data.frame(table(genders))
genders$Perc <- round((genders$Freq / sum(genders$Freq))*100)
#+ results='asis'
print(kable_styling(kable(genders,format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' ### Age {#basic-demographics_age}
#' Proxy: Years from graduating undergrad + 22 years
rawdata$Age..graduation.year.from.undergrad. <- as.numeric(rawdata$Age..graduation.year.from.undergrad.)
age_proxy <- (2022 - rawdata$Age..graduation.year.from.undergrad.) + 22
#' Values present for `r sum(!is.na(age_proxy))`/97 participants.
display_numeric_stats(age_proxy,'Approximate Age',binnum = 20)
#' ### Location {#basic-demographics_location}
#' #### Country of origin {#basic-demographics_location_country-of-origin}
#' Proxy: Undergrad country (Any country with only 1 participant got re-coded as 'Other')
undergrad_country_simplified <- with(demographics, ave(Undergrad.country..is.a.guess.for.country.of.origin., Undergrad.country..is.a.guess.for.country.of.origin., FUN = function(i) replace(i, length(i) < 2, 'Other')))
#' Values present for `r sum(!is.na(undergrad_country_simplified))`/97 participants.
#+ results='asis'
print(kable_styling(kable(data.frame(table(undergrad_country_simplified)) %>%
arrange(desc(Freq)),format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' #### Current country of work {#basic-demographics_location_current-country-of-work}
#' (Any country with only 1 participant got re-coded as 'Other')
current_country_simplified <- with(demographics, ave(Current.country.of.work, Current.country.of.work, FUN = function(i) replace(i, length(i) < 2, 'Other')))
#' Values present for `r sum(!is.na(current_country_simplified))`/97 participants.
#+ results='asis'
print(kable_styling(kable(data.frame(table(current_country_simplified)) %>%
arrange(desc(Freq)),format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' ## What area of AI? {#what-area-of-ai}
#' Area of AI was evaluated in two ways. First, by asking the participant
#' directly in the interview (Field1) and second, by looking up participants'
#' websites and Google Scholar Interests (Field2).
#' A comparison of Field1 and
#' Field2 is located <a href="https://drive.google.com/file/d/1NQmMC8v_MxRreDomEDLD8_XkCDLOO1QJ/view?usp=sharing">here</a>.
#' The comparison isn't particularly close, so we usually include
#' comparisons using both Field1 and Field2. We tend to think the
#' Field2 labels (from Google Scholar and websites) are more accurate
#' than Field1, because the data was a little more regular and the tagger
#' was more experienced. We also tend to think Field2 has better
#' external validity: for both field1 and field2, we ran a correlation
#' between proportion of participants in that field who found the
#' alignment arguments valid and those who found the instrumental
#' arguments valid. This correlation was much higher for [field2](#field2corr) than
#' [field1](#field1corr). Given that we expect these two arguments are probing a
#' similar construct, the higher correlation suggests better
#' external validity for the field2 grouping.
#
#' ### Field 1 (from interview response) {#what-area-of-ai_field1}
#' "Can you tell me about what area of AI you work on, in a few sentences?"
mystring <- "Questions..areaAI.."
#' Values are present for `r sum(rawdata[substr(mystring,1,nchar(mystring)-1)])`/97 participants.
areaAIdata <- df_from_prefix(rawdata,mystring)
# Clean up areaAIdata by combining all cogsci & neuro into 1 category
areaAIdata$neurocogsci <- rowSums(areaAIdata[c("neurocogsci.cogsci","neurocogsci.neuro")])
areaAIdata[c("neurocogsci.cogsci","neurocogsci.neuro")] <- NULL
#' Note: "NLP" = natural language processing.
#' "RL" = reinforcement learning.
#' "vision" = computer vision.
#' "neurocogsci" = neuroscience or cognitive science.
#' "near-term AI safety" = AI safety generally and related areas (includes robustness, privacy, fairness).
#' "long-term AI safety" = AI alignment and/or AI safety oriented at advanced AI systems.
ggplotly_toggle(resp_barplt_sumsperc(areaAIdata))
#' ### Field 2 (from Google Scholar) {#what-area-of-ai_field2}
#' Note: "Near-term Safety and Related" included privacy,
#' robustness, adversarial learning, security, interpretability,
#' XAI, trustworthy AI, ethical AI, fairness, near-term AI safety,
#' and long-term AI safety.
#isolate & clean field2 data
mystring <- "Field2_"
field2_raw <- df_from_prefix(rawdata,mystring)
field2_raw[is.na(field2_raw)] <- 0
#' At least 1 field2 tag is present for `r sum(rowSums(field2_raw)!=0)`/97 participants.
# plot field2 data
ggplotly_toggle(resp_barplt_sumsperc(field2_raw))
#' ## Sector (Academia vs. Industry) {#sector}
sector <- data.frame(academia = as.numeric(rawdata$Academia!=""),
industry = as.numeric(rawdata$Industry!=""),
research_institute = as.numeric(rawdata$Research.Institute..not.academia.or.industry.!=""))
sector_combined <- combine_labels(sector)
sector_table <- data.frame(table(sector_combined))
sector_table$Perc <- round((sector_table$Freq / sum(sector_table$Freq))*100)
#+ results='asis'
print(kable_styling(kable(sector_table %>%
arrange(desc(Freq)),format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' ## Status / Experience {#status-experience}
#' ### h-index {#status-experience_h-index}
#' h-index values present for `r sum(!is.na(demographics$h_index))`/97 participants.
#'
#' Note people are in different fields (which tend to have different average h-index values)
boxplot(rawdata$h_index)
#' But one is a noticeable outlier (this person is not primariy in AI).
#' Distribution of the remaining values...
hind_sans_outlier <- rawdata$h_index
hind_sans_outlier[hind_sans_outlier==225] <- NA
display_numeric_stats(hind_sans_outlier,'h-index',binnum = 50)
#' ### Years of Experience {#status-experience_years-of-experience}
#' Proxy: years since they started their PhD. If someone hasn't
#' ever begun a PhD, they are excluded from this measure (i.e. marked as NA)
rawdata$Year.Started.PhD <- as.numeric(rawdata$Year.Started.PhD)
yrs_since_phd <- 2022 - rawdata$Year.Started.PhD
#' Values present for `r sum(!is.na(yrs_since_phd))`/97 participants.
display_numeric_stats(yrs_since_phd,'Years Since PhD',binnum = 20)
#' ### Professional Rank {#status-experience_professional-rank}
#' "Status" in Feb 2022
#'
#' (Any category with only 1 participant got re-coded as 'Other')
rank_simplified <- with(rawdata, ave(X.Status..in.Feb.2022, X.Status..in.Feb.2022, FUN = function(i) replace(i, length(i) < 2, 'Other')))
rank_simplified[rank_simplified=="PhD"] <- "PhD Student"
rank_simplified[rank_simplified=="Professor"] <- "Full Professor"
#+ results='asis'
print(kable_styling(kable(data.frame(table(rank_simplified)) %>%
arrange(desc(Freq)),format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' ### Institution Rank {#status-experience_institution-rank}
#'
#' Participants' institutions were determined from Google search. Universities
#' rank was determined by using the below websites (searched in fall 2022);
#' industry size was determined mostly by searching company size on LinkedIn/Google.
#'
#' #### Academia {#status-experience_institution-rank_academia}
rawdata$University.ranking.BY.CS <- as.numeric(rawdata$University.ranking.BY.CS)
rawdata$University.ranking.overall <- as.numeric(rawdata$University.ranking.overall)
#' **University Ranking in CS** (from [U.S. News & World Report](https://www.usnews.com/education/best-global-universities/computer-science) - lower number = better rank)
#' Values present for `r sum(!is.na(rawdata$University.ranking.BY.CS))`
#' /`r sum(sector$academia)` academics.
display_numeric_stats(rawdata$University.ranking.BY.CS,'Ranking by CS',binnum = 40)
#' **University Ranking Overall** (from [U.S. News & World Report](https://www.usnews.com/education/best-global-universities) - lower number = better rank)
#' Values present for `r sum(!is.na(rawdata$University.ranking.overall))`
#' / `r sum(sector$academia)` academics.
display_numeric_stats(rawdata$University.ranking.overall,'Ranking by CS',binnum = 60)
#' #### Industry {#status-experience_institution-rank_industry}
indust_size <- rawdata$industry_size
indust_size[indust_size==""] <- NA
indust_size <- factor(indust_size,
levels=c("under10_employees","10-100_employees","50-200_employees","200-500_employee_company","1k-10k_employees","10-50k_employees","50k+_employees","50k+_employees / under10_employees"))
#+ results='asis'
print(kable_styling(kable(data.frame(table(indust_size)),format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#####
##### Descriptives on preliminary attitudes ----
#' # Preliminary Attitudes {#preliminary-attitudes}
#' ## What motivates you? {#what-motivates-you}
#' "How did you come to work on this specific topic? What motivates you in your work (psychologically)?"
motivatedata <- df_from_prefix(rawdata,"Questions..motivateareaAI..")
#' `r sum(rowSums(motivatedata)!=0)`/97 participants had some kind of response.
#' This question was only included in earlier interviews (chronologically), before
#' being removed from the standard question list.
#' For example quotes, search the tag names in the
#' <a href="https://docs.google.com/spreadsheets/d/1FlBcctFLWTYY3NiIklgcuQtVYxuU-plDmUeQjn-2Cfk/edit?usp=sharing">Tagged-Quotes</a>
#' document</b>.
ggplotly_toggle(resp_barplt_sumsperc(motivatedata))
#' ## Benefits {#benefits}
#' "What are you most excited about in AI, and what are you most worried about? (What are the biggest benefits or risks of AI?)" ← benefits part
benefitsdata <- df_from_prefix(rawdata,"Questions..benefits..")
#' `r sum(rowSums(benefitsdata)!=0)`/97 participants had some kind of response.
#' For example quotes, search the tag names in the
#' <a href="https://docs.google.com/spreadsheets/d/1FlBcctFLWTYY3NiIklgcuQtVYxuU-plDmUeQjn-2Cfk/edit?usp=sharing">Tagged-Quotes</a>
#' document</b>.
ggplotly_toggle(resp_barplt_sumsperc(benefitsdata))
#' ## Risks {#risks}
#' "What are you most excited about in AI, and what are you most worried about? (What are the biggest benefits or risks of AI?)" ← risks part
risksdata <- df_from_prefix(rawdata,"Questions..risks..")
#' `r sum(rowSums(risksdata)!=0)`/97 participants had some kind of response.
#' For example quotes, search the tag names in the
#' <a href="https://docs.google.com/spreadsheets/d/1FlBcctFLWTYY3NiIklgcuQtVYxuU-plDmUeQjn-2Cfk/edit?usp=sharing">Tagged-Quotes</a>
#' document</b>.
ggplotly_toggle(resp_barplt_sumsperc(risksdata))
#' ## Future {#future}
#' "In at least 50 years, what does the world look like?"
futuredata <- df_from_prefix(rawdata,"Questions..future..")
#' `r sum(rowSums(futuredata)!=0)`/97 participants had some kind of response.
#' For example quotes, search the tag names in the
#' <a href="https://docs.google.com/spreadsheets/d/1FlBcctFLWTYY3NiIklgcuQtVYxuU-plDmUeQjn-2Cfk/edit?usp=sharing">Tagged-Quotes</a>
#' document</b>.
ggplotly_toggle(resp_barplt_sumsperc(futuredata))
#####
##### Descriptives on main questions ----
#' # Primary ?s - Descriptives {#primary-questions-descriptives}
#' ## When will we get AGI? {#when-will-we-get-agi}
#' <i> Note: "AGI" stands in for "advanced AI systems", and is used for brevity</i>
# "When do you think we'll get AGI / capable / generalizable AI / have the cognitive capacities to have a CEO AI if we do?"
#'
#' * Example dialogue: "All right, now I'm going to give a spiel. So, people talk about the promise of AI, which can mean many things, but one of them is getting very general capable systems, perhaps with the cognitive capabilities to replace all current human jobs so you could have a CEO AI or a scientist AI, etcetera. And I usually think about this in the frame of the 2012: we have the deep learning revolution, we've got AlexNet, GPUs. 10 years later, here we are, and we've got systems like GPT-3 which have kind of weirdly emergent capabilities. They can do some text generation and some language translation and some code and some math. And one could imagine that if we continue pouring in all the human investment that we're pouring into this like money, competition between nations, human talent, so much talent and training all the young people up, and if we continue to have algorithmic improvements at the rate we've seen and continue to have hardware improvements, so maybe we get optical computing or quantum computing, then one could imagine that eventually this scales to more of quite general systems, or maybe we hit a limit and we have to do a paradigm shift in order to get to the highly capable AI stage. Regardless of how we get there, my question is, do you think this will ever happen, and if so when?"
mystring <- "Questions..AGI.when.."
whenAGIdata <- df_from_prefix(rawdata,mystring)
#' `r sum(rowSums(whenAGIdata)!=0)`/97 participants had some kind of response.
#'
#' Some participants had both "will happen" and "won't happen" tags (e.g. because they changed their response during the conversation) and are labeled as "both".
#'
#' **Note: most of the graphs on this doc are not exclusive (same person can be represented in multiple bars), but the one below is. So each of the 97 participants is represented exactly once.**
# Clean the data (make sure any nested info propagates up accordingly)
## If people say it will happen for any reason, mark 1 for "willhappen"
whenAGIdata[rowSums(datawprefix(whenAGIdata,"willhappen"))!=0,"willhappen"] <- 1
## If people say it won't happen for any reason, mark 1 for "wonthappen"
whenAGIdata[rowSums(datawprefix(whenAGIdata,"wonthappen"))!=0,"wonthappen"] <- 1
# Graph opinions on whether AGI will happen
mytable <- whenAGIdata[c("willhappen","wonthappen")] %>% #see if people said it will, won't, both, or neither
combine_labels() %>%
table() %>%
as.data.frame(responseName = "total_participants")
levels(mytable[,1])[levels(mytable[,1])=="willhappenwonthappen"] <- "both"
g <- ggplot(mytable,aes(x=reorder(mytable[,1],-total_participants), y=total_participants)) +
geom_bar(position = "dodge", width = 0.6, stat="identity") +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "")
ggplotly_toggle(g)
#' `r sum(whenAGIdata$willhappen)` / `r nrow(whenAGIdata)`
#' (`r round((sum(whenAGIdata$willhappen)/nrow(whenAGIdata))*100)`%)
#' said at some point in the conversation that it will happen.
# which(combine_labels(whenAGIdata[c("willhappen","wonthappen")])=="None/NA" & (rowSums(whenAGIdata)!=0))
# Follow up on ppl who said it will happen
willhappendata <- subset(whenAGIdata,willhappen==1)
#' Among the `r nrow(willhappendata)` people who said at any point that it will happen...
willhappendata <- df_from_prefix(willhappendata,"willhappen.")
names(willhappendata) <- c("wide range","<50","50-200",">200")
ggplotly_toggle(resp_barplt_sumsperc(willhappendata,ord=c(4,1:3)) +
labs(x = "How many years will it take?",
title = "Note: participants could be tagged in multiple categories"))
# Follow up on ppl who said it won't happen
wonthappendata <- subset(whenAGIdata,wonthappen==1)
#' Among the `r nrow(wonthappendata)` people who said at any point that it won't happen...
wonthappendata <- df_from_prefix(wonthappendata,"wonthappen.")
ggplotly_toggle(resp_barplt_sumsperc(wonthappendata) +
labs(title = "Note: participants could be tagged in multiple categories"))
# Make a simplified version of the data w/ just the time horizons + "won't happen"
whenAGIdata_simp <- whenAGIdata[2:6]
names(whenAGIdata_simp) <- c(names(willhappendata),"wonthappen")
#' ### Split by Field {#when-will-we-get-agi_field}
#' Visualizing AGI time horizon broken down by field is tricky, because
#' participants could be tagged with multiple fields *and* with
#' multiple time horizons. So if, say, someone in the Vision field
#' was tagged with both '<50' and '50-200' time horizons, including
#' both tags on a bar plot would give the impression that there
#' were actually *two* people in Vision, one with each time horizon.
#' This would result in an over-representation of people who
#' had multiple tags (n = `r sum(table(rowSums(whenAGIdata_simp))[c("2","3")])`).
#' Thus, for only the cases where we are examining time-horizon
#' split by field, we simplified by assigning one time-horizon per
#' participant: if they ever endorsed 'wide range', they were assigned
#' 'wide range'; otherwise, they were assigned whichever of their
#' endorsed time horizons was the soonest.
whenAGIdata_simp_lowest <- c(rep("None/NA",nrow(whenAGIdata_simp)))
whenAGIdata_simp_lowest[whenAGIdata_simp$wonthappen==1] <- "wonthappen"
whenAGIdata_simp_lowest[whenAGIdata_simp$`>200`==1] <- ">200"
whenAGIdata_simp_lowest[whenAGIdata_simp$`50-200`==1] <- "50-200"
whenAGIdata_simp_lowest[whenAGIdata_simp$`<50`==1] <- "<50"
whenAGIdata_simp_lowest[whenAGIdata_simp$`wide range`==1] <- "wide range"
whenAGIdata_simp_lowest <- factor(whenAGIdata_simp_lowest,levels=c("None/NA","<50","50-200",">200","wide range","wonthappen"))
#' The simplification above results in the following breakdown:
table(whenAGIdata_simp_lowest)
#' An alternative solution for those with multiple time-horizon tags
#' would have been to assign each multi-tag case its own tag. We
#' chose not to do this for the following graphs, in part
#' because there would have been 15 timing tags, the breakdown
#' of which is represented in the table below.
whenAGIdata_simp_all <- data.frame(table(combine_labels_adv(whenAGIdata_simp," + ")))
#+ results='asis'
print(kable_styling(kable(whenAGIdata_simp_all %>% arrange(desc(Freq)),
format = 'html',escape=F),bootstrap_options = c("hover","striped")))
#' #### Field 1 (from interview response) {#when-will-we-get-agi_field_field1}
# Create data needed to plot both time-horizon and field
fieldXwhen <- create_cross_table(areaAIdata,whenAGIdata_simp_lowest,"field")
names(fieldXwhen)[-1] <- levels(whenAGIdata_simp_lowest)
fieldXwhen_long <- melt(fieldXwhen,id.vars="field",variable.name = "timing",value.name="total")
# Plot time horizon + field
g <- ggplot(fieldXwhen_long,aes(x=reorder(field,-total), y=total, fill=timing)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x="Field1",title = "Note: participants could be tagged in multiple categories")
ggplotly_toggle(g)
fieldXwhen_prop <- cross_tbl_proportions(fieldXwhen,"None/NA")
#' The graph below shows the proportion of people (among those who
#' had answers, so removing the "None.NA" responses from above) with
#' each answer type within each field. So, for all the people in the
#' '`r fieldXwhen_prop[1,1]`' category for whom we have an answer
#' for the when-AGI question (which is `r fieldXwhen_prop[1,"total"]`
#' total participants), `r fieldXwhen_prop[1,"<50"]*100`% of
#' them said '<50'.
#' If you are using the <a href="https://ai-risk-discussions.org/analyze_transcripts">interactive version</a> (rather than the <a href="https://ai-risk-discussions.org/analyze_transcripts_static">static version</a>) of this report, hover over a bar to see the total
#' participants in that category.
g1 <- ggplot(fieldXwhen_prop, aes(x = reorder(field,-`<50`), y=`<50`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`<50`-`se_<50`, ymax=`<50`+`se_<50`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field", y = "Proportion Tagged <50")
g2 <- ggplot(fieldXwhen_prop, aes(x = reorder(field,-`50-200`), y=`50-200`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`50-200`-`se_50-200`, ymax=`50-200`+`se_50-200`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field", y = "Proportion Tagged 50-200")
g3 <- ggplot(fieldXwhen_prop, aes(x = reorder(field,-`>200`), y=`>200`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`>200`-`se_>200`, ymax=`>200`+`se_>200`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field", y = "Proportion Tagged >200")
g4 <- ggplot(fieldXwhen_prop, aes(x = reorder(field,-`wide range`), y=`wide range`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`wide range`-`se_wide range`, ymax=`wide range`+`se_wide range`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field", y = "Proportion Tagged wide range")
g5 <- ggplot(fieldXwhen_prop, aes(x = reorder(field,-`wonthappen`), y=`wonthappen`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`wonthappen`-`se_wonthappen`, ymax=`wonthappen`+`se_wonthappen`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field", y = "Proportion Tagged wonthappen")
#+ fig.height=14
if (interactive_mode) {
subplot(g1,g2,g3,g4,g5+labs(title="Note: participants could be tagged in multiple categories"),
margin = 0.08, titleY = T, nrows=3)
}
if (!interactive_mode) {
grid.arrange(g1,g2,g3,g4,g5,ncol=2,top=textGrob("Note: participants could be tagged in multiple categories"))
}
#' Observation/summary: No one in NLP/translation,
#' near-term safety, or interpretablity/exlainability endorsed
#' a <50 year time horizon. Meanwhile, no one in long-term AI
#' safety, neuro/cognitive science, and robotics just said AGI won't happen.
#' People in theory were somewhat more likely to give a wide range.
#
#' #### Field 2 (from Google Scholar) {#when-will-we-get-agi_field_field2}
# Create data needed to plot both time-horizon and field2
field2Xwhen <- create_cross_table(field2_raw,whenAGIdata_simp_lowest,"field2")
names(field2Xwhen)[-1] <- levels(whenAGIdata_simp_lowest)
field2Xwhen_long <- melt(field2Xwhen,id.vars="field2",variable.name = "timing",value.name="total")
# Plot time horizon + field2
g <- ggplot(field2Xwhen_long,aes(x=reorder(field2,-total), y=total, fill=timing)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x="Field2",title = "Note: participants could be tagged in multiple categories")
ggplotly_toggle(g)
field2Xwhen_prop <- cross_tbl_proportions(field2Xwhen,"None/NA")
#' The graph below shows the proportion of people (among those who
#' had answers, so removing the "None.NA" responses from above) with
#' each answer type within each field. So, for all the people in the
#' '`r field2Xwhen_prop[1,1]`' category for whom we have an answer
#' for the when-AGI question (which is `r field2Xwhen_prop[1,"total"]`
#' total participants), `r field2Xwhen_prop[1,"<50"]*100`% of
#' them said '<50'. If you are using the <a href="https://ai-risk-discussions.org/analyze_transcripts">interactive version</a> (rather than the <a href="https://ai-risk-discussions.org/analyze_transcripts_static">static version</a>) of this report, hover over a bar to see the total
#' participants in that category.
g1 <- ggplot(field2Xwhen_prop, aes(x = reorder(field2,-`<50`), y=`<50`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`<50`-`se_<50`, ymax=`<50`+`se_<50`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field2", y = "Proportion Tagged <50")
g2 <- ggplot(field2Xwhen_prop, aes(x = reorder(field2,-`50-200`), y=`50-200`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`50-200`-`se_50-200`, ymax=`50-200`+`se_50-200`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field2", y = "Proportion Tagged 50-200")
g3 <- ggplot(field2Xwhen_prop, aes(x = reorder(field2,-`>200`), y=`>200`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`>200`-`se_>200`, ymax=`>200`+`se_>200`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field2", y = "Proportion Tagged >200")
g4 <- ggplot(field2Xwhen_prop, aes(x = reorder(field2,-`wide range`), y=`wide range`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`wide range`-`se_wide range`, ymax=`wide range`+`se_wide range`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field2", y = "Proportion Tagged wide range")
g5 <- ggplot(field2Xwhen_prop, aes(x = reorder(field2,-`wonthappen`), y=`wonthappen`, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=`wonthappen`-`se_wonthappen`, ymax=`wonthappen`+`se_wonthappen`),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "Field2", y = "Proportion Tagged wonthappen")
#+ fig.height=14
if (interactive_mode) {
subplot(g1,g2,g3,g4,g5+labs(title="Note: participants could be tagged in multiple categories"),
margin = 0.08, titleY = T, nrows=3)
}
if (!interactive_mode) {
grid.arrange(g1,g2,g3,g4,g5,ncol=2,top=textGrob("Note: participants could be tagged in multiple categories"))
}
#' Observation/summary: No one in NLP or Optimization endorsed
#' a <50 year time horizon. Meanwhile, no one in Applications/Data
#' Analysis or Inference just said AGI won't happen.
#' People in vision were somewhat more likely to say that AGI wouldn't happen.
#
#' ### Split by Sector {#when-will-we-get-agi_sector}
# Create data needed to plot both sector and when-AGI
sector_combined_pretty <- str_replace_all(sector_combined, c("academiaindustry" = "academia_and_industry"))
whenXsector <- create_cross_table(whenAGIdata_simp,sector_combined,"timing")
whenXsector$timing <- factor(whenXsector$timing,levels=c("<50","50-200",">200","wide range","wonthappen"))
whenXsector_long <- melt(whenXsector,id.vars="timing",variable.name = "sector",value.name="total")
# whenXsector_long$sector <- factor(whenXsector_long$sector,levels=c("None.NA","invalid","valid"))
# Plot sector + when-AGI
g <- ggplot(whenXsector_long,aes(x=timing, y=total, fill=sector)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 50, hjust = 1))
ggplotly_toggle(g)
whenXsector_nonexclusive <- subset(whenXsector,select=-academiaindustry)
whenXsector_nonexclusive$academia <- whenXsector$academia + whenXsector$academiaindustry
whenXsector_nonexclusive$industry <- whenXsector$industry + whenXsector$academiaindustry
whenXsector_prop <- cross_tbl_proportions(whenXsector_nonexclusive,"research_institute")
#' The proportions below exclude people in research institutes.
#' So, for all the people in the '`r whenXsector_prop[1,1]`'
#' category (N=`r whenXsector_prop[1,"total"]`),
#' `r whenXsector_prop[1,"academia"]*100`% of them are in academia
#' and `r whenXsector_prop[1,"industry"]*100`% of them are in industry. People in both sectors get counted for both (so if everyone in a category were in both sectors, it would show 100% academia and 100% industry)
#' If you are using the <a href="https://ai-risk-discussions.org/analyze_transcripts">interactive version</a> (rather than the <a href="https://ai-risk-discussions.org/analyze_transcripts_static">static version</a>) of this report, hover over a bar to see the total participants in that category.
g1 <- ggplot(whenXsector_prop, aes(x = timing, y=academia, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=academia-se_academia, ymax=academia+se_academia),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "", y = "Proportion in Academia")
g2 <- ggplot(whenXsector_prop, aes(x = timing, y=industry, label=total)) +
geom_bar(position="dodge", stat = "identity") +
geom_errorbar(aes(ymin=industry-se_industry, ymax=industry+se_industry),
width=.2, position=position_dodge(.9)) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(x = "", y = "Proportion in Industry")
subplot_toggle(g1,g2)
#' Observation: Very roughly/noisily: as timelines get higher, a
#' larger proportion of the participants fall in academia and a
#' smaller proportion fall into industry... except for 'won't happen'.
#
#' ### Split by Age {#when-will-we-get-agi_age}
#' Remember, age was *estimated* based on college graduation year
# Plot align-instrum + age
whenXage <- create_cross_table_means(whenAGIdata_simp,age_proxy,"timing")
whenXage$timing <- factor(whenXage$timing,levels=c("<50","50-200",">200","wide range","wonthappen"))
g <- ggplot(whenXage,aes(x=timing, y=mean)) +
geom_bar(stat = "identity") +
geom_errorbar(aes(ymin=mean-sem, ymax=mean+sem),width=.2) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(y="age_proxy")
ggplotly_toggle(g)
#' Observation: Not much going on here.
#
#' ### Split by h-index {#when-will-we-get-agi_h-index}
#' For the graphs below, the interviewee with the outlier h-index value (>200) was removed.
# Plot align-instrum + h-index
whenXhindex <- create_cross_table_means(whenAGIdata_simp,hind_sans_outlier,"timing")
whenXhindex$timing <- factor(whenXhindex$timing,levels=c("<50","50-200",">200","wide range","wonthappen"))
g <- ggplot(whenXhindex,aes(x=timing, y=mean)) +
geom_bar(stat = "identity") +
geom_errorbar(aes(ymin=mean-sem, ymax=mean+sem),width=.2) +
theme(axis.text.x = element_text(angle = 50, hjust = 1)) +
labs(y="hindex")
ggplotly_toggle(g)
#' Observation: People with closer time horizons seem to have
#' higher h-indices.
#
#' ## Alignment Problem {#alignment-problem}