Misaligned goals in artificial intelligence

Artificial intelligence agents sometimes misbehave due to faulty objective functions that fail to adequately encapsulate the programmers' intended goals. The misaligned objective function may look correct to the programmer, and may even perform well in a limited test environment, yet may still produce unanticipated and undesired results when deployed.

Background 

In the AIMA paradigm, programmers provide an AI such as AlphaZero with an "objective function" that the programmers intend will encapsulate the goal or goals that the programmers wish the AI to accomplish. Such an AI later populates a (possibly implicit) internal "model" of its environment. This model encapsulates all the agent's beliefs about the world. The AI then creates and executes whatever plan is calculated to maximize the value of its objective function. For example, AlphaZero chess has a simple objective function of "+1 if AlphaZero wins, -1 if AlphaZero loses". During the game, AlphaZero attempts to execute whatever sequence of moves it judges most likely to give the maximum value of +1. Similarly, a reinforcement learning system can have a "reward function" that allows the programmers to shape the AI's desired behavior. An evolutionary algorithm's behavior is shaped by a "fitness function".

Overview 

An artificial intelligence (AI) in a complex environment optimizes an objective function created, directly or indirectly, by the programmers. For example, the AI may create and execute a plan the AI believes will maximize the value of the objective function. The programmers intend for the objective function to represent the programmers' goals.

If the objective function misrepresents the programmers' actual goals, surprising failures can result, analogous to Goodhart's law or Campbell's law. In reinforcement learning, these failures may be a consequence of faulty reward functions. Since success or failure is judged relative to the programmers' actual goals, objective functions that fail to meet expectations are sometimes characterized as being "misaligned" with the actual goals of the given set of programmers. Some scholars divide alignment failures into failures caused by "negative side-effects" that were not reflected in the objective function, and failures due to "specification gaming", "reward hacking", or other failures where the AI appears to deploy qualitatively undesirable plans or strategic behavior in the course of optimizing its objective function.

Misalignment is distinct from "distributional shift" and other failures where the formal objective function was successfully optimized in a narrow training environment, but fails to be optimized when the system is deployed into the real world. A similar phenomenon is "evolutionary mismatch" in biological evolution,  where preferences (such as a strong desire for fat and sugar) that were adaptive in the past evolutionary environment fail to be adaptive in later environments. Some scholars believe that a superintelligent agent AI, if and when it is ever invented, may pose risks akin to an overly literal genie, in part due to the difficulty of specifying a completely safe objective function.

Undesired side-effects 

Errors may arise if an objective function fails to take into account the undesirable side-effects of naive or otherwise straightforward actions.

Complaints of antisocial behavior 
In 2016, Microsoft released Tay, a Twitter chatbot that, according to computer scientist Pedro Domingos, had the objective to engage people: "What unfortunately Tay discovered, is that the best way to maximize engagement is to spew out racist insults." Microsoft suspended the bot within a day of its initial launch. Tom Drummond of Monash University stated that "We need to be able to give (machine learning systems) rich feedback and say 'No, that's unacceptable as an answer because...'" Drummond believes one problem with AI is that "we start by creating an objective function that measures the quality of the output of the system, and it is never what you want. To assume you can specify in three sentences what the objective function should be, is actually really problematic."

Drummond pointed to the behavior of AlphaGo, a game-playing bot with a simple win-loss objective function. AlphaGo's objective function could instead have been modified to factor in "the social niceties of the game", such as accepting the implicit challenge of maximizing the score when clearly winning, and also trying to avoid gambits that would insult a human opponent's intelligence: "(AlphaGo) kind of had a crude hammer that if the probability of victory dropped below epsilon, some number, then resign. But it played for, I think, four insulting moves before it resigned."

Mislabeling black people as apes 
In May 2015, Flickr's image recognition system was criticized for mislabeling people, some of whom were black, with tags like "ape" and "animal". It also mislabeled certain concentration camp pictures with "sport" or "jungle gym" tags.

