Concepts as Programs


The awesomeness that is Bayesian Program Learning

In December 2015, this nifty paper showed up on the scene, titled “Human-level concept learning through probabilistic program induction“. I read it, then read it again, then read it 20 more times. (Not even kidding here.) It’s difficult to relate why this is so important, but I’ll try my best to explain.

First, the best way for you to get introduced to this is to check out this short video:

You can grab the accompanying Matlab code here.

They call their approach Bayesian Program Learning, or BPL. It’s a huge step forward, and here are some reasons why:

  1. The current machine learning approach that’s all the rage, Deep Learning, still requires hundreds or even thousands of examples in most cases. BPL, in this context, requires as little as one example.
  2. The model is “learning to learn”: “Learning proceeds by constructing programs that best explain the observations under a Bayesian criterion, and the model “learns to learn” (23, 24) by developing hierarchical priors that allow previous experience with related concepts to ease learning of new concepts (25, 26). These priors represent a learned inductive bias (27) that abstracts the key regularities and dimensions of variation holding across both types of concepts and across instances (or tokens) of a concept in a given domain.” In short, its past experience helps inform its learning process. While some Deep Learning models have demonstrated this, they do so in a far more limited way.
  3. Explicitly representing concepts as compositionally built programs starts to look a lot like the dreams of old functional AI realized, though instead through probabilistic methods.
  4. The approach of learning nested programs is highly generalizable, and could even be made hierarchical a la Deep Belief Nets.

 

What immediately stood out to me about BPL is that the “primitives” could be anything, and the images could likewise be anything. In the BPL paper, the primitives are pen strokes, and the images are handwritten characters. There is no reason I’m aware of that the primitives couldn’t be partials of some other function, and that the images couldn’t be an input to another system – possibly even another BPL node. Instead of the model learning to compose handwritten characters from pen strokes, it could be learning to compose solutions to puzzles based on available moves in context.

In order to generalize the BPL beyond handwriting, we’ll need to drop some of the domain-specific constraints:

  • In the algorithm, they sample noise/variance in the motor programs. This is a natural thing to do in order to mimic human-like variability in the output of the learned motor program, but may not be valid in other contexts. This step in the algorithm can be made optional.
  • The spatial trajectories are all smooth and, generally, connected. In a more abstract domain, such as learning a sequence of actions to take in order to solve a puzzle, the resulting ‘image’ will not necessarily be smooth at all, but could end up looking more like a QR code. There is no reason that I’m aware of to have a requirement for smooth trajectories in the general case; this should be optional. (If an issue is because of the random walk algorithm used, it may be possible to swap that for a different process in order to get the required samples.)
  • Not every application will require continuous distributions. There may be cases where discrete distributions are more apt. It is worth testing this in the future.

To start exploring more general forms of the BPL algorithm and try them in real-world, production use cases, I’ve started a Python implementation. My hope is to further explore BPL and build an ecosystem around it, to encourage developers to make their own variants and test them on specific use cases. As the project matures and I do my own tests, I’ll blog about them here.

Representing concepts as programs is not a completely new idea, but BPL pulls it off unlike anything else prior. The algorithm offers a solid base to build from, and a new way to start thinking about general learning capabilities in the machine.

The Octet System: A Way to Think About AI


You see countless headlines about AI these days, littered with references to “deep learning”, “neural networks”, “bots”, “Q&A systems”, “virtual assistant”, and all manner of other proxy terms. What’s missing from this entire discussion is a way to gauge what each system is really capable of.

In the spirit of the Kardashev Scale, I’ve put together my own ranking system for AIs, which we’ll be using at Machine Colony.

(Note: I’ll try to provide as much background and example information as I can without this post reading like a cog-sci textbook. For those savvy in AI these examples will no doubt seem pedestrian, however I do try to illustrate concepts as much as possible, in a perhaps ill-fated effort to refrain from being too esoteric.)

Introducing the Octet System

I’m not much for fancy names, but in this case it was fitting: list the qualitative capabilities of an information system, and break it down into eight distinct ranks, or “classes”. They are as follows:

Class Null

The zeroth class is something which does not qualify as an intelligent system whatsoever. While this can cover any manner of programs – be they in software or manifested in processes emerging from hardware – I choose to focus on software for this example.

Programs that fall into class null have the following characteristics:

  • They are only able to follow explicit, predetermined / deterministic logic.
  • They follow simple rules – “if this then that” – with no capacity to ever learn anything.
  • They have no capacity to make nuanced decisions, i.e. based on probability and/or data.
  • They have no internal model of the world (this is related to learning).
  • They do not have their own agency.

