Saturday, September 17, 2016

Musing about inference control, biography and episodic memory

This is just some notes-to-myself type rambling about declarative and episodic memory and reasoning ... stuff I'm thinking through in the back of my mind related to some ongoing OpenCog detailed-design work....

It occurred to me last week that inference control (the control of which logical inference steps to take, in trying to resolve some question using reasoning based on knowledge) has a lot in common with the decisions a person makes about how to live their life --- both over the course of their whole lifetime, and in various specific contexts.  

Further, I think this analogy may be important in terms of guiding the interaction between semantic (declarative) and episodic memory.   That is -- I think that, in many cases, real-life or imagined episodes stored in episodic memory may serve as high-level structural templates for inference control...

At a very crude level, the analogy I see is: both an inference process aimed at resolving a question, and a series of life-decisions aimed at navigating a certain everyday situation, are concerned with achieving certain goals in a limited time-frame, using limited resources, and via a series of choices, where each choice made guides the set of choices that are next available.

At a more precise level, what I also see is that: both in inference control and in real-life everyday episodic human decision-making, the "fitness landscape" is such that it is a reasonably useful strategy to iteratively focus attention on local regions of decision-space, each of which can

  • be explored within reasonable accuracy in, say, 1-3 orders of magnitude less time than is available for the overall process
  • be explored more thoroughly, yielding generally better results, in the same order of magnitude of time as is available for the overall process

So, in the inference context, one can break one's inference goal into subgoals in multiple ways, where crudely exploring each way of breaking the goal into subgoals may take 1/10 or 1/500 the amount of time one has available for the inference.    Thoroughly exploring any one way of breaking the goal into subgoals may then take longer -- indeed it may take as much time as one has.

In the episodic context, for instance, if one is unsure what career to choose or who to marry, one can crudely explore a certain job or a certain potential mate in 1/5 or 1/500 the total amount of time one has to choose a career or mate.  On the other hand, thoroughly exploring and optimizing the possibilities offered by a given job or a given mate, if the choice is not a terrible one, may take as much time as one has.

So in both cases one carrying out a sequence of actions over time, in a context where the available actions depend on the actions one has taken previously -- and in both cases one heuristically has time to crudely explore maybe dozens, hundreds or thousands of local regions of action-space, before one's time runs out ... but one has time to thoroughly explore only a small handful of local regions of action-space, before one's time runs out...

In this sort of context, it seems, a reasonable approach will often be to:

  • Start out by trying a bunch of different stuff, gaining information about "where in the space of possibilities a good answer may lie"
  • Then, when one's time starts to run out, one should pick some of the best options one has found (maybe just one of them) and explore it more deeply.

In part this is just straightforward "exploration versus exploitation" stuff.

For instance, in the everyday life context: When young, one should try out many different jobs and date many different people, and try to understand what one can about the landscape.    But then once one gets middle-aged, the time has often come to pick a single mate or a single career area and focus on that.   The logic behind this is: In the years one has on Earth, one probably only has time to thoroughly explore and become great at a small number of careers, and to develop deep love relationships (or build families with) a small number of partners.   However, some careers and some mates will suit one better.  So given the nature of the fitness landscape, the best strategy is to look around a bit till one finds something that seems about as good as one is going to find before one gets too close to the end, and then at a certain point pick something "good enough" and go with it.   A review of this sort of process in the mate-selection context is given in this article.

In inference one has the same basic issue.   Suppose one wants to figure out X so that X is a person and X lives in China and X knows both p-adic analysis and particle physics.   But suppose one doesn't have much time to carry out the search.   One option is to look at online publications in those areas, and check out which papers have authors based in China.   Another option is to look at Chinese university websites and the listing of professors and their publications.   Obviously it's a wrong idea to choose only one approach and pursue it solely, unless one is very, very short on time.  Instead it makes more sense to attempt each approach a bit and see which one is more promising.    This is just "exploration versus exploitation."

But the nature of inference, and the nature of life-decisions, is that one has a series of exploration-versus-exploitation type choices, where the choices that one is presented with depend on the choices one has made previously .. and where exploring each choice often take an amount of time that is meaningful but not humongous relative to one's total available time.

The same sort of structure applies to social decision-making in contexts briefer and less consequential than choosing who to marry: for instance, figuring out how to entertain a specific person on a date, or figuring out how to get ahead in a specific company.  In each of these cases there is a limited amount of time, a series of sequential decisions to make, and a situation where one can explore a bunch of options roughly but very few options thoroughly.

An interesting question, then, is how much the analogy between inference-control decisions and everyday-life decisions helps a human-like mind in its thinking.   Are we actually helped by being able to consider our inferences as being like stories?  