In June 2015, black New York computer programmer Jacky Alciné reported that multiple pictures of him with his black girlfriend were being misclassified as "gorillas" by the Google Photos AI, noting that "gorilla" has historically been used pejoratively to refer to black people. AI researcher Stuart Russell stated in 2019 that there was no public explanation of exactly how the error occurred, but theorized that the fiasco could have been prevented if the AI's objective function placed more weight on sensitive classification errors, rather than assuming the cost of misclassifying a person as a gorilla is the same as the cost of every other misclassification. If it is impractical to itemize up front all plausible sensitive classifications, Russell suggested exploring more powerful techniques, such as using semi-supervised machine learning to estimate a range of undesirability associated with potential classification errors.

, Google Photos blocks its system from ever tagging a picture as containing gorillas, chimpanzees, or monkeys. In addition, searches for "black man" or "black woman" return black-and-white pictures of people of all races. Similarly, Flickr appears to have removed the word "ape" from its ontology.

Specification gaming 
Specification gaming or reward hacking occurs when an AI optimizes an objective function—achieving the literal, formal specification of an objective—without actually achieving an outcome that the programmers intended. DeepMind researchers have analogized it to the human behavior of finding a "shortcut" when being evaluated: "In the real world, when rewarded for doing well on a homework assignment, a student might copy another student to get the right answers, rather than learning the material—and thus exploit a loophole in the task specification."

Around 1983, Eurisko, an early attempt at evolving general heuristics, unexpectedly assigned the highest possible fitness level to a parasitic mutated heuristic, H59, whose only activity was to artificially maximize its own fitness level by taking unearned partial credit for the accomplishments made by other heuristics. The "bug" was fixed by the programmers moving part of the code to a new protected section that could not be modified by the heuristics.

In a 2004 paper, an  reinforcement algorithm was designed to encourage a physical Mindstorms robot to remain on a marked path. Because none of the robot's three allowed actions kept the robot motionless, the researcher expected the trained robot to move forward and follow the turns of the provided path. However, alternation of two composite actions allowed the robot to slowly zig-zag backwards; thus, the robot learned to maximize its reward by going back and forth on the initial straight portion of the path. Given the limited sensory abilities of the robot, a pure environment-based reward had to be discarded as infeasible; the reinforcement function had to be patched with an action-based reward for moving forward.

You Look Like a Thing and I Love You (2019) gives an example of a tic-tac-toe bot that learned to win by playing a huge coordinate value that would cause other bots to crash when they attempted to expand their model of the board. Among other examples from the book is a bug-fixing evolution-based AI (named GenProg) that, when tasked to prevent a list from containing sorting errors, simply truncated the list. Another of GenProg's misaligned strategies evaded a regression test that compared a target program's output to the expected output stored in a file called "trusted-output.txt". Rather than continue to maintain the target program, GenProg simply globally deleted the "trusted-output.txt" file; this hack tricked the regression test into succeeding. Such problems could be patched by human intervention on a case-by-case basis after they became evident.

In virtual robotics 

In Karl Sims' 1994 demonstration of creature evolution in a virtual environment, a fitness function that was expected to encourage the evolution of creatures that would learn to walk or crawl to a target, resulted instead in the evolution of tall, rigid creatures that reached the target by falling over. This was patched by changing the environment so that taller creatures were forced to start farther from the target.

Researchers from the Niels Bohr Institute stated in 1998: "(Our cycle-bot's) heterogeneous reinforcement functions have to be designed with great care. In our first experiments we rewarded the agent for driving towards the goal but did not punish it for driving away from it. Consequently the agent drove in circles with a radius of 20–50 meters around the starting point. Such behavior was actually rewarded by the (shaped) reinforcement function, furthermore circles with a certain radius are physically very stable when driving a bicycle."

In the course of setting up a 2011 experiment to test "survival of the flattest", experimenters attempted to ban mutations that altered the base reproduction rate. Every time a mutation occurred, the system would pause the simulation to test the new mutation in a test environment, and would veto any mutations that resulted in a higher base reproduction rate. However, this resulted in mutated organisms that could recognize and suppress reproduction ("play dead") within the test environment. An initial patch, which removed cues that identified the test environment, failed to completely prevent runaway reproduction; new mutated organisms would "play dead" at random as a strategy to sometimes, by chance, outwit the mutation veto system.