This is by far the broadest class, as it covers the vast majority of our software systems today. Most of the world’s software is programmed for a specific task and does not really need to be a learning, decision-making system.

Class I

Programs of this class have the following characteristics that are different from Class Null:

  • They have the ability to make rudimentary decisions based on data, based on some trained model.
  • They have the ability to learn from the outcomes of their decisions, and thus to update their core model.
  • As such, their behavior may vary over time, as the data changes and their model changes.
  • They are trained for a small number of narrow tasks, and do not have the capability to go outside those tasks.

This covers things like fraud detection agents, decent spam detection, basic crawling bots (assuming they’re at least using decision trees or something similar). The decision could be a classification action – marking something as spam, for instance – or it could be deciding how well a website ranks in the universe of websites.

Class II

Classes I and II are the most similar on this scale, because the distinction is subtle: a Class II program has all of the capabilities of a Class I, but may have more than one core model and more than one domain of action. For instance, the new Google Translate app has natural language and vision capabilities, with different models for each. These models are linked and ‘cooperate’ to translate the words in the field of view of your smartphone’s camera.

Class Is, by contrast, only have one area that they’re focused on, and make decisions only based on the model relevant to that domain.

Class III

Programs of Class III have a two main distinctions from Class IIs:

  • They have a basic memory mechanism, and the ability to learn from their history in those memories. This is more advanced than simply referring to data; these programs are actually building up heuristics from their own behavioral patterns.
  • They persist some form of internal model of the world. This assists in creation of memories and new heuristics in their repertoire.

Class IV

This class starts to loosely resemble the intelligence level of insects. Class IVs not only have some kind of internal model of the world, but they gain an ability that was essential to the evolution of all complex life on earth: collaboration.

Thus, their characteristics are:

  • They have the ability to collaborate with other agents/programs. That is, they have mechanisms with which to become aware of other agents, and a medium through which to communicate signals. (Think of ants and bees leaving chemical traces, for instance.)
  • Like Class IIIs, they have an internal model of the world. However, a Class IV’s model is more closely linked to its goal structure, and not merely ad hoc / bound in one model. Its internal model may be distributed across several subsystems / mathematical models; representations of complex phenomena or experiences are encoded across various components in its cognitive architecture (vision systems, memory components, tactile systems, etc).
  • They have the ability to perform rudimentary planning, driven by fairly rigid heuristics but with a little flexibility for learning.
  • They have the ability to form basic concepts, schema, and prototypes.

While it is not a prerequisite that Class IVs have multiple distinct sensory modalities – optic, auditory, tactile, olfactory systems – that serves as a good example of the complexity level these programs start to achieve. In an AI setting, a program could have hundreds of different types of inputs, each with their own data type and respective subsystem for processing the input. The key distinction is that in Class IV programs, these subsystems have a high degree of connectivity, and thus generate more complex behavior.

Many robotics software systems could also be placed in Class IV.

Class V

The capabilities of Class Vs begin to resemble more complex animal behavior, such as rats (but not as intelligent as many apes). The primary characteristics of note are:

  • They have the ability to reflect on their own ‘thoughts’. In an AI program setting, this would mean it has the ability to optimize its own metaheuristics. In rats, for example, this is manifested as a basic form of metacognition.
  • They have the ability to perform complex planning, especially in which they are able to simulate the world and themselves in it. Which leads to:
  • They have the ability, to some degree, to simulate the world in their minds. That is, they can perturb their internal model of the world without actually taking action, and play out the results of hypothetical actions. They can imagine scenarios based on their knowledge of the world, which is intimately related to their memories (recall the memory capability from Class III).
  • Related to their planning and internal simulation capabilities, they have the ability to set their own goals and take steps to achieve them. For instance, a rat may see two different pieces of food, decide that it likes the looks of one of them better than the other, set its goal to acquire the better-looking morsel, and subsequently plan a path to get it. The planning part relies on actions it knows it can do – how fast it can or run, how far can it jump – and the terrain ahead of it, as well as memories of how it may have conquered that type of terrain before. Thus goal-setting and planning rely heavily on memory and the internal model.
  • They have a rudimentary awareness of their own agency in the environment. That is, when they are planning, they treat themselves as a factor in the environment they are simulating.

By this time, you have a program which is able to reflect, plan, collaborate with other agents, set goals, learn new behaviors and strategies for achieving its goals, and simulate hypothetical scenarios.

