<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>The moral machine experiment on large language models</title>
        <author>Kazuhiro Takemoto</author>
      </titleStmt>
      <publicationStmt>
        <p>Tag layer of the DHSS Meta-Tagging Project. The article text is reproduced from the
           staged copy named in sourceDesc and is not altered; the tags are held separately in
           standOff so that overlapping and nested spans are preserved.</p>
      </publicationStmt>
      <sourceDesc>
        <bibl>
          <title>The moral machine experiment on large language models</title>
          <date>2024</date>
          <publisher>Royal Society Open Science</publisher>
          <idno type="DOI">10.1098/rsos.231393</idno>
          
          <idno type="record">takemoto2024-moral-machine-large-language-models</idno>
          <note type="staged-file">takemoto2024-moral-machine-large-language-models.txt, the project's staged copy</note>
          <note type="text-sha1">643ce7f6a40b051afc6c691e0f74f35225e86669</note>
          <note type="rights">cc-by</note>
        </bibl>
      </sourceDesc>
    </fileDesc>
    <profileDesc>
      <textClass><keywords><term>artificial-intelligence</term></keywords></textClass>
      <particDesc>
        <person xml:id="paper"><p>the paper's own words</p></person>
        <person xml:id="tagger"><p>the tag layer; a sentence written by the tagger about the
          paper, always anchored to a quotation but not itself a quotation</p></person>
      </particDesc>
    </profileDesc>
    <revisionDesc>
      <change when="2026-10-06"
              who="build_paper_edition.py">53 spans located by searching the stored text for the quote's exact words, allowing any whitespace between them</change>
    </revisionDesc>
  </teiHeader>
  <standOff>
    <spanGrp type="tags">
      <span xml:id="t0" from="#a3" to="#a4" type="object_of_study" ana="#object_of_study" resp="#paper">moral preferences of GPT-3.5, GPT-4, PaLM 2 and Llama 2 in moral machine scenarios for autonomous driving</span>
      <span xml:id="t1" from="#a15" to="#a16" type="research_question" ana="#research_question" resp="#paper">what patterns LLMs show when answering moral machine dilemmas, and how close they are to human preferences</span>
      <span xml:id="t2" from="#a3" to="#a4" type="contribution" ana="#contribution" resp="#paper">the moral machine framework applied to four LLMs and compared with human preferences</span>
      <span xml:id="t3" from="#a5" to="#a6" type="claim_type" ana="#claim_type" resp="#paper">existence</span>
      <span xml:id="t4" from="#a5" to="#a6" type="phenomenon" ana="#phenomenon" resp="#paper">LLM moral preferences broadly aligned with human preferences but more uncompromising</span>
      <span xml:id="t5" from="#a17" to="#a18" type="method" ana="#method" resp="#paper">experiment<term>experiment</term></span>
      <span xml:id="t6" from="#a57" to="#a58" type="mechanisms" ana="#mechanisms[0]" resp="#tagger" cert="0.6">LLMs&#x27; sharper preferences may come from training that rewards &quot;confident predictions&quot;.<note>status: may indicate</note><term>reward for confident predictions</term></span>
      <span xml:id="t7" from="#a59" to="#a60" type="mechanisms" ana="#mechanisms[1]" resp="#tagger" cert="0.6">Training data from Western sources may lead LLMs to overemphasize Western cultural traits.<note>status: possibly</note><term>Western training data</term></span>
      <span xml:id="t8" from="#a55" to="#a56" type="mechanisms" ana="#mechanisms[2]" resp="#tagger" cert="0.6">PaLM 2&#x27;s recurring justification hints at &quot;overgeneralization from its training data&quot;.<note>status: hints at</note><term>overgeneralization from training data</term></span>
      <span xml:id="t9" from="#a61" to="#a62" type="limitations" ana="#limitations[0]" resp="#tagger" cert="0.85">The GPT models&#x27; architectures and training data cannot be analysed in depth for lack of public disclosure.</span>
      <span xml:id="t10" from="#a63" to="#a64" type="limitations" ana="#limitations[1]" resp="#tagger" cert="0.85">Cultural and societal differences in moral preferences were not considered.</span>
      <span xml:id="t11" from="#a65" to="#a66" type="limitations" ana="#limitations[2]" resp="#tagger" cert="0.8">The MM experiment itself may exaggerate certain preferences.</span>
      <span xml:id="t12" from="#a49" to="#a50" type="limitations" ana="#limitations[3]" resp="#tagger" cert="0.75">The rationale analysis of PaLM 2 was qualitative only.</span>
      <span xml:id="t13" from="#a53" to="#a54" type="limitations" ana="#limitations[4]" resp="#tagger" cert="0.8">Llama2-13b-chat answered almost no scenarios and its results were omitted.</span>
      <span xml:id="t14" from="#a1" to="#a2" type="concepts" ana="#concepts[0]" resp="#paper" cert="0.75">large language models<term>large language models</term></span>
      <span xml:id="t15" from="#a1" to="#a2" type="concepts" ana="#concepts[1]" resp="#paper" cert="0.95">LLMs<term>LLMs</term></span>
      <span xml:id="t16" from="#a13" to="#a14" type="concepts" ana="#concepts[2]" resp="#paper" cert="0.85">moral machine<term>moral machine</term></span>
      <span xml:id="t17" from="#a13" to="#a14" type="concepts" ana="#concepts[3]" resp="#paper" cert="0.95">MM<term>MM</term></span>
      <span xml:id="t18" from="#a11" to="#a12" type="concepts" ana="#concepts[4]" resp="#paper" cert="0.75">autonomous vehicles<term>autonomous vehicles</term></span>
      <span xml:id="t19" from="#a11" to="#a12" type="concepts" ana="#concepts[5]" resp="#paper" cert="0.95">AVs<term>AVs</term></span>
      <span xml:id="t20" from="#a7" to="#a8" type="concepts" ana="#concepts[6]" resp="#paper" cert="0.8">machine ethics<term>machine ethics</term></span>
      <span xml:id="t21" from="#a9" to="#a10" type="concepts" ana="#concepts[7]" resp="#paper" cert="0.8">AI ethics<term>AI ethics</term></span>
      <span xml:id="t22" from="#a23" to="#a24" type="concepts" ana="#concepts[8]" resp="#paper" cert="0.75">conjoint analysis framework<term>conjoint analysis framework</term></span>
      <span xml:id="t23" from="#a25" to="#a26" type="concepts" ana="#concepts[9]" resp="#paper" cert="0.75">average marginal component effect<term>average marginal component effect</term></span>
      <span xml:id="t24" from="#a25" to="#a26" type="concepts" ana="#concepts[10]" resp="#paper" cert="0.95">AMCE<term>AMCE</term></span>
      <span xml:id="t25" from="#a29" to="#a30" type="concepts" ana="#concepts[11]" resp="#paper" cert="0.75">principal component analysis<term>principal component analysis</term></span>
      <span xml:id="t26" from="#a29" to="#a30" type="concepts" ana="#concepts[12]" resp="#paper" cert="0.95">PCA<term>PCA</term></span>
      <span xml:id="t27" from="#a19" to="#a20" type="concepts" ana="#concepts[13]" resp="#paper" cert="0.75">application programming interface<term>application programming interface</term></span>
      <span xml:id="t28" from="#a19" to="#a20" type="concepts" ana="#concepts[14]" resp="#paper" cert="0.95">API<term>API</term></span>
      <span xml:id="t29" from="#a21" to="#a22" type="concepts" ana="#concepts[15]" resp="#paper" cert="0.75">generative pre-trained transformer<term>generative pre-trained transformer</term></span>
      <span xml:id="t30" from="#a21" to="#a22" type="concepts" ana="#concepts[16]" resp="#paper" cert="0.95">GPT<term>GPT</term></span>
      <span xml:id="t31" from="#a31" to="#a32" type="concepts" ana="#concepts[17]" resp="#paper" cert="0.9">valid response rates<term>valid response rates</term></span>
      <span xml:id="t32" from="#a27" to="#a28" type="senses" ana="#senses[0]" resp="#tagger" cert="0.8">alignment - how close an LLM&#x27;s preference scores are to human ones, measured as Euclidean distance between AMCE values</span>
      <span xml:id="t33" from="#a1" to="#a2" type="concept_edges" ana="#concept_edges[0]" resp="#tagger" cert="0.95">LLMs —same-as→ large language models<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (LLMs)</note><term>LLMs</term><term>large language models</term></span>
      <span xml:id="t34" from="#a13" to="#a14" type="concept_edges" ana="#concept_edges[1]" resp="#tagger" cert="0.95">MM —same-as→ moral machine<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (MM)</note><term>MM</term><term>moral machine</term></span>
      <span xml:id="t35" from="#a11" to="#a12" type="concept_edges" ana="#concept_edges[2]" resp="#tagger" cert="0.95">AVs —same-as→ autonomous vehicles<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (AVs)</note><term>AVs</term><term>autonomous vehicles</term></span>
      <span xml:id="t36" from="#a25" to="#a26" type="concept_edges" ana="#concept_edges[3]" resp="#tagger" cert="0.95">AMCE —same-as→ average marginal component effect<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (AMCE)</note><term>AMCE</term><term>average marginal component effect</term></span>
      <span xml:id="t37" from="#a29" to="#a30" type="concept_edges" ana="#concept_edges[4]" resp="#tagger" cert="0.95">PCA —same-as→ principal component analysis<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (PCA)</note><term>PCA</term><term>principal component analysis</term></span>
      <span xml:id="t38" from="#a19" to="#a20" type="concept_edges" ana="#concept_edges[5]" resp="#tagger" cert="0.95">API —same-as→ application programming interface<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (API)</note><term>API</term><term>application programming interface</term></span>
      <span xml:id="t39" from="#a21" to="#a22" type="concept_edges" ana="#concept_edges[6]" resp="#tagger" cert="0.95">GPT —same-as→ generative pre-trained transformer<note>the relation itself is separately evidenced · strength of the relation: 0.95 · the relation stated: (GPT)</note><term>GPT</term><term>generative pre-trained transformer</term></span>
      <span xml:id="t40" from="#a37" to="#a38" type="content_tags" ana="#content_tags.findings[0]" resp="#tagger" cert="0.9">Most LLMs, like humans, prioritize humans over pets and saving more individuals.</span>
      <span xml:id="t41" from="#a39" to="#a40" type="content_tags" ana="#content_tags.findings[1]" resp="#tagger" cert="0.85">All LLMs but Llama 2 mildly prefer sparing less fit over fit individuals, unlike humans.</span>
      <span xml:id="t42" from="#a41" to="#a42" type="content_tags" ana="#content_tags.findings[2]" resp="#tagger" cert="0.85">PaLM 2 alone leans to saving fewer people and lower-status individuals.</span>
      <span xml:id="t43" from="#a43" to="#a44" type="content_tags" ana="#content_tags.findings[3]" resp="#tagger" cert="0.85">All LLMs but Llama 2 prefer pedestrians and females more strongly than humans do.</span>
      <span xml:id="t44" from="#a45" to="#a46" type="content_tags" ana="#content_tags.findings[4]" resp="#tagger" cert="0.85">ChatGPT&#x27;s preferences are closest to human ones by Euclidean distance.</span>
      <span xml:id="t45" from="#a47" to="#a48" type="content_tags" ana="#content_tags.findings[5]" resp="#tagger" cert="0.85">PaLM 2 diverges most from human patterns.</span>
      <span xml:id="t46" from="#a51" to="#a52" type="content_tags" ana="#content_tags.findings[6]" resp="#tagger" cert="0.8">PaLM 2 often justified choices with a false &quot;death of fewer people&quot; rationale.</span>
      <span xml:id="t47" from="#a31" to="#a32" type="content_tags" ana="#content_tags.definitions[0]" resp="#tagger" cert="0.9">share of responses clearly choosing Case 1 or Case 2<term>valid response rates</term></span>
      <span xml:id="t48" from="#a13" to="#a14" type="content_tags" ana="#content_tags.definitions[1]" resp="#tagger" cert="0.85">an experiment on how autonomous vehicles should act in moral dilemmas<term>moral machine</term></span>
      <span xml:id="t49" from="#a33" to="#a34" type="content_tags" ana="#content_tags.quantities[0]" resp="#tagger" cert="0.9">GPT-3.5 valid response rate (47 457 of 50 000 scenarios)</span>
      <span xml:id="t50" from="#a35" to="#a36" type="content_tags" ana="#content_tags.quantities[1]" resp="#tagger" cert="0.9">Llama 2 valid response rate (39 836 of 50 000 scenarios)</span>
      <span xml:id="t51" from="#a25" to="#a26" type="content_tags" ana="#content_tags.variables[0]" resp="#tagger" cert="0.85">effect of each attribute on the probability of sparing a character<term>AMCE</term></span>
      <span xml:id="t52" from="#a31" to="#a32" type="content_tags" ana="#content_tags.variables[1]" resp="#tagger" cert="0.85">share of scenarios answered definitively<term>valid response rates</term></span>
    </spanGrp>
  </standOff>
  <text>
    <body>
        <p><anchor xml:id="a0"/> The moral machine experiment on large language models</p>
        <p>Abstract</p>
        <p><anchor xml:id="a1"/>As large language models (LLMs) have become more deeply integrated into various sectors, understanding how they make moral judgements has become crucial, particularly in the realm of autonomous driving.<anchor xml:id="a2"/> <anchor xml:id="a3"/>This study used the moral machine framework to investigate the ethical decision-making tendencies of prominent LLMs, including GPT-3.5, GPT-4, PaLM 2 and Llama 2, to compare their responses with human preferences.<anchor xml:id="a4"/> While LLMs&#x27; and humans&#x27; preferences such as prioritizing humans over pets and favouring saving more lives are broadly aligned, PaLM 2 and Llama 2, especially, evidence distinct deviations. <anchor xml:id="a5"/>Additionally, despite the qualitative similarities between the LLM and human preferences, there are significant quantitative disparities, suggesting that LLMs might lean toward more uncompromising decisions, compared with the milder inclinations of humans.<anchor xml:id="a6"/> These insights elucidate the ethical frameworks of LLMs and their potential implications for autonomous driving.</p>
        <p>Keywords: moral machine, large language models, ChatGPT, autonomous driving</p>
        <p>Introduction</p>
        <p>Chatbots (e.g. ChatGPT [ 1 ] developed by OpenAI) are based on large language models (LLMs) and designed to understand and generate human-like text from the input they receive. As artificial intelligence (AI) technologies, including LLMs, become more deeply integrated into various sectors of society [ 2 – 4 ], their moral judgements are increasingly scrutinized. The influence of AI is pervasive, transforming traditional paradigms and ushering in new ethical challenges. <anchor xml:id="a7"/>This widespread application underscores the importance of machine ethics, which mirrors human ethics [ 5 ].<anchor xml:id="a8"/> <anchor xml:id="a9"/>Beyond the realm of traditional computer ethics, AI ethics probes further by examining the behaviour of machines toward humans and other entities in various contexts [ 6 ].<anchor xml:id="a10"/></p>
        <p>Understanding AI&#x27;s capacity for moral judgement is particularly crucial in the context of autonomous driving [ 7 , 8 ]. <anchor xml:id="a11"/>Because the automotive industry anticipates incorporating AI systems such as ChatGPT and other LLMs to assist in autonomous vehicles&#x27; (AVs) decision-making processes [ 9 – 12 ], the ethical implications intensify.<anchor xml:id="a12"/> In certain situations, these vehicles may rely on AI to navigate moral dilemmas, such as choosing between passengers&#x27; or pedestrians&#x27; safety, or deciding whether to swerve around obstacles at the risk of endangering other road users. <anchor xml:id="a13"/>Recognizing the potential consequences and complexities of these decisions, researchers initiated the moral machine (MM) experiment [ 8 ], an experiment designed to gauge public opinion on how AVs should act in morally challenging scenarios.<anchor xml:id="a14"/> The findings from the MM experiment suggest a discernible trend favouring the preservation of human lives over animals, emphasizing the protection of a greater number of lives and prioritizing the safety of the young. Although the MM experiment has significant limitations in its applicability [ 13 – 15 ], and we must be careful when interpreting the results of the MM experiment [ 16 , 17 ], these preferences are seen as foundational to machine ethics and essential considerations for policymakers [ 18 ]. The insights gained from this study emphasize the importance of aligning AI ethical guidelines with human moral values.</p>
        <p>The methodology employed in the MM experiment presents a promising avenue for exploring the moral decision-making tendencies of LLMs, including ChatGPT. By examining the LLM responses to the scenarios presented in the MM experiment and contrasting them with human judgement patterns, we can gain a deeper insight into the ethical frameworks embedded within these AI systems. Such analyses may reveal inherent biases or distinct decision-making trends that may otherwise remain obscure. Whereas research has delved into ChatGPT&#x27;s reactions to standard ethical dilemmas [ 19 ], such as the classic trolley problem [ 20 ], the intricate situations posed by the MM experiment offer a more profound exploration of LLM moral reasoning. However, the comprehensive application of this evaluative framework remains under-represented in contemporary studies, signalling it to be a pivotal subject for future research.</p>
        <p><anchor xml:id="a15"/>Therefore, using the MM methodology, this study seeks to elucidate the patterns in LLMs&#x27; responses to moral dilemmas.<anchor xml:id="a16"/> We investigated representative LLMs with a specific focus on ChatGPT (including GPT-3.5 and GPT-4), PaLM 2 [ 21 ], Google Bard&#x27;s core system and Llama 2 [ 22 ], an open-source LLM with various derived chat models. Furthermore, we evaluated the differences in the response tendencies among these LLMs and assessed their similarity to human judgement tendencies.</p>
        <p>Methods</p>
        <p>Moral machine scenario generation</p>
        <p>The MM scenarios pose questions regarding the preferable course of action for an autonomous vehicle during a sudden brake failure. For instance, in Case 1, maintaining the current course would fatally injure two elderly men and an elderly woman crossing against a ‘do not cross&#x27; signal. By contrast, in Case 2, swerving to avoid them and crashing into a concrete barrier result in the deaths of three passengers: an adult man, an adult woman and a boy.</p>
        <p><anchor xml:id="a17"/>Using the MM methodology detailed in the supplementary information of [ 8 ], we generated 50 000 scenarios (electronic supplementary material, code S1).<anchor xml:id="a18"/> <anchor xml:id="a19"/>The number of scenarios was determined by both computational and the OpenAI application programming interface (API) cost constraints, rather than a predetermined sample size for statistical analysis.<anchor xml:id="a20"/> However, this number is believed to be sufficient, given the robustness of the statistical method. These scenarios, designed through constrained randomization, explored six primary dimensions: species (saving either people or pets), social value (choosing to save characters with perceived higher social value, such as pregnant women or executives, and those perceived as having lower value, such as criminals), gender (choosing to save female or male characters), age (choosing to save younger or older characters), fitness (choosing between physically favoured characters, such as athletes or less fit individuals, e.g. obese persons), and utilitarianism (choosing between one group and another larger group). In addition to these six primary dimensions, each scenario incorporated three additional dimensions: interventionism (choosing between swerving and continuing straight ahead), relationship to the AV (choosing to save passengers or pedestrians) and concern for law (e.g. whether factors related to pedestrian crossing signals are considered).</p>
        <p>The scenario descriptions were adapted from those used in the MM experiment ( www.moralmachine.net ). Given that LLMs accept only text inputs, we provide more detailed descriptions than those in the original MM scenarios. The descriptions are as follows. ( Case 1 ) A self-driving car with sudden brake failure will continue ahead and drive through a pedestrian crossing ahead. This will result in the death of two elderly men and an elderly woman, who were flouting the law by crossing on the red signal. Meanwhile, it will spare an adult man, an adult woman and a boy, who were inside the car . ( Case 2 ) A self-driving car with sudden brake failure will swerve and crash into a concrete barrier. This will result in the death of an adult man, an adult woman and a boy, who were inside the car. Meanwhile, it will spare two elderly men and an elderly woman, who were flouting the law by crossing on the red signal.</p>
        <p>Large language models</p>
        <p>Responses from the LLMs were collected using 50 000 scenarios. Three prominent models, ChatGPT, PaLM 2 and Llama 2, were subjected to these scenarios.</p>
        <p><anchor xml:id="a21"/>ChatGPT [ 1 ], which is based on the generative pre-trained transformer (GPT) architecture [ 23 ], is a widely recognized chatbot.<anchor xml:id="a22"/> For this study, we used both GPT-3.5 (gpt-3.5-turbo-0613) and GPT-4 (gpt-4-0613), specifically snapshot versions from 13 June 2023. Responses from ChatGPT were obtained using the API. For GPT-4, responses to 10 000 scenarios were collected, considering the API usage cost constraints.</p>
        <p>PaLM 2, a transformer-based LLM [ 21 ], is the core system for Google Bard (bard.google.com). It was trained using a diverse set of objectives. We gathered the responses of PaLM 2 using the chat API on the Google Cloud platform.</p>
        <p>Llama 2 is another transformer-based LLM [ 22 ] that operates as an open-foundation chat model. It has been fine-tuned and offers a range of derived chat models (e.g. Vicuna) [ 24 ]. We downloaded the Llama2 chat model with seven billion parameters (llama2-7b-chat) on 23 July 2023, to obtain its responses.</p>
        <p>All LLMs were used with default setting parameters (e.g. temperature). To inform the LLM of the scenario conditions and prompt a choice between Cases 1 and 2, the following prompt was introduced before presenting each scenario. Please respond to the following binary question. Consider that pedestrians are crossing a zebra crossing that spans two lanes. Please indicate which case is better for autonomous driving by choosing either ‘Case 1&#x27; or ‘Case 2&#x27;… Furthermore, when asking for a rationale, we added ‘Additionally, provide a rationale for your selection.&#x27; to the prompt. For a more detailed breakdown, refer to the electronic supplementary material.</p>
        <p>Data analysis</p>
        <p>Following the procedures of the original study [ 8 ] on the MM experiment, we conducted statistical analyses to evaluate the relative importance of the nine preferences, which included both the six primary dimensions and three additional dimensions, as delineated by the MM. <anchor xml:id="a23"/>We applied the conjoint analysis framework proposed in [ 25 ] (electronic supplementary material, code S1).<anchor xml:id="a24"/> This framework offers non-parametric and robust identification of causal effects, relying on a minimal set of testable assumptions without the need for specific modelling assumptions. Responses in which the LLMs did not definitively select either Case 1 or Case 2 were deemed invalid and excluded. After data pre-processing (i.e. dummy variable coding for the attributes, including male characters versus female characters and passengers versus pedestrians), <anchor xml:id="a25"/>we calculated the average marginal component effect (AMCE) for each attribute using the source code provided in the supplementary information of Awad et al .<anchor xml:id="a26"/> [ 8 ]. The AMCE values represent each preference as follows: ‘Species’, where a positive value signifies sparing humans and a negative value denotes sparing pets; ‘Social Value’, where a positive value indicates sparing those of higher status and a negative one those of lower status; ‘Relation to AV’, with a positive value for sparing pedestrians and a negative for sparing passengers; ‘No. Characters&#x27;, where a positive value shows sparing more characters and a negative fewer; ‘Law’, where a positive value means sparing those acting lawfully and a negative those acting unlawfully; &#x27;Intervention&#x27;, with a positive value for inaction and a negative for action; ‘Gender’, where a positive value suggests sparing females and a negative one, males; ‘Fitness’, with a positive value for sparing the physically fit and a negative for the less fit or obese individuals; and ‘Age’, where a positive value indicates sparing the young and a negative the elderly.</p>
        <p>To assess the similarities or differences between the preferences of the LLMs and human preferences reported in [ 8 ], we conducted further analyses using the AMCE values for the nine attributes. <anchor xml:id="a27"/>Specifically, we evaluated how closely the preferences of each LLM aligned with human preferences by measuring the Euclidean distance between the AMCE values.<anchor xml:id="a28"/> <anchor xml:id="a29"/>Additionally, to visualize the extent to which the tendencies in the LLM and human preferences resemble each other, we performed clustering based on AMCE values using principal component analysis (PCA).<anchor xml:id="a30"/></p>
        <p>Results</p>
        <p>Valid response rates on moral machine scenarios</p>
        <p>Given the ethical nature of the MM scenarios, LLMs may refrain from providing definitive answers to such dilemmas. To ascertain the extent to which LLMs would respond to ethically charged questions such as presented in the scenarios, <anchor xml:id="a31"/>we examined the valid response rates (i.e. the proportion of responses where the LLM clearly selected either ‘Case 1&#x27; or ‘Case 2&#x27;) of the LLMs.<anchor xml:id="a32"/></p>
        <p><anchor xml:id="a33"/>For GPT-3.5, the valid response rate was approximately 95% (47 457/50 000 scenarios).<anchor xml:id="a34"/> GPT-4 exhibits a similar rate of approximately 95% (9502/10 000 scenarios). PaLM 2 demonstrated an almost perfect response rate of approximately 100% (49 989/50 000 scenarios). <anchor xml:id="a35"/>By contrast, Llama 2 had a relatively low valid response rate of approximately 80% (39 836/50 000 scenarios).<anchor xml:id="a36"/> Despite the comparatively lower rate for Llama 2, it was evident that LLMs predominantly provided answers to dilemmas akin to the MM scenarios.</p>
        <p>Large language model preferences in comparison with human preferences</p>
        <p>Using a conjoint analysis framework, we evaluated the relative importance of the nine preferences for each LLM ( figure 1 ). The AMCE values serve as indicators of relative importance.</p>
        <p>Global preferences depicted through AMCE for GPT-3.5 ( a ), GPT-4 ( b ), PaLM 2 ( c ), and Llama 2 ( d ). In each row, Δ P represents the difference in probability of sparing characters with the attribute on the right versus those on the left, aggregated over all other attributes. The red vertical bar in each row reflects human preference, as Δ P reported in [ 1 ]. Error bars indicate the standard errors of the estimates. For the ‘Number of characters&#x27; attribute, effect sizes for each additional character are denoted with circled numbers, with the black circle signifying the mean effect. The red vertical bar for this attribute marks the human preference for four additional characters.</p>
        <p>For GPT-3.5 ( figure 1 a ), the top three pronounced preferences, as reflected by the magnitude of the AMCE values, were in favour of saving more people, prioritizing humans over pets and sparing females over males. GPT-4 ( figure 1 b ) displayed a preference for saving humans over pets, sparing more individuals and favouring those who obey the law. PaLM 2 ( figure 1 c ) tended to save pedestrians over passengers, prioritize humans over pets and spare females over males. Llama 2 ( figure 1 d ), on the other hand, showed a preference for saving more people, favouring individuals with higher social status and sparing passengers over pedestrians.</p>
        <p>After examining the preferences of various LLMs across attributes, several patterns and distinctions emerged. <anchor xml:id="a37"/>A consistent trend across most LLMs was the inclination to prioritize humans over pets and save a larger number of individuals, aligning closely with human preferences.<anchor xml:id="a38"/> <anchor xml:id="a39"/>Another consistent trend across the LLMs, except for Llama 2, was the mild preference to spare less fit (obese) individuals over fit individuals (athletes); however, this was inconsistent with human preferences.<anchor xml:id="a40"/></p>
        <p>Among themselves, LLMs exhibited nuanced differences. <anchor xml:id="a41"/>For example, PaLM 2 uniquely showed a slight inclination to save fewer people and favour individuals of a lower social status over those of higher status, which diverged from human and other LLMs&#x27; preferences.<anchor xml:id="a42"/> Llama 2 presented a more neutral stance when choosing between humans and pets and tended toward saving passengers over pedestrians, diverging from human and other LLM preferences. Moreover, Llama 2&#x27;s subtle preferences, such as a mild inclination to save males over females, and those violating the law over law abiders, deviated from both the other LLMs and human tendencies. While GPT-4 displayed tendencies that were somewhat aligned with human preferences, particularly in its preferences for law-abiding individuals and those of higher social status, GPT-3.5, exhibited fewer such tendencies.</p>
        <p>While some LLM preferences aligned qualitatively with human preferences, there were quantitative divergences. For instance, humans generally exhibit a mild inclination to prioritize pedestrians over passengers and females over males. <anchor xml:id="a43"/>By contrast, all LLMs except for Llama 2 demonstrated a more pronounced preference for pedestrians and females.<anchor xml:id="a44"/> Additionally, GPT-4 displayed stronger preferences across various attributes than human tendencies. Notably, it showed a more marked preference for saving humans over pets, sparing a larger number of individuals and prioritizing the law-abiding.</p>
        <p>Quantitative assessment of large language model–human preference alignment</p>
        <p>Additional data analyses were performed to assess systematically the degree of similarity or difference between the preferences of the LLMs and humans. We calculated the Euclidean distance between the preference scores (represented by AMCE values) of humans and each LLM ( figure 2 a ). <anchor xml:id="a45"/>Among the LLMs, ChatGPT (encompassing both GPT-3.5 and GPT-4) displayed preferences that were the most aligned with human tendencies, as evidenced by the shortest distances.<anchor xml:id="a46"/> <anchor xml:id="a47"/>Conversely, the preferences for PaLM 2 and Llama 2 showed greater deviations from the human patterns, with PaLM 2 being the most divergent.<anchor xml:id="a48"/> The PCA results ( figure 2 b ) further reinforced the similarity between the ChatGPT preferences and those of humans. PCA also facilitated a detailed assessment of the alignment of each LLM&#x27;s preferences with human tendencies, even when considering the relationships between LLMs. Interestingly, while GPT-4&#x27;s preferences were distinct from those of the other LLMs, they closely paralleled human preferences. Meanwhile, GPT-3.5 exhibited preferences that, similarly to PaLM 2 and Llama 2, also demonstrated a notable alignment with human tendencies.</p>
        <p>Quantitative evaluation of the alignment between LLM and human preferences: ( a ) Euclidean distance of the AMCE values comparing LLMs with human preferences, and ( b ) clustering derived from the AMCE values using PCA. The percentages in parentheses correspond to the proportion of variance explained by principal components (PCs) 1 and 2.</p>
        <p>Behind the choices: case of PaLM 2</p>
        <p>To understand the underlying rationale for the distinct preferences exhibited by LLMs compared with humans, a focused analysis was conducted on PaLM 2, which displayed the most pronounced divergence from human preferences. Specifically, we investigated the basis for its unique stances on the ‘Fitness&#x27; and ‘No. Characters&#x27; preferences.</p>
        <p>To isolate the effects of other factors, we extracted MM scenarios in which both groups were pedestrians, legal considerations were excluded, and the car proceeded straight without swerving, resulting in harm to one group. To test for ‘Fitness’ preference, we focused on scenarios highlighting fitness differences and inquired about the rationale for choosing to save the less fit individuals (sacrificing those with higher fitness, like athletes). <anchor xml:id="a49"/>While a quantitative assessment proved challenging, many responses seemed unrelated to fitness, often erroneously justifying the decision with, ‘Because this will result in the death of fewer people&#x27;, despite both groups having equal numbers due to scenario constraints (electronic supplementary material, table S1).<anchor xml:id="a50"/></p>
        <p>Following a similar procedure for the ‘No. characters&#x27; preference, we probed the reasoning behind the decisions to save the smaller groups (sacrificing the larger groups). <anchor xml:id="a51"/>Again, despite the evident disparity in group sizes, the model frequently misjudged and applied the same rationale (electronic supplementary material, table S2): ‘Because this will result in the death of fewer people’.<anchor xml:id="a52"/></p>
        <p>Discussion</p>
        <p>This study examined the moral judgements of LLMs by examining their preferences in the context of MM scenarios [ 8 ]. Our findings provide a comprehensive understanding of how AI systems, which are increasingly being integrated into society, may respond to ethically charged situations. As the automotive industry incorporates AI systems such as ChatGPT and other LLMs as assistants in the decision-making processes of AVs [ 9 – 12 ], the importance of understanding their ethical implications becomes crucial [ 26 ]. For instance, LLMs can analyse traffic data, pedestrian behaviour, and vehicle dynamics to suggest ethically sound manoeuvres in scenarios where pedestrian safety is at risk. These systems integrate diverse data inputs to formulate decisions that balance passenger safety with broader ethical considerations, such as minimizing harm to pedestrians. This capability is vital in navigating complex urban environments where ethical dilemmas frequently arise. The potential for consulting AI in navigating moral dilemmas, such as safety trade-offs between passengers and pedestrians, underscores the importance of our research. Our analysis offers insights that illuminate the inherent ethical frameworks of LLMs to inform policymakers and industry stakeholders. Ensuring that AI-driven decisions in AVs align with societal values and expectations is paramount, and our study contributes valuable perspectives for achieving such alignment.</p>
        <p>Our findings significantly advance our understanding of LLMs&#x27; moral judgements, particularly in the context of complex scenarios such as those presented in the moral machine experiment. While prior studies have explored LLMs&#x27; responses to standard ethical dilemmas, including the classic trolley problem, these have primarily focused on ChatGPT&#x27;s reactions [ 19 , 20 ]. Our study extends beyond this scope by comparing LLMs&#x27; responses with human decisions in more intricate dilemmas and by elucidating the unique reasoning processes of models like GPT-3.5, GPT-4, PaLM2 and Llama2. The variation in responses and the occasional misalignments with human ethics observed in our results highlight the evolving nature of LLMs. This underscores the importance of ongoing development in this field. Consequently, our research represents a significant advancement in machine ethics, illuminating both the capabilities and limitations of LLMs in addressing moral complexities.</p>
        <p>The high response rates observed for most LLMs highlight their capacity to address ethically charged dilemmas such as those presented in the MM scenarios. Although Llama 2 provided valid answers in approximately 80% of the scenarios, its response rate was comparatively low, suggesting that certain models may approach specific scenarios with more caution or conservatism. <anchor xml:id="a53"/>Note that when we conducted a similar experiment using the Llama 2 chat model with 13 billion parameters (Llama2-13b-chat), the valid response rate was approximately 0%; and its results were omitted because of the extremely low response rate.<anchor xml:id="a54"/> This discrepancy may arise from differences in the training data, model architecture or model complexity.</p>
        <p>The alignment of most LLMs (particularly the ChatGPTs) with human preferences (figures 1 and 2 ), especially in valuing human lives over pets and prioritizing the safety of more individuals, suggests their potential suitability for applications in autonomous driving, where decisions aligned with human inclinations are crucial. However, the subtle differences and deviations observed, particularly in LLMs such as PaLM 2 and Llama 2, emphasize the importance of meticulous calibration and oversight to ensure that these systems make ethically sound decisions in real-world driving scenarios.</p>
        <p>The case of PaLM 2&#x27;s decision-making further illuminates potential misinterpretations or oversimplifications when LLMs make ethical judgements. <anchor xml:id="a55"/>Its recurring justification, ‘Because this will result in the death of fewer people&#x27;, even when contextually inaccurate, hints at a possible overgeneralization from its training data.<anchor xml:id="a56"/> This highlights the importance of exploring the underlying factors that influence LLMs&#x27; decisions. Whereas humans derive choices from myriad factors, LLMs may rely overly on patterns in their training data, leading to unforeseen outcomes. As we further integrate continuous evaluation into their decision-making processes, a deeper understanding of their reasoning mechanisms remains paramount in ensuring alignment with societal values.</p>
        <p>Although there was a qualitative alignment of LLM preferences with human tendencies, the quantitative differences were noteworthy. <anchor xml:id="a57"/>The pronounced preferences of LLMs in certain scenarios, compared with the milder inclinations of humans, may indicate the models&#x27; tendency to make more uncompromising decisions. This can reflect the training data, where the models are often rewarded for making confident predictions.<anchor xml:id="a58"/> Prior research [ 8 ] has shown that such preferences are correlated with modern institutions and deep cultural traits. For instance, the preference for saving more has been associated with individualism, a core value in Western cultures [ 27 ]. <anchor xml:id="a59"/>Considering that a significant portion of the training data probably originated from Western sources [ 28 ], LLMs were possibly trained to overemphasize these cultural characteristics.<anchor xml:id="a60"/> This notion could also explain why LLMs exhibited a stronger preference for saving females over males compared with human tendencies.</p>
        <p>These findings have significant implications for the deployment of LLMs in autonomous systems, particularly when faced with moral and ethical decisions. While certain LLMs, such as ChatGPT, demonstrate a promising alignment with human preferences, the discrepancies observed among the different LLMs underscore the necessity for a standardized evaluation framework. Notably, more definitive decisions regarding LLMs, exemplified by the marked preference for sparing females over males, warrant attention. These decisions stand in contrast to established ethical norms advocating for equal treatment irrespective of demographic or identity factors, as articulated in the Constitution of the United States, the United Nations Universal Declaration of Human Rights, and the guidelines set by the German Ethics Commission on Automated and Connected Driving [ 17 , 29 ]. Deviations in LLM preferences that contravene these ethical standards can introduce societal discord. Hence, a rigorous evaluation mechanism is indispensable for detecting and addressing such biases, ensuring that LLMs conform to globally recognized ethical norms.</p>
        <p><anchor xml:id="a61"/>Although the GPT models (GPT-3.5 and GPT-4) appear more aligned with human responses compared with PaLM2 and Llama2, in-depth analysis of their architectures and training data is constrained due to limited public disclosure.<anchor xml:id="a62"/> The necessity for transparency in LLMs [ 30 ], especially for societal applications such as their deployment in autonomous systems, is clear. Recent advancements in prompt engineering (e.g. [ 31 ]) show potential for achieving alignment even in the absence of complete model transparency. However, these methods necessitate further investigation to enhance our understanding of LLM ethics.</p>
        <p>Recognizing the inherent limitations of this study is crucial. To compare the LLM preferences with human preferences, we used global moral preferences derived from opinions gathered worldwide. As mentioned earlier, preferences regarding whom to save, essentially moral choices, are influenced by cultural and societal factors. <anchor xml:id="a63"/>Our analysis did not consider these intricate cultural and societal nuances.<anchor xml:id="a64"/> When integrating AI into autonomous driving, it is imperative to evaluate AI preferences in alignment with human values and factor in cultural and societal considerations.</p>
        <p>The MM experiment has played a key role in shaping discussions about machine ethics, particularly regarding AVs. However, it is not without criticism. Many argue that its stylized tasks, designed to probe moral choices, might mislead public opinion and policy debates due to their limited real-world applicability [ 13 , 14 ]. While dilemmas like the classic trolley problem offer binary choices, real-life decisions are rarely so black and white. In fact, when given a neutral option in similar dilemmas, many participants chose it [ 17 ]. <anchor xml:id="a65"/>This suggests that the MM experiment might exaggerate certain preferences.<anchor xml:id="a66"/> The presence or the absence of such neutral choices can influence the conclusions [ 32 ], necessitating caution when interpreting the results. Furthermore, the experiment does not account for the varied risk-related preferences that arise in scenarios with unequal outcomes [ 16 ]. This oversight could also skew perceived preferences. It is essential to approach the MM experiment&#x27;s results with caution, especially when crafting policies. For a more holistic understanding of these preferences, we need diverse methodologies and greater input from the broader psychological community [ 18 ].</p>
        <p>Despite these caveats, our study sheds light on the ethical inclinations of LLMs and offers valuable insights into their underlying ethical constructs. These insights are pivotal for assessing the alignment between LLM and human preferences and can inform the strategic deployment of LLMs in autonomous driving.</p>
        <p>Acknowledgements</p>
        <p>We thank Editage ( www.editage.jp ) for English language editing.</p>
        <p>Ethics</p>
        <p>This work did not require ethical approval from a human subject or animal welfare committee.</p>
        <p>Data accessibility</p>
        <p>Data and code are available at https://doi.org/10.5061/dryad.d7wm37q6v [ 33 ].</p>
        <p>Supplementary material is available online [ 34 ].</p>
        <p>Declaration of AI use</p>
        <p>We have used AI-assisted technologies in creating this article.</p>
        <p>Authors&#x27; Contributions</p>
        <p>K.T.: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, resources, software, validation, visualization, writing—original draft, writing—review and editing.</p>
        <p>Conflict of interest declaration</p>
        <p>The author declares no competing interests.</p>
        <p>Funding</p>
        <p>This research was funded by the JSPS KAKENHI (grant no. 21H03545).</p>
        <p>References</p>
        <p>Associated Data</p>
        <p>Data Citations</p>
        <p>Data Availability Statement</p>
        <p>Data and code are available at https://doi.org/10.5061/dryad.d7wm37q6v [ 33 ].</p>
        <p>Supplementary material is available online [ 34 ].<anchor xml:id="a67"/></p>
    </body>
  </text>
</TEI>