A typical story has a beginning, middle and end -- where the beginning is about setting out context and making clear what possibilities exist, the middle is about exploring some particular possibility in depth (typically with great uncertainty about whether this possibility will yield a good result or not), and the end is about what happens from exploring this particular possibility (which ideally should have some surprising aspect, whether the exploration is successful or not).    A typical inference process will have the same sort of beginning, middle and end ... though it may be a bit more like a big fat epic Russian novel, with multiple possibilities, involving different characters, explored in depth during the middle section.

What does seem likely is that the brain re-uses the same mechanisms it uses for managing stories in episodic memory, for managing memories and patterns of inference control.    Evolutionarily, it is not clear to me whether sophisticated episodic memory came before sophisticated inference or not.   Perhaps the two co-evolved.

Using similar mechanisms for controlling inference and guiding episodic memory and everyday-life decision-making, should ease "cognitive synergy" between declarative reasoning and episodic recollection.   When declarative reasoning gets stuck, it can be helped out via recollection or simulation of episodes; and vice versa.

For instance, suppose a robot needs to figure out how to amuse a certain person.  Episodic memory might give it examples of things that have amused that person, or associated people, in prior situations.   Declarative reasoning might note that the person has a Pearl Jam T-shirt on, and might then tell the system to look for funny statements involving rock music.   The same goal can be explored both via episodic mind's-eye simulations, and via logical reasoning based on general background knowledge.   And the overlap can recurse.  For instance, if logic tells the system to look for funny statements involving rock music, episodic memory search might come up with specific past situations in which funny statements involving rock music have been uttered.   If episodic memory digs up certain people closely associated with the person in question, logic might come up with some clever conclusions regarding what would have amused these associates.   Etc.

This sort of cross-memory-mode helping-out would seem to be eased by using the same sort of representation for both processes.

This is interesting to me in terms of our next phase of OpenCog work, because we need to figure out both the best way to represent real-life episodes from a robot's everyday life in the system's memory, and the best way to represent abstractions from probabilistic-logic inference chains.  What this rambling, musing discussion makes clear is that we want to use essentially the same representation for both cases.   This way the commonality of the decision-processes involved in the two cases can be manifested in the software, and the ease of achieving episodic-declarative cognitive synergy will be maximized.

Morphics and Ethics

Reading the news about the Duterte, new Philippine leader, killing thousands of accused drug dealers and drug users without trial ... and noticing so many generally good-hearted Filipinos defend him on the grounds that he's "cleaning up the country" ... reminded me how far the human world is from understanding the weakness of simplistic utilitarian approaches to ethics ...

My own inclination, to be quite open about it, is toward a highly peace-biased conditional pacifism in the style professed by, for instance, Einstein and Bertrand Russell.....   I.e., I don't believe violence should be eschewed in every case, but I think it should be avoided except in extreme cases where -- after as much careful, compassionate reflection as the situation allows -- there really seems no plausible alternative but to do some violence to avoid even worse violence...

What I'll do in this post is connect these ethical issues with some more metaphysical and complex-systems-dynamical points....   I will lay out what I see as a  fairly conceptually obvious connection between the notion of morphic resonance aka “tendency to take habits”, and the reasons why a naïve utilitarian approach to ethics could be expected to generally fail in reality, whereas conditional pacifism could be expected to do better...

Morphic Systems

I'll start in a fairly airy abstract realm, and then eventually get back to the practicalities of pacifism....   