Class VI

You’re a class VI. So am I. Almost every human being is a Class VI – ‘almost’ because, well, this designation is questionable when applied to some politicians.

Programs of this class will start to resemble human-level intelligence and capability, though not necessarily human-like in nature. While in humans a major difference is more complex emotions, this scale does not consider emotions directly.

Artificial intelligence has not yet reached this level, and there are varying predictions as to when it will. The good news is that the expert consensus is clear on the idea that it will happen, it’s just that no one knows exactly when.

Key components of Class VI agents/AIs are:

  • Full self-awareness. The agent is fully aware of itself, its history, where the environment ends and it begins, and so on. This is related to consciousness, though Class VIs need not necessarily be conscious in a strict sense.
  • They have the ability to plan in the extremely long term, thinking ahead in ways that more basic systems cannot. Specific timescales are relative to its natural domain: for a person, decades; for an AI program, perhaps, seconds or hours.
  • Class VIs are able to invent new behaviors, processes, and even create other ‘programs’. In the case of a human, this is obviously an inventor creating a new way of solving a problem, or a software developer programming AIs somewhere in Brooklyn…

Class VII

This is what might well be referred to as ‘superintelligence‘. While some AI experts are skeptical of whether or not this can be achieved, there does seem to be broad agreement that it is imminent. Nick Bostrom writes elegantly about the subject in his book of the same name.

While nobody knows exactly what this may look like, there are two major distinguishing factors which would almost certainly be present:

  • They have the ability to systematically control their own evolution.
  • They have the ability to recursively improve themselves, perhaps even at alarmingly minuscule timescales.

Their first ability is perhaps their most profound. While humans do in some sense control our own fate, we do not yet have fine-grained control over the evolution of our brains and hence our cognitive abilities (though CRISPR may soon change that). With an artificial superintelligence, many limitations are removed. They can arbitrarily copy-paste themselves, ad finitum, and perform risk-free simulations of their new versions. They also will be essentially immortal, so long as their hardware persists and has a supply of energy.

With respect to the second ability, one might imagine an ASI (artificial superintelligence) making multiple clones of itself, each clone independently applying a self-improving strategy, and then each one in turn performing a set of benchmark tests to determine which one improved the most from the original copy. Whichever agent performed the best would become the new master copy, while the others would be taken out of the running.

This is a supercharged evolutionary algorithm, essentially. The tests would be agreed upon in advance, and even perhaps written as a cryptographically secure contract (blockchain-based or otherwise) to prevent cheating. In doing so, the agent would keep improving up to hardware limits or some theoretical asymptote.

The kind of scenario above is not at all unlikely in the near future.

 

Summary

AI capabilities currently exist somewhere between the Class IV and Class V marks, but are quickly marching toward Class VI. DeepMind and Facebook are leading the way in this direction, though other notable players are making important contributions. Certainly the brand-new OpenAI will have some interesting insights as well.

My hope is that this type of classification system, and others like it, will help bring some structure to the conversation around fast-emerging AI. With deeper clarity in our common language, we can have more meaningful and productive conversations about how we wish for this technology to advance and how it ought to be used. We owe it to ourselves to have the linguistic tools to accurately describe our progress.

A World Inside the Mind


Short post today, but a few things occurred to me as I was reading the paper on Bayesian Program Learning:

  • This form of recursive program induction starts to look suspiciously like simulation – something we do in our minds all the time.
  • Simulation may be a better framing for concept formation than via the classification route.
  • Mapping the ‘inner world’ to the ‘outer world’ seems a more sensible approach to understanding what’s going on. If you look at the paper, you also see some thought-provoking examples of new concept generation, such as the single-wheel motorbike example (in the images). This is the most exciting point of all.

A final design?

Combine all the elements together, along with ideas from my last post, and you get something that:

  1. Simulates an internal version of the world
  2. Is able to synthesize concepts and simulate the results, or literally ‘imagine’ the results – much like we do
  3. Is able to learn concepts from few examples
  4. Has memories of events in its lifetime / runtime, and can reference those events to recall the specific context of what else was happening at that time. That is, memories have deep linkage to one another.
  5. Is able to act of its own volition, i.e. in the absence of external stimulus. It may choose to kick off imagination routines – ‘dreaming’, if you will – optimize its internal connections, or do some other maintenance work in its downtime. Again, similar to how our brains do it while we sleep.

