To the uninitiated, the field of artificial intelligence (AI) is shrouded in wonder and mystery. Utilising inscrutable logic to manifest perplexing insights from seemingly infinite and unconnected troves of data, AI seems nothing short of a technological miracle. For obvious reasons, marketers and software providers are keen to play up the notion of the omniscient machine. “I am everywhere,” proclaims the Wizard of Oz in the eponymous book by L. Frank Baum, “but to the eyes of common mortals I am invisible. I will now seat myself upon my throne, that you may converse with me.” Yet, the basic principles of machine learning (the subdomain of artificial intelligence pertaining to algorithmic prediction artificial intelligence pertaining to algorithmic prediction and interpretation) are readily understood. Even cursory knowledge of these main tenets goes a long way to demystifying and understanding the possibilities and limitations of machine learning (ML). Time then to draw back the curtain and address the leprechaun in the room.

In order to discuss what machines do (and do not do) when they learn, it is useful to introduce a working definition of learning. Human learning encompasses a broad swathe of physical and cerebral tasks, as well as including conditioning processes – the internalisation and enactment of externally motivated behaviour and values – that are crucial to navigating our (social) environment, but do not generally include or revolve around the development of particular skills.

Artificial intelligence has been applied in each of these domains of learning (with varying degrees of success, one might add). Within robotics, machine learning features prominently in fields such as object recognition and motor-skill development. Natural Language Generation machines are now routinely tasked with covering news ranging from current affairs to sports; and it takes literary sensibilities far more developed than mine to distinguish the workings of the poet’s muse from those of the cold, binary calculator. Recent projects have sought to push the ‘creative’ capabilities of machines even further, venturing into the revered realms of literary writing and even musical composition. Public reception of these endeavors has been more equivocal, although one effort to automatically simulate the vacuous and insipid prose of one best-selling erotic psychodrama proved thoroughly convincing.

In addition to learning specific, predetermined tasks, artificial intelligence has been used to attune the behaviour of machines to their environment, adjusting both what they do and how they do it as circumstance dictates. By changing the topics, idiom and tone to suit particular conversations while nevertheless retaining a constant set of ‘personal’ traits, conversational algorithms seem to display the same type of emotional intelligence that allow us to transit seamlessly from one role or social setting to another. Indeed, machines have proven so adept at navigating the intricacies of human interaction that they have elicited fervent emotional response from their users; to date, Microsoft’s Chinese chat-bot Xiao Bing  (XiaoIce) has received no less than 10 million unique proclamations of love. Not all socially aware algorithms have proved quite as endearing. Twitter-bot Tay, Microsoft’s American millennial counterpart to XiaoIce, evoked reactions ranging from derision to ire when an encounter with some of the internet’s less pious patrons left her spouting racist slurs and eagerly professing her enthusiasm for recreational use of classified substances.

How Machines Learn

While the dazzling variety in applications may create an impression that machines are able to – much like us humans – adopt different modes of knowledge acquisition, in the end all machine learning boils down to the process of experiential learning, or if you prefer, plain and simple trial-and-error. More formally,

‘[Computers] learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.’ (Tom Michel, 1999).

The definition is instructive in several respects. First, we are told that computers learn by engaging in a predefined set of tasks (e.g. grabbing an object, generating prose or conversing). Secondly, the success with which each of these tasks is performed is evaluated by reference to some (implicitly) defined metric. Changes in this performance metric guide the algorithm’s strategy toward completing this task. Not unlike an archer honing in on its target, machines learn from each iteration, adjusting their ‘aim’ by incorporating feedback deemed to contribute to success while ignoring extraneous factors. Where the machine differs notably from our metaphorical bowman is in the speed of this operation; the seconds or minutes it takes the human brain to process feedback are reduced to milliseconds by virtue of the computer’s microprocessor. This gives the machine a significant leg up in the area of experiential learning, allowing it to extract the most pertinent information from countless iterations.

Broadly, machine learning comes in two guises, supervised and – you guessed it – unsupervised. Supervised learning algorithms learn to perform tasks or solve problems by taking a dataset that includes information on both experiences and outcomes. Through systematic comparison of experience-outcome pairs, the algorithm comes to understand what dimensions of that experience are most strongly associated with each outcome. This in turn allows machines to make predictions about outcomes (i.e. regression) or identify the broader class a data point belongs to (e.g. determining the topic of an article). By contrast, in unsupervised learning, no outcomes are provided. Rather, the algorithm learns by searching for commonalties and differences within the data. Unsupervised learning enables machines to make sense of unorganised datasets by arranging it into coherent and distinct clusters.

The Stumbling Blocks on the Yellow Brick Road

The examples discussed earlier in this article indicate the versatility of these trial-and-error approaches, which can be applied to optimization problems such as motor-skill development (i.e. increasing the performance of a machine’s own actions), pattern recognition tasks like the composition of music and prose (i.e. increasing a machine’s understanding of the activity of others), and combinations thereof, such as adaptive AI-guided conversation. Moreover, the above examples of AI in action provide important cues as the limitations of ML. Since machine learning depends on repeated experience, it is poorly equipped to understand exceptional events. Likewise, because algorithms require a clearly defined task, they tend to be inept at fulfilling complex or tacit requirements. As such, machines cope well with business and sports coverage, which is generally pretty formulaic and does not require any subtext, but fall short when having to replicate the complicated plotlines and layered meanings of literary work. Experience itself, while a sine-qua-non of machine learning, can be a pitfall too. If the data fed into an algorithm is significantly skewed or truncated, this bias is likely to express itself in the task performed by the machine. Such was the fate of Tay, whose incognisance was expertly exploited by a dedicated army of trolls feeding her a steady diet of offensive statements. If we are products of our environment, this holds truer still for algorithms.

In the end, machine learning encompasses a remarkably powerful and versatile array of techniques for solving problems that require the organization and interpretation of large and often unstructured set of data. However, these techniques are not without limits. When dispensing with the smoke and mirrors that pervade much of the marketing discourse on AI, it becomes clear that machine learning, far from being some magical panacea, is only as useful as the tasks, and metrics that we assign it. Much then like the awe-inspiring contraption of Oz, the machine still requires the direction of a woman or man (no matter their stature).