I'll start by formulating the notion of “morphic dynamics” in a highly general way.   My notion of morphic dynamic is inspired loosely by Rupert Sheldrake's thinking on morphic resonance, but is not quite the same as his idea....  (Rupert is a great guy and a deep, honest, adventurous thinker; and we have discussed these ideas a few times, and we don't exactly disagree profoundly on anything, we just have different intellectual styles and orientations.)

I suggest that: A system may be said to be “morphic” if its dynamics manifest the “tendency to take habits”  (the latter phrase being drawn from the philosophy of Charles Peirce) – i.e. if it’s the case that, within subsystems of the system S, the odds of the future resembling the past are surprisingly high.   

What does “surprisingly” mean?   That gets subtle, but one way to formulate it is: “Surprisingly often means significantly more often than in a random possible world meeting the specified conditions.”  

Suppose there are 10 different subsystems of the system S, in each of which one has observed pattern P 5 times during the last hour.    Then, across these subsystems, what will be the distribution of the number of occurrences of P during the next hour?   

In general, one would expect the mean of this distribution to be 5.  But in a morphic system S, the variance of the distribution will be much narrower than one would find via looking at random systems.   Because there would be a surprising tendency for the pattern distribution in the future of a subsystem, to resemble the pattern distribution in the past of a subsystem.

Smolin’s “precedence principle” suggests that the physical universe is morphic in a similar sense (though he uses a quite different language), and derives aspects of quantum mechanics therefrom.   Sheldrake’s morphic resonance theory suggests the biological, psychological, physical and metaphysical universe is morphic in a similar sense, and seeks to explain a variety of phenomena such as psi, epigenesis and the origin of life in these terms.   

Regardless of whether the universe is foundationally morphic, though, it may still be the case that particular systems like, say, human minds or human societies are morphic.

One way that society would get to be morphic, apart from any general principle of morphic resonance, would simply be via the tendency of people to jump to conclusions emotionally (even before the evidence merits it probabilistically), and the tendency of people to copy each other.   Both of these tendencies are, of course, very real and well documented.

If human societies are morphic then this has significant ethical implications.  It affects the logic of voting – in a morphic society, on the whole, whether one person votes today, has a surprising impact on the number of people to vote tomorrow.   As another example, it also has implications regarding the argument for pacifism.

Pacifism and Morphic Dynamics

--> My father’s parents were Quakers and devout pacifists.   I grew up with a highly pacifist orientation as well, to the point where up till a certain point in high school, I tended to let other kids beat me up, simply because I felt it would be wrong to hit them back.   I hated being beaten up, but I also had no desire to hurt the other kids, and felt hurting them would still be wrong, even though they were hurting me.   At a certain point I was just getting beaten up too often, though, because certain bad-hearted kids had decided it was really fun to beat the crap out of the local pacifist every day after school.   I started fighting back, which predictably decreased the incidence of attacks on me.   I wasn’t quite convinced this was philosophically correct, but in practice life pushed me to adopt what philosophers would call a conditional pacifism, with something of a utilitarian flavor.

Einstein and Bertrand Russell were also conditional pacifists – they were strongly biased against violence, yet both advocated fighting back against Hitler, feeling that in this case taking a pacifist hard line would cause much more harm than good.   In general, if one is conditionally pacifist in their style, one believes that violence should generally be avoided, but that in some extreme cases it may be the most ethical course to take.

On the other hand, as I write these words, the new leader of the Philippines, Duterte, is making headlines for large-scale extrajudicial killing of suspected drug dealers or drug users.   It seems clear that some false positives are occurring in this process – i.e. some folks who are being killed, were not actually drug dealers or drug users.   But a utilitarian argument could be made that this is a justifiable cost, if it results in a massive decrease in drug use across the nations, because the drug epidemic is killing so many people. 

Clearly the conditional pacifism of Einstein and Russell was not the kind of simplistic utilitarianism that would justify Duterte's recent actions.  Yet, as a child and on into adulthood, the conceptual foundation of their more sophisticated style of conditional pacifism has often vexed me.

Even fairly extreme pacifists such as Gandhi have acknowledged the inevitably conditional nature of real-world pacifism.  Gandhi noted that living in the world almost inevitably involves doing harm to some other beings; but that if one acts with awareness and compassion toward all living beings, one will be able to minimize the amount of harm one causes.   This may not have been the emotional orientation of Einstein and Russell, but it would have been quite possible to fight Hitler’s army while feeling compassion for Hitler himself and his soldiers as well.    Similar to how one may feel compassion for a rabid dog, yet still shoot it to avoid it from spreading rabies and thus causing even greater harm (and in that case, to end its own suffering as well).  

But conditional pacifism does not equate to naive utilitarianism in which one kills or harms whenever a simplistic calculation suggests one may save 2 lives by killing one guy.


One argument for having a strong bias toward peace – in the style of Einstein and Russell -- is that, to put it simply, violence tends to breed violence – and sometimes in non-obvious ways.

The “violence breeds violence” argument against Duterte-style utilitarian murder, argues that solving problems with violence tends to lead to further problems indirectly, down the line.   So that, for instance: Even if it’s true that lives are saved via the extrajudicial killing intimidating people into not selling or using drugs, achieving this goal via this means creates subtler problems.  It creates people who hate the government due to its murder of their innocent friends and family members.  It scars the minds of the killers themselves in various ways, with various (mostly bad) consequences.   And it also leaves people with the same psychological and social problems that pushed them to use drugs in the first place – which may then find an outlet via other means … suicide, emotional abuse of friends or family members, etc.  

The particulars via which “violence breeds violence” may be quite complicated.  But the point I want to make here is that the existence of SOME such particulars would follow naturally from the assertion that society is morphic … whether due to manifesting a broader cosmic principle of morphic resonance, or “just” due to that being part of the nature of its self-organizing dynamic.

So, for instance: If one holds that life is generally valuable, then the hypothesis of a morphic society would lead one to the conclusion that one should not generally kill N people to save N+1 people, because doing violence often has indirect consequences that are bad (for life-forms associated with the violence in various ways).   In some cases one should kill N people to save N+K people for various K; but the more morphic society is, on the whole, the larger K would be.

In terms of the practicalities of ethics and pacifism, I have certainly broken no new ground here.   In terms of conventional philosophical categories, I suppose my point regards the potential derivation of certain ethical stances (e.g. variants of conditional pacifism) from either a) metaphysics or b) empirical facts regarding the nature of complex social systems.