This starts to look like a pretty solid recipe for a complete cognitive architecture. Every requirement has been covered in some way or another, though in different models and in different situations. To really put the pieces together into a robust architecture will require many years of work, but it is worth exploring multi-model cognitive approaches.

If it results in a useful AI, then I’m all in.

 

What Computers Think About


It’s anybody’s guess, really.

That said, we do have some clues about what kinds of things go on inside the ‘minds’ of these little silicon monsters – under one specific condition.

There’s nothing more thrilling than seeing the spark of intelligence pop up in an AI system. You truly feel as though there’s something peeking out at you from behind all those numbers – a prototype of some bigger life form, curious and eager to grow as its learning algorithms wander the deep inner space of its mind. Yet all of this magic only takes place when there is active input, that is, when data is flowing into the system. This could mean it’s being fed images, text, audio, or raw numbers such as time series.

What happens when there’s no data flowing in?

Nothing. Nada. Zilch. Nichts.

The unexciting reality is that as soon as the flow of data is turned off, most of these things just go to sleep, so to speak. They stop. Nothing is happening in there, save for maybe a handful of residual calculations.

Spoiler alert: This is the condition mentioned at the top of the post. Computers ‘think’ about nothing when there is no data actively being fed to them.

I’ve written a bit about this before, but I reiterate that this stands in stark contrast to humans and other animals. Even in our sleep, our brains display a massive symphony of activity, repairing, adjusting, and moving memories around. Our most complex organ has a remarkable ability to reorganize itself, with or without the presence of sensory inputs. This should be a hint to us as to how we might build true AIs in the future.

So…what do computers think about, exactly?

As far as anybody can tell, nothing. Not yet anyway. For me, this is the most exciting part: creating things that persist in thinking even when there is no immediate sensory information flowing in.

Imagine if your laptop kept doing work even when you were away, and would notify you via your smartphone or smartwatch whenever it did/learned something particularly interesting or important.

Imagine if AIs of the future were trained as scientists, absorbing knowledge from human experts, and even when they ‘stalled’ would simply try new thought experiments. This is completely different from just finding patterns in data, and stopping when the data stops flowing.

Imagine if your house had a persistent AI that could think about cost-effective ways to improve itself, its property value on the market, or even how to organize a party within its halls. This requires a persistence that is not seen in today’s machine learning systems.

Who else is thinking about this?

I’ve referenced him before: Dr. Stephen Thaler has done some interesting work on this subject. Some others have mentioned ‘persistent AI’ in passing, but few seem to be focusing on it as a qualitative shift from passive machine learning systems like we use now. Even Siri is passive: it doesn’t do anything until you ask it a question or give it a command.

DeepDream and all of the related work got many people thinking about what AIs ‘see’ when they see the world, which is a similar idea to inner thought and persistence. This work shows some of what goes on on the inside, under the condition that the network is being actively stimulated from external sources.

To explore these ideas, I’ve been toying with simple AI models that that ‘think’ about their past experiences. They have a long-term memory bank, and a way of referencing past experiences through various measures of context. The choice of context metric is extremely important, which I’ll expand upon in a later post. This was partially inspired by Facebook’s Memory Network architecture, which showed a big shift in how we think about cognitive AI systems.

A past experience could be as simple as when it read a certain segment of text in an essay, or when it learned a new type of melody from a song. Our memories tend to be quite long, often entailing many sequences of intertwining sounds, sights, smells, and recollection of emotional states: “I was at the beach this last weekend, it felt amazing to just lie under the sun and relax.” In this example you’re recalling the time (or perception of it), the place, the feeling of the warm sun on your skin, and the emotions you had at the time – repose, tranquility.

AIs are different, especially the toy models I’m working on now. They don’t have high-level concepts yet, and it will be many years before they truly do. However, they can be enabled to have simple memories that are much smaller: a flashback to its particular state when it learned something new or performed some action, such as a prediction that it got correct. They also have a unique feature that we humans do not: their memories can be made essentially perfect. They can recall a scene with arbitrary accuracy, provided sufficient space in storage and/or memory.

The memory component is a necessary ingredient in useful persistence, as you would not want persistent AIs that forgot every interaction, everything they ever learned or did.

Imagine if Siri started remembering conversations it had had with you in the past? Admittedly, this could be dangerous for some.

What comes next?

My new AI startup, Machine Colony, will be taking up most of my time these days. However, as part of my work with Machine Colony and more generally, I’ll continue to investigate these working memory and long-term memory components in AI architectures. If I get really ambitious I may even attempt to publish something on it, be it a white paper or a full-on academic paper. At the very least, you can expect more blog posts and the occasional code snippet, likely in Python. I remain noncommittal because of time constraints, of course.

