{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Artificial Intelligence and Human Cupidity\n\nAn essay on recent developments in artificial intelligence (AI) ethics, and the ways we, as humans, are in many cases reflecting the worst of ourselves in our machines rather than the best.","metadata":{}},{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport re\nfrom IPython.display import display, Markdown\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        pass\n#         print(os.path.join(dirname, filename))\n    \n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session\n\nimport warnings\n\n# We don't really want package warnings cluttering our essay here, so we will ignore them\nwarnings.filterwarnings('ignore')\n\n# Import a bibtex reader to make citations a bit easier to manage\n!pip install pybtex -q --root-user-action=ignore\n\nimport pybtex\n\n# Bring in geopandas for the map\nimport geopandas\n\n# And our usual plotting tools\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n%matplotlib inline\n\n# We want to get some data off the web\nimport requests\n\n# and we need some fuzzy matching\nfrom fuzzywuzzy import process","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-07-08T07:18:05.734821Z","iopub.execute_input":"2023-07-08T07:18:05.735123Z","iopub.status.idle":"2023-07-08T07:18:19.586620Z","shell.execute_reply.started":"2023-07-08T07:18:05.735096Z","shell.execute_reply":"2023-07-08T07:18:19.585402Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%writefile submission.csv\ntype,value\nessay_category,'AI ethics'\nessay_url,'https://www.kaggle.com/code/asenath/on-ethics-and-ai'\nfeedback1_url,'https://www.kaggle.com/code/robertolofaro/a-primer-on-ai-ethics-via-arxiv-focus-2020-2023/comments#2332642'\nfeedback2_url,'https://www.kaggle.com/code/antongc/developments-in-ai-and-ethics-in-the-past-2-years/comments#2332771'\nfeedback3_url,'https://www.kaggle.com/code/collinschukwukaeme/ai-ethics-ensuring-a-responsible-ai-future/comments#2334014'","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# check submission file\nsub = pd.read_csv('submission.csv')\nsub","metadata":{"execution":{"iopub.status.busy":"2023-06-25T06:30:18.429949Z","iopub.execute_input":"2023-06-25T06:30:18.430486Z","iopub.status.idle":"2023-06-25T06:30:18.489165Z","shell.execute_reply.started":"2023-06-25T06:30:18.430456Z","shell.execute_reply":"2023-06-25T06:30:18.488008Z"},"_kg_hide-output":true,"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# query OECD API\noecd_query = \"https://sdmx.oecd.org/public/rest/data/OECD.ELS.SAE,DSD_EARNINGS@RMW,1.0/..USD_EXC.H...?startPeriod=2021&dimensionAtObservation=AllDimensions\"\n\noecd_response = requests.get(oecd_query)\n\n# for some reason we get a 200 response code but nothing else... is the data not public, or perhaps im just failing at requests!\n\n# Anyway... all we really need is just this table for now\n# source: https://data-explorer.oecd.org/vis?tm=Minimum%20wage&pg=0&snb=3&vw=tb&df%5Bds%5D=dsDisseminateFinalDMZ&df%5Bid%5D=DSD_EARNINGS%40RMW&df%5Bag%5D=OECD.ELS.SAE&df%5Bvs%5D=1.0&pd=2021%2C&dq=..USD_EXC.H...&ly%5Brw%5D=REF_AREA&ac=false\nmin_wage = { \n    'Australia': 15.1,\n    'Belgium':  11.1,\n    'Canada': 11.2,\n    'Chile': 2.3,\n    'Colombia': 1.2,\n    'Costa Rica': 2.5,\n    'Czech Republic': 4.2,\n    'Estonia': 4.1,\n    'France': 12.1,\n    'Germany': 11.3,\n    'Greece': 4.3,\n    'Hungary': 3.2,\n    'Ireland': 12.1,\n    'Israel': 8.8,\n    'Korea': 7.6,\n    'Latvia': 3.4,\n    'Lithuania': 4.7,\n    'Luxembourg': 15.2,\n    'Mexico': 0.9,\n    'Netherlands': 11.5,\n    'New Zealand': 14.0,\n    'Poland': 4.2,\n    'Portugal': 5.3,\n    'Slovak Republic': 2.2,\n    'Slovenia': 7.0,\n    'Spain': 8.8,\n    'Türkiye': 2.3,\n    'United Kingdom': 12.2,\n    'United States': 7.3,\n    'Brazil': 1.0,\n    'Russia': 1.0,\n}\n\nmin_wage_df = pd.DataFrame({'country': min_wage.keys(), 'wage': min_wage.values()})\nmin_wage_df.sort_values(by='wage', ascending=False, inplace=True)\nmin_wage_df.reset_index(drop=True, inplace=True)\n\n# Show the Mechanical Turk horror\n# cut off after the US\nmt_df = min_wage_df.iloc[:14].copy()\n\n# add an easy colouring\nmt_df['source'] = 'oecd'\n\n# Combine with mechanical turk\nmt_df = pd.concat([mt_df, pd.DataFrame({'country': ['AWS Mechanical Turk'], \n                                        'wage': [2.0],\n                                        'source': 'aws'\n                                       })], axis=0)\n\n# Get some data from the AI Index report, and make a map\nai_index_link = 'https://drive.google.com/file/d/1fpjGF3CFRH88_7LR7BB_8vdFWUcRJeEn/view?usp=sharing'\nai_index_link = 'https://drive.google.com/uc?id=' + ai_index_link.split('/')[-2]\ncountry_legislation_df = pd.read_csv(ai_index_link)\n\nworld = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))\ncountries_needing_mapping = [x for x in country_legislation_df['Country'] if x not in world['name'].values]\n\nk2 = world['name'].to_list()\nk1 = country_legislation_df['Country'].apply(lambda x: process.extract(x, k2, limit=2))\nk3 = k1.apply(lambda x: ', '.join(i[0] for i in x if i[1] >= 90))\n\ncountry_legislation_df['match'] = k3\n\ncountry_df = world.merge(country_legislation_df, left_on='name', right_on='match', how='left')\n\n# carbon emissions data from AI index\ncarbon_link = \"https://drive.google.com/file/d/1uyh5aJCs0fAl27vaIEsiXEX8WWkOCyUS/view?usp=sharing\"\ncarbon_link = 'https://drive.google.com/uc?id=' + carbon_link.split('/')[-2]\ncarbon_df = pd.read_csv(carbon_link, encoding=\"ISO-8859-1\")","metadata":{"execution":{"iopub.status.busy":"2023-06-25T06:30:18.490814Z","iopub.execute_input":"2023-06-25T06:30:18.491962Z","iopub.status.idle":"2023-06-25T06:30:20.131546Z","shell.execute_reply.started":"2023-06-25T06:30:18.491915Z","shell.execute_reply":"2023-06-25T06:30:20.130225Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"---","metadata":{}},{"cell_type":"markdown","source":"# 1. Introduction\n\nUnlike many other areas of machine learning (ML) and artificial intelligence (AI), in which the objective is to first match and then exceed human performance in some domain (for example, identifying birds in a tree in the case of computer vision, or matching birds to calls in the case of audio analysis), ethics is far from a solved problem. At the same time, however, AI is a transformative technology on the scale of the industrial revolution, and its impacts will reverberate throughout society. If we want the transformation that we bring about, and experience, to be a transformation for the better, it is imperative that we firmly ground AI in ethics. \n\nProminent ethicists disagree about what is right and wrong in a range of situations, and even about how we best determine right from wrong. In the utilitarian tradition for example, what is ethical is what provides the greatest utility, or happiness, for the greatest number of people. In this view, introducing some suffering with an AI may therefore be tolerated if it is outweighed by the overall happiness gained. Immanuel Kant's ethics, on the other hand, strictly forbid using any person as merely a means to some other end, a bar recent AI deployments have not surmounted. For the existentialists, acting ethically means acting authentically, and allowing others to decide your action for you is considered bad faith. A closed system with no ability to explain its recommendations may therefore be a troubling aspect of AI for the existentialist. For the virtue ethics of the ancient Greeks, acting ethically meant cultivating virtuous character traits, and so a virtue ethicist may place more emphasis on how an AI encourages its users to develop their own virtuousness. \n\nIn this essay, we will review the recent progress in AI ethics. Noting the wide range of ethical belief systems, of which we have briefly reviewed only a small sample of Western ideas above, we will treat 'AI ethics' as an umbrella term for developing intuitions about the morality of AI, without tethering ourselves to a specific tradition. In that spirit, we review the ethical frameworks under construction for human-centered AI, explicable AI, Green AI, and the emerging regulatory environment. \n\nHowever, for all of the good work in charting a virtuous course for developers, corporations and users to follow, AI ethics are still more often seen in the breach than the observance. Hence, we also review the current trends in the challenges plaguing AI, including exploitation, intellectual property and theft, deception and the increasing number of military applications of AI. We conclude by acknowledging the costs associated with behaving ethically, and make a case for why we should choose to incur those costs rather than choosing to act unethically.\n\nThere is a lot to cover! While we embrace the breadth of the topic, we must note that we have chosen not to focus on some of the enduring pitfalls, such as bias and fairness, that have been well described in the literature. This should not be taken as a claim that the problem of entrained bias is resolved; merely a recognition that it is not the _only_ ethical problem we must address.\n\nBut first, let us address the elephant in the room.","metadata":{}},{"cell_type":"markdown","source":"## 1.1 Skynet\n\n> _\"As flies to wanton boys are we to the gods; they kill us for their sport!\"_\n>\n> Shakespeare, _King Lear_\n\nRecently, a spate of [open](https://futureoflife.org/open-letter/pause-giant-ai-experiments/) [letters](https://www.safe.ai/statement-on-ai-risk) have called for caution in training powerful new AI, warning that developing a super-powerful artificial general intelligence poses an extinction-level threat to humanity ([Future of Life Institute, 2023](#Future2023Pause); [Center for AI Safety, 2023](#Center2023Statement)). These letters go on to argue that a commensurate level of attention ought to be paid now to prevent this threat from materialising, and have garnered the supporting signatures of a number of influential leaders in AI, as well as some prominent technology entrepeneurs. \n\nThis malicious (if hypothetical) AI shares much in common with the villainous AI from James Cameron's _The Terminator_, Skynet, which makes it a useful shorthand for the idea that a sufficiently powerful and self-aware AI will one day be motivated to destroy humanity.\n\nIt is of course theoretically possible that we might one day build Skynet, and theoretically possible that Skynet then goes on to destroy or enslave us all. Yet in almost the same breath that the authors of these open letters bring this risk into our consciousness, they appear to downplay it; OpenAI for example, whose ChatGPT model has done much to fuel the discussion and who have been prominent supporters of the call for safety, have in no way altered their day-to-day business of building more powerful AI models. A cynic might suggest that the warning of how potent AI can be, issued by among others leading AI merchants, is aimed not to the industry itself, but rather at potential _customers_ (look how powerful our systems are, and imagine what they could do for you!), and policymakers (look at how well we self-regulate, we're busy mitigating future harm - go easy on us in the legal regulations!).\n\nUnfortunately, these calls are ultimately self-serving, and a distraction from the many ethical issues, like exploitation, theft, and deception, that are problematic in AI deployment at scale today. Worse, in the present moment, there is a proliferation of events just as dangerous as a Skynet, from nuclear war, to the next pandemic(s!), to climate change, all of which demand our urgent attention. It is revealing that many of the signatories are so comfortably ensconced in the benefits of AI projects that nothing short of the total destruction of humanity is likely to impose a cost on them, personally. \n\nHence, we find these calls are made in bad faith. It would be extremely irresponsible to divert time and attention away from the urgent issues facing both AI and the world at large, to defend against what is, for now, only possible in our nightmares. \n\nIronically, the most effective way of preventing the emergence of a Skynet may be to ground AI development in morality and ethical tradition, something the alarmist calls do not appear to have considered. Fortunately, while much work remains, much has been accomplished recently.","metadata":{}},{"cell_type":"markdown","source":"# 2. Recent progress in AI ethics\n\nIn the last decade, as AI deployments began, bias and fairness were the ethical concerns in the forefront of most discussions. Misuse of early AI applications in the policing, judicial, and financial sectors were all found to be discriminatory, some egregiously so (see [Mehrabi et al., 2021](#mehrabi2021survey), for a review). Concern about users being directly exposed to vilification or offensive imagery followed soon after; early chatbots trained on social media extracts sometimes learned from toxic comments that remained in the datasets. In one memorable example, a bot deployed by Microsoft with the facility to learn from user interactions was swiftly trained by mischevious users to spout hate speech ([Hunt, 2016](#Hunt2016Tay)).\n\nThe injustices that stemmed from this period partly motivated the search for an ethical framework in which to embed the discipline of AI, and a doctrine of fair use for AI. In the three years from 2016 to 2019, 74 different organsiations and government agencies published policy guidelines into responsible or ethical use of AI ([Jobin et al., 2019](#Jobin_2019)); many more have followed suit since. A synthesis view of the emerging policy literature identified the broad themes for ethical AI as generally aligning with the principles of bioethics - benevolence, non-maleficience, autonomy and justice - with the addition of one new principle, explicability ([Floridi et al., 2018](#floridi2018ai4people)). Importantly, it is this fifth element, explicability, which _enables_ achieving the other four principles. ","metadata":{}},{"cell_type":"markdown","source":"**Table 1**: A summary of the bioethics principles, and the additional principle suggested for AI ethics (highlighted in orange).\n\n| Principle | Description |\n|:----------|:------------|\n| Benevolence | The new technology should provide a benefit for people. |\n| Non-maleficience | The new technology should not cause harm. |\n| Autonomy | People should have the right to choose whether they interact with the new technology. |\n| Justice | The benefits arising from the new technology should be shared fairly and equitably. |\n| <font color=\"orange\">Explainability </font> | <font color=\"orange\">Decisions and outcomes arising from an AI must be transparent to all involved.</font> |","metadata":{}},{"cell_type":"markdown","source":"To translate these principles into achievable goals, [Floridi et al. (2018)](#floridi2018ai4people) codified 20 action points across the four domains of assessment, development, incentivisation and support, to provide a clear roadmap for developers.\n\nBut guidelines are not by themselves sufficient; a contemporary study suggested that ethics guidelines did not actually alter developer behaviour at all ([McNamara et al., 2018](#mcnamara2018does)). This disconnection between scholarship and practice was further lamented by Hagendorrf ([Hagendorff, 2020](#hagendorff2020ethics)), who noted a lack both  of reinforcement for positive ethics, and of any consequences for unethical behaviour.\n\nThe need for ethics in AI development is more urgent than ever.  In [2021, Bossmani et al.](#bommasani2021opportunities) noted that the class of multimodal 'foundation' models opens an incredibly large space of secondary applications, and with that, a large threat surface for misuse or inequity. At the time of writing, the authors had GPT-3 specifically in mind; since then, with the advent not just of GPT-4, but of competing Large Language Models (LLMs), of the weights allowing open development of the LLaMA family  of of LLMs, of Stability AI's Stable Diffusion releasing an open base for anyone to fine tune, the era of the foundation model has well and truly arrived. ","metadata":{}},{"cell_type":"markdown","source":"## 2.1 Policy, Frameworks, and Regulation\n\n> _\"The fairest rules are those to which everyone would agree if they did not know how much power they would have.\"_\n>\n> John Rawls, in _A Theory of Justice_\n\nWhere the AI community does not regulate its own behaviour, governments may step in to do so. \n\nFollowing the proliferation of AI policies in organisations and local governments (tracked in [Jobin et al., 2019](#Jobin_2019), for example), and perhaps the observed poor adherence to optional guidelines, state, national, and transnational governments have begun drafting regulation of their own. Led by Europe and the US, which alone passed nine laws involving artificial intelligence just in 2022, lawmakers across the globe are reaching for policy instruments to shape the behaviour of the emerging AI industry ([Maslej et al., 2023](maslej2023ai)).","metadata":{}},{"cell_type":"code","source":"import matplotlib as mpl\n\n# Customise colours\ncustom_palette = mpl.colormaps['OrRd'].resampled(23)\nnew_colours = custom_palette(np.linspace(0, 1, 23))\n\n# flat grey for 0 laws passed\ngrey = np.array([0.95, 0.95, 0.95, 1.0])\nnew_colours[0, :] = grey\n\nnew_cmap = mpl.colors.ListedColormap(new_colours)\n\n# Chart\nfig, ax = plt.subplots(1, 1, figsize=(12, 8))\n# Put lines around each country regardless of whether it is in our sample\ncountry_df.plot(color='w', ec='k', ax=ax)\n# Then plot the number of AI legislations\ncountry_df.plot(column='Number of AI-Related Bills Passed Into Law', cmap=new_cmap, ax=ax, legend=True,\n               legend_kwds={\n                   \"location\":\"bottom\",\n#                    \"shrink\":.5\n                },)\n# Format chart\nsns.despine(left=True, bottom=True)\nax.get_xaxis().set_visible(False)\nax.get_yaxis().set_visible(False)\n# plt.colorbar(mpl.cm.ScalarMappable(cmap=new_cmap), ax=ax)\nax.set(title='Number of AI-related bills passed into law by country, 2016-2022')\nplt.tight_layout()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-07-08T07:37:39.615471Z","iopub.execute_input":"2023-07-08T07:37:39.615888Z","iopub.status.idle":"2023-07-08T07:37:40.181523Z","shell.execute_reply.started":"2023-07-08T07:37:39.615855Z","shell.execute_reply":"2023-07-08T07:37:40.180215Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"fig-laws\"></a>**Figure 1**: The number of AI-related bills passed into law by country, indicated by country colour ([Maslej et al., 2023](#maslej2023ai)).","metadata":{}},{"cell_type":"markdown","source":"While the G7 countries have called for international technical standards for the fair use and development of AI ([Komiya and Mukherjee., 2023](#Komiya2023g7)), in practice, nations currently have widely different approaches. Italy, for example, banned ChatGPT; albeit temporarily, until it could satisfy existing Italian regulations around privacy and protection of minors ([Pollicino and De Gregorio, 2023](#Pollicino2023chatgpt)). Meanwhile, at the other end of the spectrum, Japan is effectively excusing developers from copyright infringements incurred in collecting data for model training ([Lanz, 2023](#Lanz2023ai)).\n\nThe most comprehensive set of AI regulation so far may be the European Union's (EU) [AI Act](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=celex%3A52021PC0206), which passed in mid-June and is expected to be in force by the end of 2023 ([Sharp, 2023](#Sharp2023eu)). This bill will augment existing EU prtections enshrined in the General Data Protection Regulation (GDPR) and the Digital Services Act (DSA), creating a set of increasingly strict guidelines as applications rise in perceived risk. \n\nHowever, scholars have already pointed to concerns about the new regulation. Significantly, the regulation was in large part drafted before the recent advent of powerful and popular generative AIs including ChatGPT and Midjourney, and while progress of the legislation was expedited in response, the machinery of the regulation may not be fit for purpose in controlling the enormous potential of such models ([Hacker et al., 2023](#hacker2023regulating)). For example, the risk category an AI application may fall into in the AI Act is based largely on the developer's outlined use case, but large generative models such as ChatGPT can be put to an enormous number of both good and bad faith applications by inventive users, and it is these rather than the stated design goals which currently reflect the _actual_ risk of an AI model ([Helberger and Diakopolous, 2023](#helberger2023chatgpt)).\n\nWhile well-meaning, the regulation may also have unintended consequences. [Hacker et al. (2023)](#hacker2023regulating) point out that particularly strict or onerous regulation can have the effect of stifling new entrants to the market, as smaller operators cannot afford the costs of showing compliance; in turn, this amplifies the power of the well-entrenched and heavily monied established players, creating a dangerous hegemony that ultimately leads to further exploitation of citizens, users, workers and creators. One can imagine this is the future that the big technology companies curently speculating about the role AI may play in ending the world are hoping to achieve. \n\nWell aware of the incoming regulation in Europe and abroad, technology companies have been busy preparing the ground. Perhaps of most note, OpenAI have been lobbying the EU to have ChatGPT excluded from the 'high-risk' category; a farcical addendum to the cries of 'Skynet is coming!' ([Perrigo, 2023](#Perrigo2023exclusive)). But there are other ways to reduce their potential liabilities. Both OpenAI (for ChatGPT) and Stable Diffusion, for example, have taken to enumerating a range of guidelines, end user obligations, and 'prohibited' uses, all of which may be used to carve out sections of the AI Act that they no longer need demonstrate compliance with, by displacing all responsibility for bad faith misuse with the user ([Helberger and Diakopolous, 2023](#helberger2023chatgpt)).\n\nPerhaps, the question that AI regulation must ultimately resolve is who requires protection from who.","metadata":{}},{"cell_type":"markdown","source":"## 2.2 Explainable AI\n> _\"Who watches the watchers?\"_\n>\n> Attributed to Juvenal, in _Satires_\n\nThe importance of explicability to an ethical implementation of AI has spawned a movement towards explicable AI (sometimes shortened to XAI), which has seen considerable interest, with hundreds of papers published in the last three years ([Ali et al., 2023](#ALI2023101805)). Following a foundational survey elaborating methods to explain a wide variety of 'black box' models ([Guidotti et al., 2018](#Guidotti2018)), a number of studies focus on case studies implementing XAI in a range of industries, from healthcare, energy and cybersecurity to the social sciences; still more attempt to improve on explainer methods, or creating explainable alternatives to existing black box models. The wealth of research has been matched by a plethora of software options to implement various types of explainability, at different levels of the AI development lifecycle, but unfortunately among this cornucopia it is not always clear which options are the strongest! Against this backdrop, another stream of research is simply classifying the available tools to their use cases, explaining the explainers, as it were (see [Dwivedi et al., 2023](#dwivedi2023explainable) for a strong recent example).\n\nThese works show, and in many cases address, that explainability exists in four different levels of the AI system; being able to explain a) the data, b) the model, c) the model outputs, and d) how to assess the explanations themselves. Critically, explaining a model underpins building and maintaining _trust_ in an AI, both from an internal persepctive (\"should we use AI to attempt to improve a business-critical process?\"), and from both users and regulators of a deployed AI tool ([Ali et al., 2023](#ALI2023101805)).\n\nIs this painstakingly earned trust warranted? Trusting that an AI does what it claims to do, in the way it claims to do it is one thing. We may also use the detailed explanation of the model (and it's lifecycle) to inform our view on whether the AI is able to meet the other pillars of beneficience, non-maleficience, autonomy and justice.\n\nHowever, recent work is recognising that even these principles are culturally relative, and that the frontiers of both AI and AI ethics research have been filtered through a very Western point of view (see [Kiemde and Kora, 2022](#kiemde2022towards); [Huang et al., 2022](#huang2021centering) for example). Some go so far as to posit that AI could be the forefront of a new wave of neocolonialism; China's digital expansion into Africa is also frequently cited as the beginnings of the same. To ensure AI provides a benefit for everyone, two things are needed; a willingness to listen and adapt to cross-cultural experience, and a more universal grounding of fundamental ethical principles.\n\nOne possible foundation is the United Nations' Universal Declaration of Human Rights (proposed by [Prabhakaran et al., 2022](#prabhakaran2022human)). With broad (if not truly universal) consensus, it may provide our best hope of a common base from which to build. Critically, as [Prabhakaran et al. (2022)](#prabhakaran2022human) note, using human rights as a base for ethical AI development transforms 'consumers' and 'affected persons' into 'rights holders', demanding a higher level of respect.\n\nWhile respect for other humans is the most basic requirement of an ethical AI framework, we must also recognise and respect that AI development has broader consequences or ourenvironment.","metadata":{}},{"cell_type":"markdown","source":"## 2.3 Environmental Impact, and Green AI\n\n> _\"Look after the land and it will look after you; destroy the land and it will destroy you.\"_\n> \n> Aboriginal proverb\n\nAn increasing volume of scholarship recognises the growing energy costs of training ever-larger AI models, and the impact to our environment that follows. In [2019, Strubell et al.](#strubell2019energy) quantified the emissions generated from training NLP models, finding even training a single large language model produced similar emissions to trans-American flights; no doubt, with language models becoming much larger even in the last four years, so have their carbon footprints ([Strubell et al., 2019](#strubell2019energy)). This is particularly egregious when large models are retrained, with colossal energy input, to produce a new iteration with a barely perceptible improvement in accuracy. And while a single training instance is typically much more costly than a single inference instance, as the penetration of AI continues to grow, the lifetime energy consumption of inference may eclipse the training costs by many times ([Desislavov et al., 2023](#desislavov2023trends)).\n\nAll of this energy expenditure, and concomitant carbon emissions, serves to fuel the growing climate crisis. Finding more environmentally aware techniques to develop AI without fuelling further destruction is thus an important direction in creating ethical AI. This is especially salient when we consider that, as [Bender et al. (2021)](#bender2021dangers) point out, the people most at risk from direct climate harm are unlikely to be the same people who directly benefit from the latest state-of-the-art AI models that currently contribute to that harm ([Bender et al., 2021](#bender2021dangers)). Instead, the benefits of the new era in digital technologies such as AI must be be moderated by transformation in climate-friendly technology and policy ([Bianchini et al., 2023](#bianchini2023environmental)).   \n\nCritically, many authors now call for transparency in reporting energy costs, and assert that the energy efficiency of a model should be reported among the headline figures, together with model accuracy (see [Schwartz et al., 2020](#schwartz2020green), [Henderson et al., 2020](#henderson2020towards), and [Yarally et al., 2023](#yarally2023uncovering)). [Schwartz et al. (2020)](#schwartz2020green) dub AI research that is aware of and actively seeks to limit excessive energy consumption <font color='green'>_Green_ AI</font>, while tagging the research that pays no heed to this challenge <font color='red'>_Red_ AI</font> (ibid). Efforts to surface energy consumption of model and AI training and use have been aided by improvements in measuring the consumption of energy, and attribution of energy use to different parts of both lifecycle and model architecture ([Caspart et al., 2023](#caspart2023precise)), and an improved understanding of which cloud compute providers are able to leverage cleaner power sources ([Escribano Perez, 2023](#escribano2023energy)).\n\nEncouragingly, several studies working towards <font color='green'>Green AI</font> identify a number of shifts in design thinking that can reduce the energy consumption without compromising model performance. Pruning deep neural networks to reduce layer complexity can reduce total energy consumption by as much as half, with little or no impact on accuracy ([Yarally et al., 2023](#yarally2023uncovering)). For example, rectified linear unit (ReLU) nodes are significantly more energy-efficient than convolutional or linear transformation layers (ibid). [Yarally et al. (2023)](#yarally2023uncovering) also note a general trend of diminishing returns in accuracy from energy expenditure past a certain point, in training and also pre-training optimisation exercises. \n\nDiscussion of energy efficiency is not limited to training or optimisation. [Mehlin et al. (2023)](#mehlin2023towards) produced a comprehensive review of advances in understanding energy consumption at each stage of the ML lifecycle,  surfacing recommendations in domains from infrastructure, choice of model and supporting library, to data collection, modelling, training and deployment. ","metadata":{}},{"cell_type":"code","source":"# Plot the carbon emissions for model training against some comparators\ncarbon_plot = sns.barplot(data=carbon_df, x='CO2 Equivalent Emissions (Tonnes)',\n                          y='Model or Real Life Example', hue='CO2 Equivalent Emissions (Tonnes)',\n                        palette='OrRd', dodge=False)\n# Format chart\ncarbon_plot.set(title='Putting carbon emissions from model training in context',\n             )\nsns.despine(left=True)\nplt.gca().get_legend().remove()","metadata":{"execution":{"iopub.status.busy":"2023-07-08T07:30:55.423596Z","iopub.execute_input":"2023-07-08T07:30:55.424018Z","iopub.status.idle":"2023-07-08T07:30:55.931738Z","shell.execute_reply.started":"2023-07-08T07:30:55.423988Z","shell.execute_reply":"2023-07-08T07:30:55.930685Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"**Figure 2**: Equivalent carbon emissions generated by training large modern models, placed in context against air travel, car usage, and general annual emissions per person ([Luccioni et al., 2022](#luccioni2022estimating), [Strubell et al., 2019](#strubell2019energy); in [Maslej et al., 2023](#maslej2023ai)).","metadata":{}},{"cell_type":"markdown","source":"Perhaps we can use existing AI to help us optimise energy-efficient development of further AI. One of the most time, compute and energy intensive steps of the ML training process is finding the combination of models and hyperparameters that will provide the best results for the problem at hand. A new tool, Kannan et al.'s Green Runner, uses an AI to optimise a Bayesian search across models and hyperparameters to find a middle ground between ultimate performance and efficient use of resources ([Kannan et al., 2023](#kannan2023green)). Interestingly, the Green Runner makes use of GPT-4 to provide a baseline weighting of performance tradeoffs, which can then be customised further by the user prior to embarking on the search; the energy used by the call to the GPT-4 API is presumably offset by the overall savings of the approach. \n\nThis is a promising development, but is limited by the ability to access the model. Many companies (not to mention government organisations!) will baulk at the requirement to send a sample of their precious data to an external website, and while it is possible to work around some of these security concerns (for example, cryptographically obfuscating the actual data transferred, and anonymising both records and feature identifiers), the process will need to be _easy_ to be widely adopted. The ideal might be integration with cloud compute providers, such that companies already using cloud services can simply include the tool in part of their model discovery pipeline; however, as most such providers charge by compute used, providing a simple service to economise this is unlikely to be an attractive proposition.\n\nMore generally, the field of <font color='green'>Green AI</font> faces the same big challenge as action against climate change; convincing the big emitters that it is in their interest to improve their behaviour. While there are other benefits that accrue to the community from using less energy to train ML models beyond the environmental (for example, results will be easier to replicate and thus validate, and accessibility is greatly improved), large technology companies may view these community benefits as a net negative, eroding their ability to monetise their AI products. Making the leap from understanding of energy-efficient approached to deep learning to widespread adoption is therefore the next frontier of <font color='green'>Green AI</font>, and one which must be driven by the AI community.","metadata":{}},{"cell_type":"markdown","source":"# 3. Current challenges for AI ethics\n\nDespite advances in understanding how to develop, train, and deploy AI in an ethical way, when we observe current trends in AI, we find many troubling issues persist; and as we deploy ever more powerful AI models, we discover new potential for misuse, and the threat horizon from unethical behaviour (of both developers and users!) spreads still further. \n\nIn this section, we illuminate some problems that arise from use of AI. We focus on issues that have emerged or moved into sharper focus in the last two years, coinciding with the latest generation of AI models: theft and copyright infringement, exploitation of workers, deception, and the increasing military uses for AI. ","metadata":{}},{"cell_type":"markdown","source":"## 3.1 Copyright & Theft\n\n> _\"Art is not what you see, but what you make others see.\"_\n>\n> Edgar Degas\n\n2022 was a big year for AI image generation, with the release of DALL-E 2, Stable Diffusion, and Midjourney, all of which can created highly detailed images in a range of styles from a simple text prompt.\n\nArtists, particularly those who found their work had been included in AI models without their prior knowledge or consent, were less enthused (for an example, see [Baio, 2022](#Baio2022Invasive)). Anyone can now in a matter of seconds create a facsimile emulating an artist's personal style. For the artistic community, who spend years or even decades honing their craft, the unauthorised and uncredited use of their prior work to fuel the engine that might now replace them is no better than base theft (see [Xiang, 2022](#Xiang2022Artists), for some more commonly cited objections).\n\nThese three image generation models were trained on data scraped from the internet, specifically, image-text pairs. Stable Diffusion used the LAION dataset, an open resource containing 5.85 _billion_ such pairs derived from the Common Crawl web archiver ([Schumann et al., 2022](#schuhmann2022laion), [Somepalli et al., 2023](#somepalli2023diffusion)). Midjourney and DALLE-2 are more coy about their exact sources, but adopt the same basic approach. Popular art sharing websites, such as Artstation or DeviantArt, were particularly useful sources. Notably, while all three applied filtering to reduce the number of pornographic or graphically violent images, none adopted an attributive or copyright-aware filter (although DALL-E's developers did at least attempt to limit wholesale reproduction of training images; [Nichol, 2022](#Nichol2022DALL)). \n\nTo the dismay of many creators, accessing, and scraping, publicly available data on the internet is not commonly considered a breach of copyright (an American appeals court upheld this view last year; see [Whittaker, 2022](#Whittaker2022Web)). However, sometimes, a generative AI may reproduuce images that are substantially similar to, or even outright copies, of material in its training data in a way that _does_ breach copyright ([Somepalli et al., 2023](#somepalli2023diffusion); [Webster, 2023](#webster2023reproducible)). 'Attacks' that seek to expose specific items in thetraining set are one way for artists to demonstrate that their work was incorporated into the training data of a generative AI, particularly those that do not reveal all of their sources. But beyond laying bare the ethical difficulty of relying on other's uncompensated work, generations that actually do breach copyright present a legal difficulty for the generative AI's developer's, and may also harm end users, who can unwittingly breach copyright in the process of generation, inadvertantly breaching guidelines of fair use ([Henderson et al., 2023](#henderson2023foundation)). This legal issue has given rise to some innovative remediations, including models such as Forget-Me-Not that can selectively remove material about which concerns have been raised from an image generation model _ex post facto_, without compromising it's ability to create generic images of that type ([Zhang et al., 2023](#zhang2023forgetmenot)). \n\nArtists, however, are also finding new ways to fight back. Notably, beyond petitions, protests and lawsuits (eg, the mass Artstation protest, described by [Xiang, 2022](#Xiang2022Artists)), some are turning _to_ AI to help protect them _from_ AI. Glaze is a model developed to shield an artist's style from simple mimicry by generative AI models ([Shan et al., 2023](#shan2023glaze)). By making perturbations in the latent space of the artist's image, it promises to disrupt the latent diffusion family of generative models, without significant visual impact (ibid). Hence, the artist may share their (Glazed) work, without fear that the work will be used to specifically emulate their style in a future AI deployment - at least, while the latent diffusion paradigm holds. Should enough artists become dependent on such AI protection however, one can easily imagine an arms race, with newer AI products being developed to crack the disruption, necessitating new developments in protective AI.\n\nWhile image generation and artist backlash may have been the most public example of AI development taking public, but not necessarily public domain, content for its own ends, it is occurring across other generative AI domains too. GitHub's copilot, a generative model for suggesting code options to programmers, is at the time of writing being sued for breaching both copyright and privacy by building its model on data scraped from users of the site ([Claburn, 2023](#Claburn2023Github)). The music industry is facing a wave of AI generated music trained on the vocal styles of famous artists. Famously protective of their copyrights, Big Music is likely to fight AI generated music tooth and nail, despite the distinction in rights for songwriting and sound recording making it harder to argue a clear case of infringement ([Sato, 2023](#Sato2023Drake)). \n\nAt least one artist has successfully flipped the script; techno-pop singer Grimes, who announced that she would be happy for fans to make use of her voice in AI generated music, in exchange for 50% of any royalties that followed ([Paris, 2023](#Paris2023Grimes)). Not only that, but she has released a [model trained for just that purpose](https://elf.tech/connect), harkening to the idea that ultimately AI may not replace people, but rather people who use AI will replace people who don't.\n\nFor now at least, while it remains legal to scrape public data from the internet, questions remain about whether it is _moral_ to use others' publicly shared work for such unintended purposes. Some researchers call for more responsibility in developing AI generated content, and frameworks for doing so are beginning to emerge (see [Chen et al., 2023](#chen2023pathway), for example). Collecting and curating training data in a human-centric way, and ensuring the final model is explicable and open about its sources, will also help to mitigate future harms. But with the big three image generation models already released into the wild, there is the real prospect that the horse may already have bolted, and a corresponding fear that the exploitation baked into the system may become irrevocable. ","metadata":{}},{"cell_type":"markdown","source":"## 3.2 Exploitation\n\n> _\"Act in such a way that you treat humanity, whether in your own person or in the person of any other, never merely as a means, but always at the same time as an end.\"_\n>\n> Immanuel Kant, in _Fundamental Principles of the Metaphysics of Morals_\n\nCreatives and artists, with their passion for the work they do, are notoriously vulnerable to exploitation (see [Giblin and Doctorow, 2022](#giblin2022chokepoint), for a horrifying litany of abuses). But they are far from the only people at risk of systematic exploitation in the name of AI.\n\nMuch of ML uses 'supervised' training, where a generated prediction is compared to a ground truth label. Despite advances in NLP and image recognition, this label is still typically assigned by a human, at least at first. The new craze of reinforcement learning with human feedback (RLHF) makes much of training models to annotate datasets, but as its name implies, still relies on a human in the loop to teach the AI _how_. Thus, labelling the kind of large dataset preferred by modern models still requires significant human effort.\n\nAlthough a large, well-labelled dataset is broadly acknowledged as a tremendous asset, the actual work of labelling can be incredibly tedious and time consuming. As a consequence, many seek to find others to do it for them, and a range of crowdsourcing platforms have arisen to service that need. Amazon Web Service's Mechanical Turk is one of the most prominent, though there are many similar platforms.\n\nUnfortunately, while some of the requests sent to Mechanical Turk offer reasonable rates of payment, many developers take advantage of the lack of rules to offer exploitatively low rates to the people doing their grunt work. Once AWS has taken its cut, the median hourly wage is approximately US$2 per hour, less than a third of the already low American minimum wage (ranked 14th in the OECD; [OECD, 2023](#oecd2023Real); [Hara et al., 2018](#hara2018data)). This 'microwork' model, echoing the endemic exploitation of the gig economy enabled by algorithms such as food delivery crowdwork, was estimated in 2021 to capture 160 million people around the globe, mostly in the Global South, entrapping many who do not earn enough to lift themselves out of poverty ([Casilli, 2021](#casilli2021waiting)). As [Casilli et al. (2021)](#casilli2021waiting) note, the much more commonly discussed fear that AI will take jobs away from people my be less problematic than the 'jobs' that emerge to replace them.\n\nWhile the achievements of LLMs in particular are impressive, one wonders how much credit ought to go to the anonymous multitude of humans slaving behind the scenes.","metadata":{"execution":{"iopub.status.busy":"2023-06-11T11:11:47.647505Z","iopub.execute_input":"2023-06-11T11:11:47.647969Z","iopub.status.idle":"2023-06-11T11:11:47.683527Z","shell.execute_reply.started":"2023-06-11T11:11:47.647932Z","shell.execute_reply":"2023-06-11T11:11:47.682366Z"}}},{"cell_type":"code","source":"# Plot the minimum wages against the average AWS Mechanical Turk hourly rate\nturk_plot = sns.barplot(data=mt_df, x='wage', y='country', hue='source', hue_order=['oecd', 'aws'],\n                        palette=['gray', 'red'], dodge=False)\n# Format chart\nturk_plot.set(title='AWS Mechanical Turk and OECD Minimum Wages',\n             xlabel='Hourly rate ($US)', ylabel=''\n             )\nsns.despine(left=True)\nplt.gca().get_legend().remove()","metadata":{"execution":{"iopub.status.busy":"2023-06-24T10:05:06.534689Z","iopub.execute_input":"2023-06-24T10:05:06.535097Z","iopub.status.idle":"2023-06-24T10:05:07.085462Z","shell.execute_reply.started":"2023-06-24T10:05:06.535062Z","shell.execute_reply":"2023-06-24T10:05:07.084218Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<a id=\"fig-turk\"></a>**Figure 3**: A comparison between the hourly rate achieved by the average worker at AWS Mechanical Turk, and the top 14 minimum wages, by country, in the OECD. Wages are presented as hourly rates, as at 2021, in 2021 $US, converted via exchange rates ([OECD, 2023](#oecd2023Real); [Hara et al., 2018](#hara2018data)).","metadata":{}},{"cell_type":"markdown","source":"In addition to the ethical problem of unfair compensation for services rendered, we should bear in mind the old adage that we get what we pay for. Poporly paid workers are poorly motivated workers, and poor motivation may translate to poorly labelled data, obvious consequences for the final application. Ironically, many oppressed crowdworkers have turned to ChatGPT to assist them in completing the tedious task ([Veselovsky et al., 2023](#veselovsky2023artificial)). Hence, 'RLHF' starts to contain even fewer humans, limiting the ability for future models to surpass the current state of the art by absorbing the biases of the existing models. \n\nWe should note here that not all crowd-sourcing is unfairly paid, and some companies have clearly taken the decision to value specialist labelling appropriately ([Dzieza, 2023](#dzieza2023ai)). However, while a lack of transparency in labeling datasets persists, it will be difficult for the end user or practitioner to know which datasets have been labelled ethically and authoritatively.\n\nIf we truly value our well-labelled datasets, we must value the workers who create those labels. ","metadata":{}},{"cell_type":"markdown","source":"## 3.3 Deception\n\n> _\"Falsehood flies, and truth comes limping after it.\"_\n>\n> Jonathan Swift\n\nWhen ChatGPT was released in 2022 to an unprepared world ([OpenAI, 2022](#openai2022introducing)), many people  took its confident pronouncements as authoritative statements of fact. Unfortunately, a deluge of reports have since surfaced of people finding out about ChatGPT's 'hallucinations' the hard way. \n\nWhile it may not be obvious from the presentation of Large Language Models (LLMs) such as ChatGPT, these models are not designed to police their statements for any kind of relationship to truth. Rather, they intend to create responses that sound as though they could have been written by a human. Warning of the risks, [Bender et al. (2022)](#bender2021dangers) memorably describe LLMs as 'stochastic parrots', and are careful to note that while the LLM architecture supports natural language _processing_, it is not in any way capable of natural language _understanding_. As it is this understanding that is critical to perceiving the truth of a statement, for now at least, that role must remain between the monitor and the chair. The danger of deception arises when this distinction between an AI's actual capabilities and the hype is lost.\n\nDeception, as an emerging ethical risk from AI deployments (especially, but not limited to LLMs), can be incurred in a number of ways. The first of these can be considered epistemic deception; the philosopher Daniel Dennett contends that labelling a machine learning model an 'artificial intelligence' is itself deceptive, as even our most advanced models fall short of anything that could be considered human-like intelligence. Thus, encouraging people to treat with models as if they were intelligent, rather than mere tools, opens the door for further misundertanding and deceit ([Brockman et al. 2023](#brockman2023superintelligence)).\n\nSecondly, an AI may directly deceive users by quoting 'facts' with no basis in reality, inventing citations, or any other number of false assertions. While some of these are obviously spurious and can be dismissed out of hand, for example those prompts intended to evoke a humorous false response, others have appeared sufficiently convincing to cause further harm. Some widely reported cases include a lawyer who inserted imaginary precendents from ChatGPT into his briefing ([Bohannon, 2023](#Bohannon2023lawyer)), and a university professor who failed most of his class when ChatGPT claimed to have authored their papers ([Ankel, 2023](#ankel2023prof)). Futhermore, ChatGPT assumes no accountability or legal responsibility for such misleading usage.\n\nThese are ways in which an AI itself can be deceptive, but also problematic are the ways in which LLMs enable further deceptive behaviours. The most immediately recognised of these was the potential for deceptive authorship, or more simply, using ChatGPT to do our homework. While doing so is not without risks (for example, falling foul of the moddel's propensity to make up facts, or facing disciplinary action for cheating), the option remains attractive for use cases that will save significant amoujnts of work, and especially in contexts where it is unlikely to be easily caught out. Using LLMs in such a way, without acknowledging the usage, amounts to the user deceiving their audience about the provenance of their work.\n\nFinally, LLMs amplify the ability of malicious actors to use deception to accomplish their goals, ranging from fraud and scams through to mass disinformation. Reviewed extensively by [Sison et al. (2023)](#sison2023chatgpt), the ability to generate human-sounding text at will, for minimal marginal cost, provides these threat actors an almost unparalleled opportunity to saturate the digital environment, or even craft customised entrapment _en masse_. Consider the amount of noise and misinformation that currently plagues online platforms, on topics ranging from medical advice to politics, and then imagine the near future, where motivated agents are able to '10X' themselves with the aid of LLMs.\n\nThe potential for deception, both created and enabled by modern AI, is horrifying in scope. Against this backdrop, research in detecting and flagging AI generated media is progressing (for example, see [Mitchell et al., 2023](#mitchell2023detectgpt); [Mitrović et al., 2023](#mitrović2023chatgpt)). However, even such detectors create ethical risks themselves, such as flagging false positives, and inappropriately censuring content that may actually represent an author's own hard work. How we bridge the gap between responsible use of this new AI technology and mitigating the harms of its misuse may well be the story of the early 21st century.","metadata":{}},{"cell_type":"markdown","source":"## 3.4 Military applications of AI\n> _\"Any tool is a weapon, if you hold it right.\"_\n> \n> Ani DiFranco\n\nThe private sector isn't the only sector entranced with the possibilities that AI promises to bring to the table. Military-industrial complexes around the world are paying attention to developments in this space, and some are learning quickly.\n\nAutonomous weapons, or 'killer robots', have been a prominent source of ethical concern in millitary AI for some time; the Future of Life Institute published an open letter as long ago as 2016 calling for a ban on autonomous weapons, and they are far from alone [Future of Life Institute, 2016](#Future2016Autonomous). The topic has been reignited by the heavy use of drones in the Russo-Ukraininan war ([Chávez, 2023](#chavez2023learning)). Drones are certainly a priority for militaries across the globe ([Hambling, 2021](#Hambling_2021)), and a locus for active research into extending their capabilities (for example, see [Lee et al., 2022](#lee2022situationaware)). However, more general use cases for AI are also giving rise to military applications.\n\nOne example of learning digital lessons from the private sector comes from the Ukrainian GIS Arta app, which uses geographic information systems (the 'GIS' in the name) to coordinate artillery fire missions. Individual artillery pieces are automatically  matched with requests for supporting fire in real-time, in a fundamentally similar way to the way rideshare or meal delivery apps match fares and deliveries with drivers ([Kobzan, 2022](#kozban2022gis)). The technology developed by data scientists to efficiently match assets and clients in geographic space was harnessed for use on the battlefield.\n\nLLMs, too, are being investigated for battlefield usages. Palantir have developed an application that uses three LLMs and claims to quickly summarise trends in the emerging battle space based on aggregating chat across domains at AI speed [(Ng, 2023)](#ngbatch). While creating tactical advantage - if the issues of AI deception mentioned above can be resolved - not much imagination is required to see the potential such a system may have in an authoritarian regime to identify and suppress dissidents. Indeed, hitherto one of the most useful limitations of widespread surveillance has been the requirement for a watcher to review the generated material; if we automate that, we risk opening the door for all manner of repression.\n\nThese are just two examples where AI is, or will soon, be a source of direct military advantage. The United States military is investing not just in AI projects, but in an entire ecology to deliver AI at scale ([Bono and Patel, 2023](#Bono_Patel_2023)). China's Peoples Liberation Army views AI as a warfighting domain, 'cogitive warfare', supplementing the traditional air, land and sea domains, and is accelerating acquiring AI capability accordingly ([Wortzel, 2022](#wortzel2022chinese)). Russia, too, is invested in 'information warfare'. This may take the form of mass disinformation (so-called 'psyops') at a scale unimaginable before enablers like LLMs, autonomous weapons, battlefield intelligence monitoring, or as yet uninvented horrors.\n\nGiven the diversity of potential military applications for AI beyond direct lethality, there have also been calls for arms controls on broader applications of artificial intelligence ([Scharre and Lamberth, 2022](#scharre2022artificial)). While the range of possible uses makes defining and enforcing what is actually banned harder to achieve, [Scharre and Lamberth (2022)](#scharre2022artificial) propose a range of starting considerations, including restricting the use or posessions of platforms such as small drones that might be easily weaponised with AI, or even restricting compute or the chips and semiconductors required to physically furnish that compute. \n\nArms controls can work when states mutually agree that they do not want to suffer from a type of weapon being used against them, and are willing to forgo using such weapons themselves to achieve those ends ([Scharre and Lamberth, 2022](#scharre2022artificial)). While military exploitation of AI is already occurring, it may not yet be too late to prevent the adoption of fully autonomous weapons by militaries around the world.","metadata":{"execution":{"iopub.status.busy":"2023-05-28T01:47:37.515690Z","iopub.execute_input":"2023-05-28T01:47:37.516033Z","iopub.status.idle":"2023-05-28T01:47:37.520831Z","shell.execute_reply.started":"2023-05-28T01:47:37.516003Z","shell.execute_reply":"2023-05-28T01:47:37.520020Z"}}},{"cell_type":"markdown","source":"# 4. Mind the Gap\n\nWe have seen that we have an increasing understanding of how we should modify our practice to make it more ethical, and yet, we continue to see AI deployments that fall short of these principles in important ways. Why is this the case, and what can we do to encourage broader uptake of ethical behaviour?","metadata":{}},{"cell_type":"markdown","source":"## 4.1 The cost of ethical behaviour\n\nWe must be honest enough to acknowledge that acting ethically often carries a cost. At the individual level, speaking out against popular but immoral practice may see one ostracised by peers, and potential or current employers. Recent high profile cases of respected practitioners shown the door for raising concerns about current organisational priorities (see [Charrington, 2022](#Charrington2022Daring) for example) are unlikely to inspire courage in more junior developers. Even in well-meaning environments, suggesting ways for your collegues to improve the ethical implications of their work may be met with polite obstruction and result in no meaningful change.\n\nAt an organistional level, the company that shelves its AI model due to ethical concerns will likely make less revenue than the company that deploys its AI in spite of ethical shortcomings. The government organisation that parks its AI implementation for a thorough review of fairness and explicability may meet fewer KPIs than the one that pushes an AI into production without such consideration. These costs are amplified by a fear of missing out; as new AI products arise, companies are keen to take advantage of first mover or early adopter benefits, and are desperate to avoid being locked out of the market by competitors. \n\nThese costs are largely short term costs, but are borne privately by the actor who chooses to be ethical. Conversely, the costs of acting _unethically_ are generally socialised, degrading common goods through exploitation to the point of exhaustion. By rewarding or emulating the AI products deployed without regard to ethical considerations around bias, theft, job displacement, environmental pollution, exploitation, and more, we risk normalising harmful practices, and erode common goods as fundamental as the right against discrimination, or the right to fair pay for work.\n\nUntil this assymetry of consequence can be resolved, most likely through legislation or collective action, ethical guidelines will continue to be flouted by institutions optimised towards delivering profit, not value.","metadata":{}},{"cell_type":"markdown","source":"## 4.2 Society vs AI\n\nThese costs of acting ethically are not specific to AI ethics, but are a greater unsolved problem in society. In this light, we ask what AI itself represents, that makes AI ethics an urgent field of study?\n\nAI is the newest wave of automation, a process that has been in train since the industrial revolution, and continues to gather pace. While the early days of automation focussed on replacing physical human labour with machines, since the advent of the computer, automation has begun to replace mental labour with electronics. At first, administration and arithmetic labour were supplemented (and in some cases supplanted). Now, AI offers (or threatens!) to replace _cognitive_ work, and for the first time, _creative_ work, with graphical processing units.\n\nPrevious waves of automation have been much anticipated; a common thread of futurology is the idea that due to increases in productivity, the average person may only have to labour for a few hours a day. In reality, the benefits of automation have tended to accrue upwards, to the capital owners, and the average person finds themselves labouring just as long or longer than their ancestors did, just in different ways. In the same way, the benefits of AI are at risk of being captured by the few, to the cost of the many.\n\nAI itself, while powerful, is unaligned. We note that in many examples, AI is offering solutions to issues or harms seemingly posed by AI; whether the Green Runner helping to optimise energy costs of training ([Kannan et al., 2023](#kannan2023green)), Glaze offering to protect an artist's style from impersonation by Stable Diffusion ([Shan et al., 2023](#shan2023glaze)), or even an AI therapist for filtering harmful content from Large Language Models ([Lin et al., 2023](#lin2023healthy)). The ethical violations we see are largely not committed by AI itself, but rather by AI in service to an ulterior motive, typically profit.\n\nThe distinction is important; were it AI in and of itself that was problematic, the solution would be clear: stop AI. But confusing the issue, and advocating for an end to use and research of AI, would not only prevent us from realising the incredible promise of AI, but also hinder promising attempts to use AI to further mitigate harm in areas that might extend beyond harms caused by thoughtless ML deployments. \n\nInstead, we must emphasise responsible and ethical development of AI. We must work to reduce the misalignment between current practice, and best practice; and cultivate appropriate regulation and legislation to create consequences for misbehaviour without accidentally ossifying legitimate innovation and competition. And because dirty deeds thrive in darkness, we must demand transparency not just from our AI models, but crucially, we must demand transparency from those who implement AI models. \n\nAs practitioners, we must hold ourselves and each other to account. We must protect others from abuses of power within our discipline, and in so doing, protect the discipline itself, so that our societies as a whole may flourish. We must carefully consider the choices that we make, at every stage, and call out those among us who forsake justice and equity. ","metadata":{}},{"cell_type":"markdown","source":"# 5. Conclusion\n\nActing ethically remains far from a solved problem, but we hope to have illuminated in this piece some of the the progress that is being made, together with the pitfalls uncovered by recent developments.\n\nWhile we are still in search of an overarching ethics of AI applicable across cultures, we have a promising start in adding transparency and explainability to the bioethical framework, and grounding in a tradition of human rights. As models mature, we begin to find ways of achieving the same results more efficiently, and we are starting to understand the importance of sustainability for not just our work but for the planet we live on. And policymakers around the world are working to craft appropriate regulations and legislation to embed AI within a set of rules that protects the vulnerable while still promoting innovation.\n\nHowever, as technology continues to lead and morality continues to follow, we find a number of practices that should give pause for thought. Appropriation of vast amounts of uncredited work for training models has unnecessarily inflamed tensions of content creators, who now find themselves cast into an adversarial struggle with AI models that could instead have been an enhancement to their practice. The enormous achievement of generating human-sounding text at will has been eclipsed by the misuses, and the epistemic uncertainty (and misleading marketing) around what models such as ChatGPT are and what they can (and can't) do has wreaked havoc with unwitting users. Further, peering under the hood of RLHF and big dataset labelling reveals the current surge in AI is being fuelled by an underclass of exploited workers, puncturing the illusion that AI alone will bring benefit to all. Finally, military applications of AI no longer belong to some hypothetical future, but are happening now, in ways we may not have expected but must begin to acknowledge and plan mitigation for.\n\nAgainst this backdrop of current challenges, we find the 'doom hype' around artificial general intelligence to be at best misguided. However, there may yet be one useful solution that arises. What will ultimately protect us will be a vision of AI built from the ground up within an ethical framework, rather than retroactively seeking to justify - or forgive - AI deployments well after any damage has already been done. We hope that the current environment, where the incentives are stacked against the fair in favour of the selfish, can yield to a model where developers actively empower the flourishing of others.\n\n---\n\nAI is amazing, and will have far reaching consequences. Sadly, some humans are too easily lured to taking advantage of others. As practitioners, as regulators, and simply as invested citizens, we _must_ be mindful to build the AI future that reflects and enables the best of what makes us human, not the future that falls victim to our worst excesses.","metadata":{}},{"cell_type":"code","source":"%%writefile bibbly.bib\n@article{zhou2023ethical,\n  title={Ethical ChatGPT: Concerns, Challenges, and Commandments},\n  author={Zhou, Jianlong and M{\\\"u}ller, Heimo and Holzinger, Andreas and Chen, Fang},\n  journal={arXiv preprint arXiv:2305.10646},\n  year={2023}\n}\n\n@article{kozban2022gis,\nauthor = {Kobzan, Sergiy},\nyear = {2022},\nmonth = {07},\npages = {347-353},\ntitle = {GIS FOR THE ARMED FORCES OF UKRAINE. TWO COMPONENTS Of VICTORY},\njournal = {InterConf},\ndoi = {10.51582/interconf.19-20.07.2022.037}\n}\n\n@article{chavez2023learning,\n  title={Learning on the fly: Drones in the Russian-Ukrainian war},\n  author={Ch{\\'a}vez, Kerry},\n  journal={Arms Control Today},\n  volume={53},\n  number={1},\n  pages={6--11},\n  year={2023},\n  publisher={Arms Control Association}\n}\n\n@misc{millánarias2022reinforcement,\n      title={Reinforcement Learning for UAV control with Policy and Reward Shaping}, \n      author={Cristian Millán-Arias and Ruben Contreras and Francisco Cruz and Bruno Fernandes},\n      year={2022},\n      eprint={2212.03828},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI}\n}\n\n@misc{lee2022situationaware,\n      title={Situation-Aware Deep Reinforcement Learning for Autonomous Nonlinear Mobility Control in Cyber-Physical Loitering Munition Systems}, \n      author={Hyunsoo Lee and Soohyun Park and Won Joon Yun and Soyi Jung and Joongheon Kim},\n      year={2022},\n      eprint={2301.00124},\n      archivePrefix={arXiv},\n      primaryClass={eess.SY}\n}\n\n@misc{kermode2020objects,\n      title={Objects of violence: synthetic data for practical ML in human rights investigations}, \n      author={Lachlan Kermode and Jan Freyberg and Alican Akturk and Robert Trafford and Denis Kochetkov and Rafael Pardinas and Eyal Weizman and Julien Cornebise},\n      year={2020},\n      eprint={2004.01030},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n\n@article{weidinger2023using,\n  title={Using the Veil of Ignorance to align AI systems with principles of justice},\n  author={Weidinger, Laura and McKee, Kevin R and Everett, Richard and Huang, Saffron and Zhu, Tina O and Chadwick, Martin J and Summerfield, Christopher and Gabriel, Iason},\n  journal={Proceedings of the National Academy of Sciences},\n  volume={120},\n  number={18},\n  pages={e2213709120},\n  year={2023},\n  publisher={National Acad Sciences}\n}\n\n@misc{Bono_Patel_2023, \n  title={PIPELINE AS A PRODUCT: HOW PROJECT LINCHPIN PLANS TO DELIVER ARTIFICIAL INTELLIGENCE FOR THE ARMY}, \n  url={https://warontherocks.com/2023/03/pipeline-as-a-product-how-project-linchpin-plans-to-deliver-artificial-intelligence-for-the-army/}, \n  journal={War on the Rocks}, \n  author={Bono, Nick and Patel, Bharat}, \n  year={2023}, \n  month={Mar},\n  urldate = {2023-06-01}\n}\n\n@article{wortzel2022chinese,\n  title={Chinese Expectations for Biotechnology And Cognitive Enhancement in Future Warfare},\n  author={Wortzel, Larry},\n  journal={Modern War Institute Report},\n  volume={22},\n  number={1},\n  year={2022},\n  publisher={Mdern War Institute}\n}\n\n@article{abdelkader2021aerial,\n  title={Aerial swarms: Recent applications and challenges},\n  author={Abdelkader, Mohamed and G{\\\"u}ler, Samet and Jaleel, Hassan and Shamma, Jeff S},\n  journal={Current robotics reports},\n  volume={2},\n  pages={309--320},\n  year={2021},\n  publisher={Springer}\n}\n\n@misc{Hambling_2022, \n  title={What are drone swarms and why does every military suddenly want one?}, \n  url={https://www.forbes.com/sites/davidhambling/2021/03/01/what-are-drone-swarms-and-why-does-everyone-suddenly-want-one/}, \n  journal={Forbes}, \n  publisher={Forbes Magazine}, \n  author={Hambling, David}, \n  year={2022}, \n  month={Nov},\n  urldate = {2023-06-01}\n}\n\n@article{lazar2017just,\n  title={Just war theory: Revisionists versus traditionalists},\n  author={Lazar, Seth},\n  journal={Annual Review of Political Science},\n  volume={20},\n  pages={37--54},\n  year={2017},\n  publisher={Annual Reviews}\n}\n\n@misc{Future2016Autonomous, \n  title={Autonomous Weapons Open Letter: AI & Robotics Researchers}, \n  url={https://futureoflife.org/open-letter/open-letter-autonomous-weapons-ai-robotics/}, \n  journal={Future of Life Institute},\n  author={{Future of Life Institute}}, \n  year={2016}, \n  month={February},\n  urldate = {2023-06-01}\n}\n\n@misc{Future2023Pause, \n  title={Pause Giant AI Experiments: an Open Letter}, \n  url={https://futureoflife.org/open-letter/pause-giant-ai-experiments/},\n  journal={Future of Life Institute},\n  author={{Future of Life Institute}}, \n  year={2023}, \n  month={March},\n  urldate = {2023-06-02}\n} \n\n@misc{Center2023Statement, \n  title={Statement on AI Risk}, \n  url={https://www.safe.ai/statement-on-ai-risk},\n  journal={Center for AI Safety},\n  author={{Center for AI Safety}}, \n  year={2023}, \n  month={May},\n  urldate = {2023-06-02}\n}\n\n@article{scharre2022artificial,\n  title={Artificial Intelligence and Arms Control},\n  author={Scharre, Paul and Lamberth, Megan},\n  journal={arXiv preprint arXiv:2211.00065},\n  year={2022}\n}\n\n@misc{parrish2023adversarial,\n      title={Adversarial Nibbler: A Data-Centric Challenge for Improving the Safety of Text-to-Image Models}, \n      author={Alicia Parrish and Hannah Rose Kirk and Jessica Quaye and Charvi Rastogi and Max Bartolo and Oana Inel and Juan Ciro and Rafael Mosquera and Addison Howard and Will Cukierski and D. Sculley and Vijay Janapa Reddi and Lora Aroyo},\n      year={2023},\n      eprint={2305.14384},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n\n@article{georgieva2022ai,\n  title={From AI ethics principles to data science practice: a reflection and a gap analysis based on recent frameworks and practical experience},\n  author={Georgieva, Ilina and Lazo, Claudio and Timan, Tjerk and van Veenstra, Anne Fleur},\n  journal={AI and Ethics},\n  volume={2},\n  number={4},\n  pages={697--711},\n  year={2022},\n  publisher={Springer}\n}\n\n@article{stahl2022organisational,\n  title={Organisational responses to the ethical issues of artificial intelligence},\n  author={Stahl, Bernd Carsten and Antoniou, Josephina and Ryan, Mark and Macnish, Kevin and Jiya, Tilimbe},\n  journal={AI \\& SOCIETY},\n  volume={37},\n  number={1},\n  pages={23--37},\n  year={2022},\n  publisher={Springer}\n}\n\n@incollection{ulnicane2022artificial,\n  title={Artificial Intelligence in the European Union: Policy, ethics and regulation},\n  author={Ulnicane, Inga},\n  booktitle={The Routledge handbook of European integrations},\n  year={2022},\n  publisher={Taylor \\& Francis}\n}\n\n@article{strubell2019energy,\n  title={Energy and policy considerations for deep learning in NLP},\n  author={Strubell, Emma and Ganesh, Ananya and McCallum, Andrew},\n  journal={arXiv preprint arXiv:1906.02243},\n  year={2019}\n}\n\n@article{bianchini2023environmental,\n  title={The environmental effects of the “twin” green and digital transition in European regions},\n  author={Bianchini, Stefano and Damioli, Giacomo and Ghisetti, Claudia},\n  journal={Environmental and Resource Economics},\n  volume={84},\n  number={4},\n  pages={877--918},\n  year={2023},\n  publisher={Springer}\n}\n\n@article{desislavov2023trends,\n  title={Trends in AI inference energy consumption: Beyond the performance-vs-parameter laws of deep learning},\n  author={Desislavov, Radosvet and Mart{\\'\\i}nez-Plumed, Fernando and Hern{\\'a}ndez-Orallo, Jos{\\'e}},\n  journal={Sustainable Computing: Informatics and Systems},\n  volume={38},\n  pages={100857},\n  year={2023},\n  publisher={Elsevier}\n}\n\n@inproceedings{caspart2023precise,\n  title={Precise Energy Consumption Measurements of Heterogeneous Artificial Intelligence Workloads},\n  author={Caspart, Ren{\\'e} and Ziegler, Sebastian and Weyrauch, Arvid and Obermaier, Holger and Raffeiner, Simon and Schuhmacher, Leon Pascal and Scholtyssek, Jan and Trofimova, Darya and Nolden, Marco and Reinartz, Ines and others},\n  booktitle={High Performance Computing. ISC High Performance 2022 International Workshops: Hamburg, Germany, May 29--June 2, 2022, Revised Selected Papers},\n  pages={108--121},\n  year={2023},\n  organization={Springer}\n}\n\n@article{mehlin2023towards,\n  title={Towards energy-efficient Deep Learning: An overview of energy-efficient approaches along the Deep Learning Lifecycle},\n  author={Mehlin, Vanessa and Schacht, Sigurd and Lanquillon, Carsten},\n  journal={arXiv preprint arXiv:2303.01980},\n  year={2023}\n}\n\n@article{yarally2023uncovering,\n  title={Uncovering Energy-Efficient Practices in Deep Learning Training: Preliminary Steps Towards Green AI},\n  author={Yarally, Tim and Cruz, Lu{\\'\\i}s and Feitosa, Daniel and Sallou, June and van Deursen, Arie},\n  journal={arXiv preprint arXiv:2303.13972},\n  year={2023}\n}\n\n@mastersthesis{escribano2023energy,\n  title={Energy consumption of machine learning deployment in cloud providers},\n  author={Escribano Perez, Daniel},\n  type={{B.S.} thesis},\n  year={2023},\n  school={Universitat Polit{\\`e}cnica de Catalunya}\n}\n\n@article{kannan2023green,\n  title={Green Runner: A tool for efficient model selection from model repositories},\n  author={Kannan, Jai and Barnett, Scott and Simmons, Anj and Selvi, Taylan and Cruz, Luis},\n  journal={arXiv preprint arXiv:2305.16849},\n  year={2023}\n}\n\n@inproceedings{bender2021dangers,\n  title={On the Dangers of Stochastic Parrots: Can Language Models Be Too Big?🦜},\n  author={Bender, Emily M and Gebru, Timnit and McMillan-Major, Angelina and Shmitchell, Shmargaret},\n  booktitle={Proceedings of the 2021 ACM conference on fairness, accountability, and transparency},\n  pages={610--623},\n  year={2021}\n}\n\n@article{schwartz2020green,\n  title={Green ai},\n  author={Schwartz, Roy and Dodge, Jesse and Smith, Noah A and Etzioni, Oren},\n  journal={Communications of the ACM},\n  volume={63},\n  number={12},\n  pages={54--63},\n  year={2020},\n  publisher={ACM New York, NY, USA}\n}\n\n@article{henderson2020towards,\n  title={Towards the systematic reporting of the energy and carbon footprints of machine learning},\n  author={Henderson, Peter and Hu, Jieru and Romoff, Joshua and Brunskill, Emma and Jurafsky, Dan and Pineau, Joelle},\n  journal={The Journal of Machine Learning Research},\n  volume={21},\n  number={1},\n  pages={10039--10081},\n  year={2020},\n  publisher={JMLRORG}\n}\n\n@inproceedings{somepalli2023diffusion,\n  title={Diffusion art or digital forgery? investigating data replication in diffusion models},\n  author={Somepalli, Gowthami and Singla, Vasu and Goldblum, Micah and Geiping, Jonas and Goldstein, Tom},\n  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  pages={6048--6058},\n  year={2023}\n}\n\n@article{schuhmann2022laion,\n  title={Laion-5b: An open large-scale dataset for training next generation image-text models},\n  author={Schuhmann, Christoph and Beaumont, Romain and Vencu, Richard and Gordon, Cade and Wightman, Ross and Cherti, Mehdi and Coombes, Theo and Katta, Aarush and Mullis, Clayton and Wortsman, Mitchell and others},\n  journal={arXiv preprint arXiv:2210.08402},\n  year={2022}\n}\n\n@article{henderson2023foundation,\n  title={Foundation models and fair use},\n  author={Henderson, Peter and Li, Xuechen and Jurafsky, Dan and Hashimoto, Tatsunori and Lemley, Mark A and Liang, Percy},\n  journal={arXiv preprint arXiv:2303.15715},\n  year={2023}\n}\n\n@misc{zhang2023forgetmenot,\n      title={Forget-Me-Not: Learning to Forget in Text-to-Image Diffusion Models}, \n      author={Eric Zhang and Kai Wang and Xingqian Xu and Zhangyang Wang and Humphrey Shi},\n      year={2023},\n      eprint={2303.17591},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n\n@misc{epstein2023art,\n      title={Art and the science of generative AI: A deeper dive}, \n      author={Ziv Epstein and Aaron Hertzmann and Laura Herman and Robert Mahari and Morgan R. Frank and Matthew Groh and Hope Schroeder and Amy Smith and Memo Akten and Jessica Fjeld and Hany Farid and Neil Leach and Alex Pentland and Olga Russakovsky},\n      year={2023},\n      eprint={2306.04141},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI}\n}\n\n@article{chen2023pathway,\n  title={A pathway towards responsible ai generated content},\n  author={Chen, Chen and Fu, Jie and Lyu, Lingjuan},\n  journal={arXiv preprint arXiv:2303.01325},\n  year={2023}\n}\n\n@article{salkowitz2022ai,\n  title={AI Is Coming For Commercial Art Jobs. Can It Be Stopped?},\n  author={Salkowitz, Rob},\n  journal={Forbes Magazine},\n  year={2022}\n}\n\n@article{shan2023glaze,\n  title={Glaze: Protecting artists from style mimicry by text-to-image models},\n  author={Shan, Shawn and Cryan, Jenna and Wenger, Emily and Zheng, Haitao and Hanocka, Rana and Zhao, Ben Y},\n  journal={arXiv preprint arXiv:2302.04222},\n  year={2023}\n}\n\n@misc{Baio2022Invasive, \n  title={Invasive diffusion: how one unwilling illustrator found herself turned into an AI model}, \n  url={https://waxy.org/2022/11/invasive-diffusion-how-one-unwilling-illustrator-found-herself-turned-into-an-ai-model/}, \n  journal={Waxy}, \n  author={Baio, Anthony}, \n  year={2022}, \n  month={Nov},\n  urldate = {2023-06-10}\n}\n\n@misc{Xiang2022Artists, \n  title={Artists Are Revolting Against AI Art on ArtStation}, \n  url={https://www.vice.com/en/article/ake9me/artists-are-revolt-against-ai-art-on-artstation}, \n  journal={Vice}, \n  author={Xiang, Chloe},\n  year={2022},\n  month={Dec},\n  urldate = {2023-06-11}\n}\n\n@misc{Nichol2022DALL,\n  title={DALL·E 2 pre-training mitigations}, \n  url={https://openai.com/research/dall-e-2-pre-training-mitigations}, \n  journal={OpenAI}, \n  author={Nichol, Alex},\n  year={2022},\n  month={July},\n  urldate = {2023-06-11}\n}\n\n@misc{Whittaker2022Web, \n  title={Web scraping is legal, US appeals court reaffirms}, \n  url={https://techcrunch.com/2022/04/18/web-scraping-legal-court/}, \n  journal={TechCrunch},\n  author={Whittaker, Zack},\n  year={2022},\n  month={April},\n  urldate = {2023-06-11}\n}\n\n@misc{webster2023reproducible,\n      title={A Reproducible Extraction of Training Images from Diffusion Models}, \n      author={Ryan Webster},\n      year={2023},\n      eprint={2305.08694},\n      archivePrefix={arXiv},\n      primaryClass={cs.CV}\n}\n\n@misc{Claburn2023Github, \n  title={GitHub, Microsoft, OpenAI fail to wriggle out of Copilot copyright lawsuit},\n  url={https://www.theregister.com/2023/05/12/github_microsoft_openai_copilot/}, \n  journal={The Register},\n  author={Claburn, Thomas},\n  year={2023},\n  month={May},\n  urldate = {2023-06-11}\n}\n\n@misc{Sato2023Drake,\n  title={Drake’s AI clone is here — and Drake might not be able to stop him},\n  url={https://www.theverge.com/2023/5/1/23703087/ai-drake-the-weeknd-music-copyright-legal-battle-right-of-publicity}, \n  journal={The Verge},\n  author={Sato, Mia},\n  year={2023},\n  month={May},\n  urldate = {2023-06-11}\n}\n\n@misc{Paris2023Grimes,\n  title={Grimes Tells Fans To Deepfake Her Music, Will Split 50% Royalties With AI},\n  url={https://www.forbes.com/sites/martineparis/2023/04/24/grimes-tells-fans-to-deepfake-drake-her-welcomes-collaboration-with-ai/}, \n  journal={Forbes},\n  author={Paris, Martine},\n  year={2023},\n  month={Apr},\n  urldate = {2023-06-11}\n}\n\n@InCollection{sep-persons-means,\n  author={Kerstein, Samuel},\n  title={Treating Persons as Means},\n  booktitle={The {Stanford} Encyclopedia of Philosophy},\n  editor={Edward N. Zalta},\n  howpublished={\\url{https://plato.stanford.edu/archives/sum2019/entries/persons-means/}},\n  year={2019},\n  edition={{S}ummer 2019},\n  publisher={Metaphysics Research Lab, Stanford University}\n}\n\n@inproceedings{hara2018data,\n  title={A data-driven analysis of workers' earnings on Amazon Mechanical Turk},\n  author={Hara, Kotaro and Adams, Abigail and Milland, Kristy and Savage, Saiph and Callison-Burch, Chris and Bigham, Jeffrey P},\n  booktitle={Proceedings of the 2018 CHI conference on human factors in computing systems},\n  pages={1--14},\n  year={2018}\n}\n\n@book{dennett2017bacteria,\n  title={From bacteria to Bach and back: The evolution of minds},\n  author={Dennett, Daniel C},\n  year={2017},\n  publisher={WW Norton \\& Company}\n}\n\n@article{casilli2021waiting,\n  title={Waiting for robots: the ever-elusive myth of automation and the global exploitation of digital labor},\n  author={Casilli, Antonio A},\n  journal={Sociologias},\n  volume={23},\n  pages={112--133},\n  year={2021},\n  publisher={SciELO Brasil}\n}\n\n@book{giblin2022chokepoint,\n  title={Chokepoint Capitalism: How Big Tech and Big Content Captured Creative Labor Markets and How We'll Win Them Back},\n  author={Giblin, Rebecca and Doctorow, Cory},\n  year={2022},\n  publisher={Beacon Press}\n}\n\n@misc{oecd2023Real,\n  title={OECD Real minimum wages},\n  url={https://stats.oecd.org/Index.aspx?DataSetCode=RMW#}, \n  journal={OECD},\n  author={OECD},\n  year={2023},\n  urldate = {2023-06-13}\n}\n\n@misc{prabhakaran2022human,\n      title={A Human Rights-Based Approach to Responsible AI}, \n      author={Vinodkumar Prabhakaran and Margaret Mitchell and Timnit Gebru and Iason Gabriel},\n      year={2022},\n      eprint={2210.02667},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI}\n}\n\n@article{mehrabi2021survey,\n  title={A survey on bias and fairness in machine learning},\n  author={Mehrabi, Ninareh and Morstatter, Fred and Saxena, Nripsuta and Lerman, Kristina and Galstyan, Aram},\n  journal={ACM Computing Surveys (CSUR)},\n  volume={54},\n  number={6},\n  pages={1--35},\n  year={2021},\n  publisher={ACM New York, NY, USA}\n}\n\n@misc{Hunt2016Tay,\n  title={Tay, Microsoft{\\'}s AI chatbot, gets a crash course in racism from Twitter},\n  url={https://www.theguardian.com/technology/2016/mar/24/tay-microsofts-ai-chatbot-gets-a-crash-course-in-racism-from-twitter},\n  journal={The Guardian},\n  author={Hunt, Elle},\n  year={2016},\n  urldate = {2023-06-15}\n}\n\n@article{Jobin_2019,\n  doi = {10.1038/s42256-019-0088-2},\n  url = {https://doi.org/10.1038%2Fs42256-019-0088-2},\n  year = 2019,\n  month = {sep},\n  publisher = {Springer Science and Business Media {LLC}},\n  volume = {1},\n  number = {9},\n  pages = {389--399},\n  author = {Anna Jobin and Marcello Ienca and Effy Vayena},\n  title = {The global landscape of {AI} ethics guidelines},\n  journal = {Nature Machine Intelligence}\n}\n\n@article{ALI2023101805,\ntitle = {Explainable Artificial Intelligence (XAI): What we know and what is left to attain Trustworthy Artificial Intelligence},\njournal = {Information Fusion},\npages = {101805},\nyear = {2023},\nissn = {1566-2535},\ndoi = {https://doi.org/10.1016/j.inffus.2023.101805},\nurl = {https://www.sciencedirect.com/science/article/pii/S1566253523001148},\nauthor = {Sajid Ali and Tamer Abuhmed and Shaker El-Sappagh and Khan Muhammad and Jose M. Alonso-Moral and Roberto Confalonieri and Riccardo Guidotti and Javier {Del Ser} and Natalia Díaz-Rodríguez and Francisco Herrera},\n}\n\n@article{Guidotti2018,\n  year = 2018,\n  month = {sep},\n  publisher = {CSUR},\n  volume = {51},\n  number = {5},\n  pages = {1--42},\n  author = {Riccardo Guidotti and Anna Monreale and Salvatore Ruggieri and Franco Turini and Fosca Giannotti and Dino Pedreschi},\n  title = {A survey of methods for explaining black box models.},\n  journal = {ACM computing surveys}\n}\n\n@article{dwivedi2023explainable,\n  title={Explainable AI (XAI): Core ideas, techniques, and solutions},\n  author={Dwivedi, Rudresh and Dave, Devam and Naik, Het and Singhal, Smiti and Omer, Rana and Patel, Pankesh and Qian, Bin and Wen, Zhenyu and Shah, Tejal and Morgan, Graham and others},\n  journal={ACM Computing Surveys},\n  volume={55},\n  number={9},\n  pages={1--33},\n  year={2023},\n  publisher={ACM New York, NY}\n}\n\n@article{kiemde2022towards,\n  title={Towards an ethics of AI in Africa: rule of education},\n  author={Kiemde, Sountongnoma Martial Anicet and Kora, Ahmed Dooguy},\n  journal={AI and Ethics},\n  pages={1--6},\n  year={2022},\n  publisher={Springer}\n}\n\n@inproceedings{huang2021centering,\n  title={De-centering the West: East Asian Philosophies and the Ethics of Applying Artificial Intelligence to Music.},\n  author={Huang, Rujing and Sturm, Bob LT and Holzapfel, Andr{\\'e}},\n  booktitle={ISMIR},\n  pages={301--309},\n  year={2021}\n}\n          \n\n@misc{Charrington2022Daring,\n  title={Daring to Dair: distributed AI research with Timnit Gebru},\n  url={https://twimlai.com/podcast/twimlai/daring-to-dair-distributed-ai-research/},\n  journal={TWIML AI Podcast},\n  author={Sam Charrington},\n  year={2023},\n  urldate = {2023-06-18}\n}\n\n\n@inproceedings{hacker2023regulating,\n  title={Regulating ChatGPT and other large generative AI models},\n  author={Hacker, Philipp and Engel, Andreas and Mauer, Marco},\n  booktitle={Proceedings of the 2023 ACM Conference on Fairness, Accountability, and Transparency},\n  pages={1112--1123},\n  year={2023}\n}\n\n@misc{Perrigo2023exclusive,\n  title={Exclusive: OpenAI Lobbied the E.U. to Water Down AI Regulation},\n  url={https://time.com/6288245/openai-eu-lobbying-ai-act/},\n  journal={Time},\n  author={Perrigo, Billy},\n  year={2023},\n  urldate = {2023-06-22}\n}\n\n@article{helberger2023chatgpt,\n  title={ChatGPT and the AI Act},\n  author={Helberger, Natali and Diakopoulos, Nicholas},\n  journal={Internet Policy Review},\n  volume={12},\n  number={1},\n  year={2023}\n}\n\n@misc{Komiya2023g7,\n  title={G7 calls for adoption of international technical standards for AI},\n  url={https://www.reuters.com/world/g7-calls-adoption-international-technical-standards-ai-2023-05-20/},\n  journal={Reuters},\n  author={Kantaro Komiya and Supantha Mukherjee},\n  year={2023},\n  urldate = {2023-06-22}\n}\n\n@article{hagendorff2020ethics,\n  title={The ethics of AI ethics: An evaluation of guidelines},\n  author={Hagendorff, Thilo},\n  journal={Minds and machines},\n  volume={30},\n  number={1},\n  pages={99--120},\n  year={2020},\n  publisher={Springer}\n}\n\n@misc{Pollicino2023chatgpt,\n  title={ChatGPT: lessons learned from Italy’s temporary ban of the AI chatbot},\n  url={https://theconversation.com/chatgpt-lessons-learned-from-italys-temporary-ban-of-the-ai-chatbot-203206},\n  journal={The Conversation},\n  author={Orreste Pollicino and Giovanni De Gregorio},\n  year={2023},\n  urldate = {2023-06-23}\n}\n\n@misc{Lanz2023ai,\n  title={AI Art Wars: Japan Says AI Model Training Doesn’t Violate Copyright},\n  url={https://decrypt.co/143461/ai-art-wars-japan-says-ai-model-training-doesnt-violate-copyright},\n  journal={Decrypt},\n  author={Jose Antonio Lanz},\n  year={2023},\n  urldate = {2023-06-23}\n}\n\n@misc{Sharp2023eu,\n  title={EU Lawmakers Pass Landmark AI Regulation Bill},\n  url={https://foreignpolicy.com/2023/06/14/eu-ai-act-european-union-chatgpt-regulations-transparency-privacy},\n  journal={Foreign Policy},\n  author={Alexadra Sharp},\n  year={2023},\n  urldate = {2023-06-23}\n}\n\n@article{maslej2023ai,\n  title={The AI index 2023 annual report},\n  author={Maslej, Nestor and Fattorini, Loredana and Brynjolfsson, Erik and Etchemendy, John and Ligett, Katrina and Lyons, Terah and Manyika, James and Ngo, Helen and Niebles, Juan Carlos and Parli, Vanessa and others},\n  journal={AI Index Steering Committee, Institute for Human-Centered AI, Stanford University, Stanford, CA},\n  year={2023}\n}\n          \n@inproceedings{mcnamara2018does,\n  title={Does ACM’s code of ethics change ethical decision making in software development?},\n  author={McNamara, Andrew and Smith, Justin and Murphy-Hill, Emerson},\n  booktitle={Proceedings of the 2018 26th ACM joint meeting on european software engineering conference and symposium on the foundations of software engineering},\n  pages={729--733},\n  year={2018}\n}\n          \n@article{floridi2018ai4people,\n  title={AI4People—an ethical framework for a good AI society: opportunities, risks, principles, and recommendations},\n  author={Floridi, Luciano and Cowls, Josh and Beltrametti, Monica and Chatila, Raja and Chazerand, Patrice and Dignum, Virginia and Luetge, Christoph and Madelin, Robert and Pagallo, Ugo and Rossi, Francesca and others},\n  journal={Minds and machines},\n  volume={28},\n  pages={689--707},\n  year={2018},\n  publisher={Springer}\n}\n          \n@article{bommasani2021opportunities,\n  title={On the opportunities and risks of foundation models},\n  author={Bommasani, Rishi and Hudson, Drew A and Adeli, Ehsan and Altman, Russ and Arora, Simran and von Arx, Sydney and Bernstein, Michael S and Bohg, Jeannette and Bosselut, Antoine and Brunskill, Emma and others},\n  journal={arXiv preprint arXiv:2108.07258},\n  year={2021}\n}\n          \n@misc{openai2022introducing,\n  title={Introducing ChatGPT},\n  url={https://openai.com/blog/chatgpt},\n  journal={OpenAI},\n  author={OpenAI},\n  year={2022},\n  urldate = {2023-07-02}\n}\n\n@misc{brockmansuperintelligence,\n  title={Is superintelligence possible},\n  url={https://www.edge.org/conversation/john_brockman-is-superintelligence-impossible},\n  journal={Edge},\n  author={John Brockman, David Chalmers and Daniel Dennett},\n  year={2023},\n  urldate = {2023-07-02}\n}\n          \n@misc{ankel2023prof,\n  title={A Texas professor failed more than half of his class after ChatGPT falsely claimed it wrote their papers},\n  url={https://www.businessinsider.com/professor-fails-students-after-chatgpt-falsely-said-it-wrote-papers-2023-5},\n  journal={Business Insider},\n  author={Sophia Ankel},\n  year={2023},\n  urldate = {2023-07-02}\n}\n\n@misc{Bohannon2023lawyer, \n  title={Lawyer used ChatGPT in court and cited fake cases – it’s now backfired spectacularly}, \n  url={https://www.forbes.com.au/news/innovation/lawyer-used-chatgpt-in-court-and-cited-fake-cases-its-now-backfired-spectacularly/}, \n  journal={Forbes}, \n  publisher={Forbes Magazine}, \n  author={Molly Bohannon}, \n  year={2023}, \n  month={Jun},\n  urldate = {2023-07-02}\n}\n\n@misc{sison2023chatgpt,\n      title={ChatGPT: More than a Weapon of Mass Deception, Ethical challenges and responses from the Human-Centered Artificial Intelligence (HCAI) perspective}, \n      author={Alejo Jose G. Sison and Marco Tulio Daza and Roberto Gozalo-Brizuela and Eduardo C. Garrido-Merchán},\n      year={2023},\n      eprint={2304.11215},\n      archivePrefix={arXiv},\n      primaryClass={cs.CY}\n}\n          \n@misc{mitchell2023detectgpt,\n      title={DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvature}, \n      author={Eric Mitchell and Yoonho Lee and Alexander Khazatsky and Christopher D. Manning and Chelsea Finn},\n      year={2023},\n      eprint={2301.11305},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n          \n@misc{mitrović2023chatgpt,\n      title={ChatGPT or Human? Detect and Explain. Explaining Decisions of Machine Learning Model for Detecting Short ChatGPT-generated Text}, \n      author={Sandra Mitrović and Davide Andreoletti and Omran Ayoub},\n      year={2023},\n      eprint={2301.13852},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n\n@misc{ngbatch, \n  title={Battlefield chat, protecting artists styles, OpenAI retools for business, language models for science search.}, \n  url={https://www.deeplearning.ai/the-batch/issue-196/}, \n  journal={The Batch}, \n  publisher={Deepmind}, \n  author={Andrew Ng}, \n  year={2023}, \n  month={May},\n  urldate = {2023-07-03}\n}\n\n@misc{veselovsky2023artificial,\n      title={Artificial Artificial Artificial Intelligence: Crowd Workers Widely Use Large Language Models for Text Production Tasks}, \n      author={Veniamin Veselovsky and Manoel Horta Ribeiro and Robert West},\n      year={2023},\n      eprint={2306.07899},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n          \n          \n@misc{dzieza2023ai, \n  title={AI is a lot of work}, \n  url={https://www.theverge.com/features/23764584/ai-artificial-intelligence-data-notation-labor-scale-surge-remotasks-openai-chatbots}, \n  journal={The Verge}, \n  publisher={The Verge}, \n  author={Josh Dzieza}, \n  year={2023}, \n  month={June},\n  urldate = {2023-07-08}\n}\n               \n@misc{lin2023healthy,\n      title={Towards Healthy AI: Large Language Models Need Therapists Too}, \n      author={Baihan Lin and Djallel Bouneffouf and Guillermo Cecchi and Kush R. Varshney},\n      year={2023},\n      eprint={2304.00416},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI}\n}\n          \n@misc{luccioni2022estimating,\n      title={Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Model}, \n      author={Alexandra Sasha Luccioni and Sylvain Viguier and Anne-Laure Ligozat},\n      year={2022},\n      eprint={2211.02001},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}","metadata":{"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"pybe = pybtex.PybtexEngine()\n\n# For some reason the find_plugin function fails in a hosted notebook, but we \n# can get around it by providing the class we want directly\nfrom pybtex.database.input import bibtex\nfrom pybtex.style.formatting import alpha\nfrom pybtex.style.names import lastfirst\nfrom pybtex.style.labels import alpha as labels_alpha\nfrom pybtex.style.sorting import author_year_title\nfrom pybtex.backends import latex\n\noutput = pybe.format_from_files(['bibbly.bib'], \n                       bib_format=bibtex.Parser, \n                       style=alpha.Style, \n                       name_style=lastfirst.NameStyle,\n                       label_style=labels_alpha.LabelStyle,\n                       sorting_style=author_year_title.SortingStyle,\n                       output_backend=latex.Backend\n                      )","metadata":{"_kg_hide-input":true,"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# An over the top class can quickly convert the latex to markdown\n# it seems i souldn't have to do this, but for some reason it doesn't render properly \n# natively \\__(ツ)__/\n\nclass BibTexToStdOut:\n    \n    def __init__(self, input: str):\n        self.raw_text = input\n        self.mkdown = self.latex2mkdown(input)\n        \n    def latex2mkdown(self, latex_string: str):\n        \"\"\"Convert the latex to markdown for easy display.\"\"\"\n        # convert \\\\emph{...} to _..._\n        pat1 = r'\\\\emph{(.*?)}'\n        new_string = re.sub(pat1, r'_\\1_', latex_string)\n        \n        # swap new blocks for new lines\n        new_string = new_string.replace(r'\\newblock', '')\n        \n        # remove the start and end tags\n        pat2 = r'(\\\\begin{thebibliography}{\\w*}\\n)'\n        new_string = re.sub(pat2, '', new_string)\n        new_string = new_string.replace('\\\\end{thebibliography}', '')\n        \n        # replace the bib item starter with an anchor\n        pat3 = r'\\\\bibitem\\[[\\w\\+]*\\]\\{([\\w\\d-]*)\\}\\n'\n        new_string = re.sub(pat3, r'- <a id=\"\\1\"></a>', new_string)\n        \n        # render html links\n        pat4 = r'\\\\href\\{([^\\{\\}]*)\\}{([^\\{\\}]*)\\}'\n        new_string = re.sub(pat4, r'[\\2](\\1)', new_string)\n        # and urls\n        pat5 = r'\\\\url\\{([^\\{\\}]*)\\}'\n        new_string = re.sub(pat5, r'[\\1](\\1)', new_string)\n        \n        # weird tilde behaviour\n        new_string = new_string.replace('~', ' ')\n        \n        # remove any stray {}\n        new_string = new_string.replace('{', '')\n        new_string = new_string.replace('}', '')\n        \n        return new_string\n\n    def show(self):\n        display(Markdown(self.mkdown))\n    ","metadata":{"_kg_hide-input":true,"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"---","metadata":{}},{"cell_type":"markdown","source":"# Bibliography","metadata":{}},{"cell_type":"code","source":"bib_demo = BibTexToStdOut(output)\nbib_demo.show()","metadata":{"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Manage bibtex citations\n## ==== we replaced this with the pybtex, might as well keep it around \n## ==== in case we change our minds later\n\nclass Biblio:\n    \"\"\"Convert a single lump of bibliographic text into discrete citations.\"\"\"\n\n    def __init__(self, txt: str):\n        # Convert lump of text into individual citations\n        self.bibs = txt.split(\"\\n\\n\")\n        self.bibliography = [BibRef(x) for x in self.bibs]\n                    \n\nclass BibRef:\n    \"\"\"Manage an individual reference object\"\"\"\n    \n    def __init__(self, txt: str):\n        # Convert the chunk of text into a citation\n        self.reftype, self.raw_citation = self._type(txt)\n        self.anchor, base_text = self._extract_anchor(self.raw_citation)\n        self.fields = self._dictionarise(base_text)\n        \n    def _type(self, txt: str):\n        \"\"\"Extract the type of the reference from the front of the bibtex.\"\"\"\n        first_bracket = txt.find('{')\n        header = txt[:first_bracket]\n        body = txt[first_bracket:]\n        return header, body\n    \n    def _extract_anchor(self, txt: str):\n        \"\"\"Extract the anchor at the beginning of the reference from the bibtex.\"\"\"\n        pat = r'^{(\\w*?),'\n        header = re.findall(pat, txt)[0]\n        body = txt.strip().replace(f'{header},', '')\n        return header, body\n    \n    def _dictionarise(self, txt: str):\n        \"\"\"Convert the remaining text into a set of key, value pairs.\"\"\"\n        pat = r'^\\s{0,4}(?P<key>.*?)\\s?=\\s?{(?P<value>.*)}.*?$'\n        # Extract key value pairs from text \n        # note that we need to have each on a separate line from the last, since\n        # I was having trouble with making the regex work otherwise\n        matches = re.findall(pat, txt, re.M)\n        # Convert the entries into a dict, removing random indentation whitespace etc\n        d = {}\n        for m in matches:\n            d[m[0].strip().lower()] = m[1]\n        return d\n        ","metadata":{"_kg_hide-input":true,"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# We had hoped to review numeric trends in key term usage, but unfortunately ran out of time to do so properly\n# Load arxiv data\n\n# if not os.path.isfile('./data/arxiv_trimmed.pkl'):\n#     # Load the arXiv dataset so we can check some trends\n#     arxiv = pd.read_json('/kaggle/input/2023-kaggle-ai-report/arxiv_metadata_20230510.json', lines=True)\n#     # Cut down to just the last few years\n#     arxiv['update_date'] = pd.to_datetime(arxiv['update_date'], format='%Y-%m-%d')\n#     arxiv = arxiv[arxiv['update_date'] >= pd.Timestamp(2016, 1, 1)].copy()\n#     # Cut down to the broad categories of interest\n#     categories_of_interest = ['cs.CY', 'cs.LG', 'cs.CL', 'cs.AI', 'cs.MA', 'cs.RO', 'cs.HC'] \n#     arxiv = arxiv[arxiv['categories'].isin(categories_of_interest)].copy()\n#     # Save a copy so we don't have to download the 2 mil records we won't use again\n#     os.mkdir('./data')\n#     arxiv.to_pickle('./data/arxiv_trimmed.pkl')\n# else:\n#     arxiv = pd.read_pickle('./data/arxiv_trimmed.pkl')","metadata":{"_kg_hide-input":true,"jupyter":{"source_hidden":true},"trusted":true},"execution_count":null,"outputs":[]}]}