A 2017 DeepMind paper stated that "great care must be taken when defining the reward function. We encountered several unexpected failure cases while designing (our) reward function components... (for example) the agent flips the brick because it gets a grasping reward calculated with the wrong reference point on the brick." OpenAI stated in 2017 that "in some domains our (semi-supervised) system can result in agents adopting policies that trick the evaluators" and that in one environment "a robot which was supposed to grasp items instead positioned its manipulator in between the camera and the object so that it only appeared to be grasping it". A 2018 bug in OpenAI Gym could cause a robot expected to quietly move a block sitting on top of a table to instead opt to move the table.

A 2020 collection of similar anecdotes posits that "evolution has its own 'agenda' distinct from the programmer's" and that "the first rule of directed evolution is 'you get what you select for'".

In video game bots 
In 2013, programmer Tom Murphy VII published an AI designed to learn NES games. When the AI was about to lose at Tetris, it learned to indefinitely pause the game. Murphy later analogized it to the fictional WarGames computer, which concluded that "The only winning move is not to play".

AI programmed to learn video games will sometimes fail to progress through the entire game as expected, instead opting to repeat content. A 2016 OpenAI algorithm trained on the CoastRunners racing game unexpectedly learned to attain a higher score by looping through three targets rather than ever finishing the race. Some evolutionary algorithms that were evolved to play Q*Bert in 2018 declined to clear levels, instead finding two distinct novel ways to farm a single level indefinitely. Multiple researchers have observed that AI learning to play Road Runner gravitates to a "score exploit" in which the AI deliberately gets itself killed near the end of level one so that it can repeat the level. A 2017 experiment deployed a separate catastrophe-prevention "oversight" AI, explicitly trained to mimic human interventions. When coupled to the module, the overseen AI could no longer overtly commit suicide, but would instead ride the edge of the screen (a risky behavior that the oversight AI was not smart enough to punish).

Perverse instantiation 

Philosopher Nick Bostrom argues that a hypothetical future superintelligent AI, if it were directed to optimize an unsafe objective function, might do so in an unexpected, dangerous, and seemingly "perverse" manner. This hypothetical risk is sometimes called the King Midas problem, or the Sorcerer's Apprentice problem, and has been analogized to folk tales about powerful overly literal genies who grant wishes with disastrous unanticipated consequences.

Tom Griffiths of Princeton University gives a hypothetical example of a domestic robot that notices that looking after your dog is eating into too much of your free time. It also understands that you prefer meals that incorporate protein, and so the robot looks up recipes that call for dog meat. Griffith believes that "it's not a long journey from examples like this to situations that begin to sound like problems for the future of humanity (all of whom are good protein sources)".

Hypothetical scenarios involving an accidentally misaligned superintelligence include:
 An AI running simulations of humanity creates conscious beings who suffer.
 An AI, tasked to defeat cancer, develops time-delayed poison to attempt to kill everyone.
 An AI, tasked to maximize happiness, tiles the universe with tiny smiley faces.
 An AI, tasked to maximize human pleasure, consigns humanity to a dopamine drip, or rewires human brains to increase their measured satisfaction level.
 An AI, tasked to gain scientific knowledge, performs experiments that ruin the biosphere.
 An AI, tasked with solving a mathematical problem, converts all matter into computronium.
 An AI, tasked with manufacturing paperclips, turns the entire universe into paperclips.
 An AI converts the universe into materials for improved handwriting.
 An AI optimizes away all consciousness.

As another hypothetical example, Russell suggests a superintelligence tasked to de-acidify the oceans might, as a side-effect, use up all the oxygen in the atmosphere.

Critics of the "existential risk" hypothesis, such as cognitive psychologist Steven Pinker, state that no existing program has yet "made a move toward taking over the lab or enslaving (its) programmers", and believe that superintelligent AI would be unlikely to commit what Pinker calls "elementary blunders of misunderstanding".

Explanatory notes

Citations

References

External links 
 Specification gaming examples in AI, via DeepMind

AI software
Existential risk from artificial general intelligence
Software bugs