My sincere hope is that you finish reading this not necessarily with an immediate answer to a question in hand, but more that it provokes thought in the direction of “what if our devices and systems were truly intelligent and persistent?” It is worth thinking about how this may affect your life, because one thing is certain: it’s not a matter of if persistent AIs will emerge, but when.

 

Technology and the Limits of Convenience


I need an Apple Watch. Badly. I need it because the distance between my wrist and my coat pocket is simply too much, because I need to save that extra second when checking my phone for notifications. I need it because I need one more device to monitor my health.

While I’m at it, I also need an app that saves me a few seconds booking a table, finding the right bar for my Saturday night, and so on. Hell, anything that can save me those precious seconds throughout my hectic day will have my dollar.

The obvious facetiousness aside (I don’t need any of those things), I’m growing weary of seeing so many startups without missions. Don’t get me wrong, I’m all for creating amazing products. There is, however, an eventual lack of authenticity in the endless strive for greater convenience. These pure-convenience plays face continually diminishing returns.

It is easy to mistake one-off convenience for recurring utility. Entrepreneurs have gotten all too good at tricking themselves – and investors – that their ad hoc gimmick will scale to epic proportions, and keep compounding on its original value. Yet only the most central and important of product functions will see this happen. Along the peripherals, most utility is exhausted almost immediately.

It’s well known that the vast majority of startups fail. You can’t make them all into winners. You can, however, stress the importance of real, lasting, and growing utility. The more apps I see, and the more pitches I hear for the latest and greatest fad ever to hit the App Store, the more I feel like we need to focus on using technology to help us be better people. Beyond convenience, and beyond mere utility, there lies a realm of innovation wherein products are not actually products at all, but catalysts for social movements. Those same movements can help us become better citizens of humanity.

The job of the entrepreneur in all times before has been to find and capture economic opportunity. Now, however, a higher calling is in order: entrepreneurs need to rise to the challenge of taking the higher-level principles of creating things that bring about positive social change, and finding specific opportunities to execute on opportunities that build toward a greater goal. Building a business still takes as much savvy and boldness as ever, but with the new requirements of relevance to social context and mission-driven offerings. It may be the hardest problem of all, but it will turn out to be the most worth it.

Deep Learning & Temporal Modeling


In most discussions I’ve seen of deep learning, and certainly most of the models demonstrated, there is no discussion of temporal sequence modeling. I was curious where the state of the art was for this task, and thought to compare with some of my own intuitions about sequence modeling.

As a first pass, I found a handful of papers that discuss using stacked Restricted Boltzmann Machines in various configurations to achieve temporal learning – they are “Robust Generation of Dynamical Patterns in Human Motion by a Deep Belief Nets“, “Temporal Convolution Machines for Sequence Learning“, and “Sequential Deep Belief Networks“. The last of these three lays out their approach nicely in one sentence: “An L-layer SDBN is formed by stacking multiple layers of SRBMs.” It is, in essence, the stacking game continued.

While the approaches described in the three papers above would seem to yield decent results, I often wonder about extendability and scalability. RBMs / DBNs have lovely analytical properties, and cleverly get around intractable subproblems with use of sampling schemes, but their topology is nonetheless locked in all setups I’ve seen. This leaves no room for simulated neurogenesis.

Why would simulated neurogenesis be important? Moving the synapse weights around in a fixed topology yields nice results, but there may situations where we would want the topology to grow as needed – namely, if the network did not have a representation for a given pattern, it could create one. This assumes that we are ok with being slightly inefficient in terms of ensuring that the representation space is adequately filled before we generate new neurons. The tradeoff is a greater amount of space in memory.

Lately I’ve been working on these types of networks, and it is most certainly difficult to do. First you have the basic foundation of any neural network – learning spatial patterns. That part is relatively easy: you can quickly build something to learns to model spatial patterns and produce labels for them.

The next step is creating the dynamics that model temporal sequences. For example, a sequence of words: if I say “four score and-“, many of you will instantly think “seven years ago”. This is a sequence. The spatial patterns are the specific combinations of letters to form words, and the temporal pattern is sequence of those words. We learn this kind of thing with relative ease, but for machines this is a huge task.

Unsurprisingly, it is in this step that things get complicated. The noted Deep Learning approach is to specify a given time depth. In one paper T=3, meaning it can model sequences 3 time steps deep – in our example, up to 2 words in advance. When the network receives “four score and”, if it knows the sequence in question then it is thinking of “seven years”. When it gets to “seven”, it is thinking “years ago”.

Note that in one of the papers above, they use a different subnetwork entirely to model temporal constraints. Again, while this is nice from an analytical point of view, it likely has little to do with the way the brain works. The brain is essentially a hundred billion cells who knows nothing but how to behave in response to electrical and chemical signals. Their emergent behavior gives rise to your consciousness. The brain, at least as far as anybody can tell, does not have a “temporal network”. Temporal information is learned as a natural consequence of the dynamics of the vast network of cells. Somehow, we need to figure out a way to model temporal information inline with the spatial information, and make it all fit together nicely.

That said, the approach I’ve come to borrows a bit from Deep Learning, a little bit from Jeff Hawkins’ and Dileep George’s work on spatiotemporal modeling, and a little from complex systems in general. I’ve been searching for the core information overlap between different approaches, and have found some commonalities. From that, I’ve come to some notes of practice.

First, it almost always becomes necessary to sacrifice analytical elegance for emergent behavior. In many ways, emergent behavior is innately chaotic, and therefore difficult to model mathematically. Stochastic methods yield some insight, but there are higher-level states of emergence that may not be obvious from analysis of a single equation or definition of a system. In this case, it is simpler in practice to use heuristic methods to find emergent complexity, and attempt to characterize it as it is discovered, rather than attempt to discover all possible states from the definition of the system. A characteristic of chaotic systems is that you have to actually advance/evolve them in order to derive their behavior, as opposed to knowing in advance via analytical methods.

Second, and further emphasizing the use of heuristic methods, tuning the model with genetic algorithms tends to yield better results than attempting to solve for optimal parameters explicitly. Perhaps this is merely a difference in style, and if I’d spent more time studying complex systems I might know of better ways to do this, but at my current level of understanding a simple genetic algorithm that swarms over parameter configurations yields better results than attempting to understand what the “perfect network” might look like. There is a philosophical difference in that with this method you’re using the machine to understand the machine, in some sense surrendering control and rendering of insights to the machine itself. Genetic algorithms may be able to find subtleties that my slightly-more-evolved-ape-brain will miss or otherwise fail to conceptualize merely from the definition of the system and associated intuitions.

Deep Learning is advancing quickly, and while it offers some interesting food for thought when attempting to solve temporal modeling problems, I am not yet sold on the notion that it is the final answer to this more general problem. Choices of representation and methods of optimization may be trivial in some cases, but when they differ greatly from the norm they may yield some advantage. Not only that, but sticking closer to the way the brain represents information has done nothing but improve the performance and capabilities of the resulting systems. The path I’m on may all come to nothing, or it may shine light on some new ways to think about temporal modeling problems.

A closing note: A whitepaper describing my work is underway, so you can stare in awe at some formidable-looking equations and cryptic diagrams. I’ve been several years down this path now, and it’s high time to encapsulate all of the work done in a comprehensive overview.

Context & Permutations


In the pursuit of Artificial General Intelligence, one of the challenges that comes up again and again is how to deal with context.  To illustrate: telling a robot to cross the street would seem simple enough.  But consider the context that five minutes ago somebody else told this robot not to cross the street because there was some kind of construction work happening on the other side.  What does the robot decide to do?  Whose instruction does it consider more important?

A robot whose ‘brain’ did not account for context properly would naively go crossing the street as soon as you told it to, ignoring whatever had come before.  This example is simple enough, but you can easily imagine other situations in which the consequences would be catastrophic.

The difficulty in modeling context in a mathematical sense is that the state space can quickly explode, meaning that the number of ways that things can occur and sequences they can occur in is essentially infinite.  Reducing these effective infinities down to manageable size is where the magic occurs.  The holy grail in his case is to have the computing of the main algorithm remain constant (or at least linear) even as the number of possible permutations of contextual state explodes.

How is this done?  Conceptually, one needs to represent things sparsely, and have the algorithm that traverses this representation only take into account a small subset of possibilities at a time.  In practice, this means representing the state space as transitions in a large graph, and only traversing small walks through the graph at any given time.  In this space-time tradeoff, space is favored heavily.

The ability to adeptly handle context is of utmost importance for current and future AIs, especially as they take on more responsibility in our world.  I hope that AI developers can form a common set of idioms for dealing with context in intelligent systems, so that they can be collaboratively improved upon.