Showing posts with label psychology. Show all posts
Showing posts with label psychology. Show all posts

Wednesday, October 21, 2009

SIHM: Why Do We Dream?

There are many ways to answer this question. Most answers I've seen, from various fields from neuroscience to psychoanalysis to common, address some part of the functions of dreams and contain a good deal of truth. What we lack at the moment is a coherent theory as to why it is necessary, especially in the form it exists. What would we not be able to do if we didn't dream at all? What would we not be able to do if we dreamed differently?

As explained in a previous post - Structure and Interpretation of Human Minds - the tasks that the mind has to perform for us to even deal with the basic everyday life are rather overwhelming in scope. At the immediate level, it has to process sensory information and respond in real time. In order to respond properly it needs an elaborate model of reality.

The Structure of Reality

What we commonly call "reality" in conversations is what I refer to as a model of reality - or some common subset (or sometimes a superset) of such models within some population. For instance, I may say that Peter the Great was a real person, or in a more convoluted way, that the historical existence of Peter the Great is part of reality. What we're saying is that we have accepted as part of our model of reality that he existed in the form we have generally modeled him through our common imagination. The earth rotating around the sun, various physical laws, etc, are all aspects of our model of reality, aspects that are accepted by a large percentage of the human population.

But not all modeling happens in the form of strict propositional truths. Ultimately, what's more important than modeling the world propositionally (by encoding reality as a series of factual propositions) is mapping situations to reactions. Propositional truths, at best, can be seen as a tool that helps accomplish this mapping more efficiently. While simpler cognitive systems (many animals, many computer programs, etc) can be wired to react to specific stimuli, the cognitive problems we deal with are far too complicated without using propositional truths. It is because our modeling has reached this level of sophistication that we have a concept of reality.

Then, our model of reality can be seen as some sort of computational network populated by a large number of heuristics, some of which encode propositional truths and others code for reactions to situations. One important point from my earlier post Structure and Interpretation of Human Minds was that the mind does not clearly separate propositional truths from behavioral heuristics and all sorts of random heuristics get encoded as truths as long as they support seemingly advantageous behavior. These are, in some sense, indistinguishable from other propositional truths. In fact, all propositional truths are encoded as such ultimately for this reason - it's just that we do enjoy being right and/or being confirmed by others. Thus in domains where other emotional forces are weak, our model of reality tends towards truths that are verifiable by others as such.

One may ask, at this point, how does this model of reality in terms of these heuristics encoding truths and situational behavior - let's call those rules - get used? Let's take an example of someone driving. The driver has to be constantly aware of the causal consequences of his own actions. He has to know what the gas pedal does and what the steering wheel does. He also needs to predict how other cars will move, based on his experience, based on his knowledge of the traffic signals, etc. These rules combine to give him a sense what is likely to happen - they limit the range of possibilities his mind must consider in real time. Then the rules that govern his behavior kick in to guide his actions towards more positive possibilities. Note that deciding to pay attention or spend time thinking about something itself is immediate reaction that needs to be learned. He cannot afford to figure out, when he's about to run over a pedestrian, how much time he has to consider what to do. He must react, and he must have already known that's what he needs to do. On the whole, those rules code for the range of possible future situations at any given moment (in other words, cause and effect or how events progress over time which is why causality is such a significant part of our model of reality, despite poor logical justifications for it) and proper reactions (in some cases it could just be deliberation - you may not have already the answer to some math problem seen during a test, but at least you know what do) to them. This is, effectively, reality.

Reality and Dreams

What does any of this have to do with dreams? My contention is that dreams make all of this possible. What's even more overwhelming than the number of rules that constrain possibilities is the sheer range of possibilities before applying the rules. The rules we use to generate possible realities in our mind must both be sufficiently narrow to exclude outrageous ones (which allows for faster reaction and a lighter cognitive load) yet not neglect even unlikely possibilities that have significant damage potential. Having a wrong set of rules could be disastrous - the driver may not see that the truck coming his way is on a collision course, or that a toddler is not looking his way and won't get out of the way. Yet, from a computational standpoint, sometimes the only way one can tell if one rule is better than another is to try out both on some level. This is where dreams come in - dreams provide a safe testing ground for new rules. Thus it is during dreams where we figure out what reality is. We make up all kinds of alternate rules for reality (how things are) and for behavior (how we should respond), and figure out which ones make sense and which ones don't. To some extent, daydreaming (or thinking to a lesser extent) serves a similar purpose, except that some rules are difficult to train under this scenario, since the mind must perform a lot of other cognitive tasks when awake - this increases the possibility of inappropriate or even dangerous reactions (or non-reactions) to external stimuli. If your imagination is too vivid, you may not be able to respond properly to physical stimuli; if your imagination is not vivid enough, you're not able to train certain rules or consider larger changes in the rule set. Those with schizophrenia, for instance, appear to daydream in an uncontrollable manner with nearly the same level of vividness as others dream at night. Part of the rigidity of human sleeping/dreaming patterns, some of which may seem computationally inefficient probably has to do with the extreme difficulty of determining the meta-rule that determines when it's okay to dream - it's difficult to simulate the effects of dreaming itself within a dream. One speculative hypothesis I have is that at least some cases of mental illness may be caused by irreversible meta-training of the process of dreaming itself - it may allow the entire computational stage for determining reality to be hijacked by a narrow emotional need.

Other thoughts

I've recently heard the Jessica Alba refutation to a related general hypothesis that dreams serve an active cognitive purpose. It goes like, if dreams help you prepare for reality, why do I have a threesome involving Jessica Alba and Snow White in my dreams, like I need to prepare for that possibility? This refutation directly supports my hypothesis. You know it's ridiculous precisely because you have dreams along that line. Our rules for figuring out what's absurd or not must be developed as well. For nearly any absurd dream, you can probably find a mentally ill person who believes in a similarly absurd reality. If you don't take for granted that you know the difference between real and absurd, learning what's absurd requires simulating absurd scenarios, at least in some cases.

Beyond absurdity, the other common theme in dreams is threats. This is also expected by the hypothesis. Reality needs to be most precisely modeled (and our responses most intensely rehearsed) in potential situations where significant action is required and incorrect action is costly. Thus the mind is biased to remember and generate rules based on emotionally intense scenarios.

What I have not attempted to explain is why we remember some dreams but not others (most) - most likely this has no clear computational purpose; remembering dreams is likely one of those slightly incomplete adaptations that do not have significant adverse effects and thus remained. Again, because of the difficulty of meta-training of the process of dreaming itself, a lot of the specific mechanisms of dreaming, other than the requirement that the mind not have to perform any significant cognitive task at the same time, are probably not particularly adaptive, merely not dramatically maladaptive.

Thursday, July 2, 2009

Structure and Interpretation of Human Minds

In an earlier post, I explained that cognition is best understood as interaction between mental processes. Here, I explain the nature of some of those higher-level mental processes and the interaction and relationships among them. Some of those explanations are, in many ways, simply rewording of some obvious things we already know about the human mind. Others are speculative hypotheses.

Before discussing how the human mind works, we can consider what it must do. Here are some broader classes of computational tasks that our mind performs:
  • Modeling natural phenomena - the mind must model the physical world.

  • Modeling social phenomena - the mind must model the social structure, including self, others and any interaction amongst them.

  • Establish preferences and actions to perform - the mind must somehow learn to know what to like, what not to like, what to do and what not to do.

  • Allocate resources among various processes - the mind must allocate its limited resources using some control structure At any point in time, there are many things we want to do that cannot be performed simultaneously - the mind must prioritize between these tasks. Furthermore, the mind must decide what to think about, as well as what to pay attention to.

Of those computational tasks, modeling of the social structure and resource allocation using a control structure are intertwined in an interesting way. Undoubtedly, one's comprehension of the social structure must be taken into account in the way the mind prioritizes the tasks. For example, consider a soldier. The military command hierarchy largely dictates the decisions he makes. He may have his own preferences regarding what to do, but when he receives an order from his superior, that is what he must do - it overrides his other personal preferences. While it's tempting to use a generic decision-making framework where the mind does a global cost-benefit analysis before making decisions, soldiers obeying orders do not first question orders, evaluate the pros and cons and act accordingly - they instinctively obey orders. Remember that whether to do a cost-benefit analysis itself is a decision, as well as deciding how much time and cognitive resoures to spend on the analysis. But many decisions must be made in real time - a soldier must choose between retreating and saving a comrade's life and may not have more than a fraction of a second to decide. By the same token, we follow social conventions every second of our life, without having the luxury to question or scrutinze individual decisions. When a mother with two kids gets on a subway train, she has to balance her own needs with the kids' needs and other passengers' needs. She must pay attention to many things, including potential threats and her kids' behavior.

While in the soldier example, the control structure is about doing what one is told, the control structure here is much more nuanced - it's about attention and more subtle social obligations. The mother knows what her obligations, to herself, her kids and other passengers, as dictated by the social structure are and her attentional resources are divided accordingly. Should any emergency or any other situations requiring decisions arise, she'll know what to do - there would no particular need for her to perform a cost-benefit analysis. Notice, for instance, that when you're on a train (and are not the mother), you also pay more attention to the kids than to adults. In fact, one would notice that the amount of positive attention you pay to someone is (let's ignore for time being how we can't help but pay attention to homeless people who smell and other factors that demand our attention) highly correlated with the degree to which you would be socially obligated to help the person in an emergency.

So what does this all mean? The control structure is some sort of a global process. Our mental representation of the social structure, likewise, is a group of interacting processes. We must model each person in our social network, consider the relationship between the person and self and the variety of rules, written, unwritten, real and imaginary by which this relationship is governed. To the extent that the control structure, even at the most subtle level, takes into account this social structure, the group of interacting processes that model the social structure effectively controls the control structure, which is another way of saying that those processes form part of the control structure (control over control is control). Thus, the processes that model the social structure (with all the subtle social rules that detail our obligations under a variety of scenarios, many of which never come to pass) partially governs the mind. Thus, in this sense, the mind's internal system of control, mirrors the subtle control structure inherent in the society's rules and obligations.

Where does the rest of the control come from? Self, of course. Everyone has basic needs and desires. Though many things that we think of as our own desires are a combination of our desires and social conventions. We don't generally desire nice clothes for ourselves at first - we want to look nice to others. This is where preference learning comes from - not only are we explicitly influenced by what we've learned as other's preferences and take those into account, we learn to incorporate those preferences as our own. Over time, means become an end. Note that this preference learning process is effectively a form of precomputation (though all learning, on some level is). By incorporating what others want and wanting it yourself, you can skip the process of having to model. At the same time, complex behavior cannot easily be modeled as preferences. In fact, even something as simple as eating vegetables, which should be modelable as such, often isn't. Many carry an aversion to healthy foods well into their adult life and learn to eat vegetables not as a matter of preference for its taste, but as some sort of obligation to self.

Thus precomputation of socially desirable behavior as preference has limits - this does not mean that other forms of precomputation aren't possible. As mentioned before, we often tend to just know what to do in fairly novel situations that we've never been in before. It can also be critical for the mind to partially precompute decisions that need to be made under infrequent emergencies - those are the precise situations where one can't afford to leisurely consider various possibilities. This is where our modeling of natural phenomena and social phenomena comes in - in order for us to quickly respond in situations of importance, we're constantly using our models of reality to simulate reality (this encompasses imagining, daydreaming, nightdreaming and plain-old thinking - it can be done consciously or not, while sleeping or awake) in our mind. This computation can be seen as training of the control structure using the model of social and natural reality, but it can also be see as training of all of those. Some faults or incongruity in our understanding of reality can certainly be resolved by elaborate simulations.

All of this suggests some kind of correspondence between the structure of a society and the structure of a mind. To the extent that we simulate the social reality in our mind to make decisions, the social reality, or at least some virtual model thereof, drives our decision making proces - in fact this simulation process is largely the hypothetical control structure we were speaking of earlier. Furthermore, the feedback goes back the other way - to the extent that we, then, interact with others using results derived from our model, social interaction is borne out of our mental model of social reality.

On some level, everything in this post is a fairly obvious observation regarding our mind presented in a somewhat unconventional framework. Yet, this correspondence between society and mind has profound implications regarding our ability to study the human mind as a computational system. It's difficult to study how a mind functions because we have no inherent ability to interpret what's going on inside. As argued here before, neurological studies tend to be fruitless in understanding higher level functions because there are simply too many abstraction layers. However, understanding the nature of correspondence between a social structure and a mind may allow us to see, on a higher level, how the mind functions internally - after all we can directly observe many aspects of social interaction. Furthermore, we can apply some principles of computation, especially with the understanding that the system must have evolved and with some guesses regarding specific selective pressures it evolved under.

For instance, because the process of reality simulation is crucial to the control structure, we seem to use it not merely to simulate possible realities, but rather to manipulate the process itself to get ourselves to do things that some part of our mind thinks is a good idea. One good example is that some people imagine their deceased parents when they want to do the right thing. It's not that their deceased parents are a relevant part of social reality but rather that thinking of them is a way the mind came up to help make certain decisions. This sort of exaptation, where features that evolved for one reason are co-opted for another, is a common theme in evolution. My hypothesis is that many goal-driven processes in our mind (any desires, wants, etc) are constantly hijacking this largely subconscious reality simulation process in order to pursue their own agenda. Once the reality simulation becomes an important part of the decision making process, this sort of hijacking is nearly inevitable. Thus the reality simulation process, which can be seen as a complex network of processes that represent elements of social reality (such as mental model of others that are socially relevant) must also deal with various mental processes that aren't necessarily modeling any external reality, but rather elements of desires. This answers a question from earlier: how do we balance the needs of self with the needs of others? - we allow the needs of self to hijack our model of how we should behave. This is why, despite being incredibly social aware, we're still a bit self-centered - if there was no such hijacking, we'd perceive reality in a neutral way and act as though our needs were no more important than those of others.

This hijacking also explains the phenomenon of wishful thinking - if wishes or desires are hijacking the process of simulating reality which helps us clarify what reality is, it's no surprise that some aspect of what we want appears to be part of reality, because we can't necessarily figure out whether something appears in the simulation because it's an aspect of reality or because it was inserted by our desires.

It appears, then, that we're powerless against our own desires manipulating this reality simulation process. But we already have methods for dealing with other processes. If we can imagine our mother telling us what to do in this reality simulation process, we also need to, if necessary, tell her, hopefully in some polite way, to shut up so that we can do other things instead. How we imagine we would interact with others in this reality simulation process is how we govern mental processes representing our models of others. It's imagination in the sense that you're not actually interacting with others, but it's real in the sense that you're actually interacting with those mental processes. Of course, this general methodology cannot be too far from how you interact with others, because if that's the case, you're no longer simulating reality, but fantasies. While some fantasies may be mentally healthy, we do need to model at least some part of reality to make reasonable decisions. Anyway, when the desires intrude upon this reality simulation process, we are likely to use a mechanism we already have to govern them - the same used for governing mental processes representing others. Thus how we govern our mind, all those conflicting desires and wants, is largely reflective of how we imagine we would govern others, which in turn reflects how we actually interact with others. This neatly explains megalomania - governing your own desires is genuinely difficult and one way to do it is by giving a lot of power to self in the reality simulation process. Unfortunately, while this can be useful for governing inner desires, it necessarily leads to a distorted view of self in relations to others and affects social interactions accordingly.

Thursday, May 28, 2009

Optimal Market-Neutral Investing

Here I describe a conceptual framework for investing that I call Optimal Market-Neutral Investing (OMNI). I don't believe that it's entirely new - certainly you see people implementing similar schemes and I believe all great value investors understand the benefits of this technique at least to some degree, whether they explain it in this manner or not. Thus, while I came up with it as primarily a prescriptive tool for myself, it's also descriptive of best practices.

Let's first clarify - what does it mean to be market-neutral? Many would describe it as having a balanced position of longs and shorts in such a way that whether the stock market as a whole goes up or not does not, on average, affect, the value of your position measured in your native currency. Yet, clearly you do care what the market does - if the market suddenly decides that the stocks you bought are worth much less and the stocks you shorted are worth much more, you lose a lot of money even if your estimate of the value of your position doesn't change.

My definition is quite different - when I say market-neutral, I literally mean you do not care what the market does. But how could you possibly not care what the market does? It's simple. Say there's some stock X priced at $10 that you think should be valued at $15. In short, you expect the stock price (adjusted for time value of money) should reach $15. So you buy some amount of X at $10, because it's clearly undervalued. But observe this - if the stock goes up to $11, you've realized gain (and would sell some part of your position, reflecting your decreased expected rate of return on the position) and if the stock goes down to $9, your edge goes up, which allows you to add to your position with an increased expectation for that additional purchase. You can solve for the position size at any given price point that leaves you market-neutral, given some set of assumptions (this includes the possibility that price action is indicative of change in value) regarding price and value.

The precise math I feel is not that important (though I may elaborate later). On no stock can we estimate all the required numerical parameters precisely enough for the explicit math to be all that helpful. The point is that for any stock that you feel is undervalued (which implies that you have some ability to compute its value independent of the market price), there's some position size greater than zero that leaves you market neutral. If the price goes up, you realize gains, if the price goes down, you're being given a larger opportunity. While we can't compute this precisely, our intuition - even emotions - can be used to arrive at this number. After all, you know when you care or not. Thus, the position size is precisely the amount at which you're neither rooting for the stock price to go up, nor down.

This is a difficult balance - part of the reason that most people are poor at investing is that people fundamentally like rooting for things to happen. We pick sides when we watch sports, even if we don't have a natural rooting interest. We root for specific people to succeed in reality shows. The specific psychological reasons for this are beyond the scope of this post, but rooting for something is entertaining for most of us. Yet, rooting for things to happen makes us biased. Almost no human has the ability to see the world in an unbiased way when he strongly prefers one outcome over another. Thus, even without any other benefit, OMNI allows one to always stay in a neutral state of mind, which allows for clearer thinking.

The other reason OMNI is preferable over other forms of value investing is if your investment basis is that some stock is undervalued, this gives you no meaningful basis for predicting its short-term price action. Note that over the short-term, the price volatility far outweighs the expected return due to valuation. Even with a fairly optimal scenario - say your stock is expected to outperform by 10% a year - that's just 4bp or 0.04% a day, which is easily overwhelmed by typical daily volatility (it's certainly not all that uncommon for stocks to go down 5-10% in one day without a significant change in valuation - that's 100+ times the expected return). In other words, any additional exposure over the amount that puts you at market-neutral does not meet any reasonable value investor's short-term risk-reward ratio. Having a strong conviction of one's valuation does not change this. The more certain you're of your valuation, the more likely that you would root for the price to go down, as opposed to up, which means the position sizing can be greater but that does not mean you need to position yourself in such a way where you must root for the price to go up. It means you're at a point where you can't take advantage of any further price declines - in other words, you're not that sure about your valuation after all and you're exposed to short-term price action, over which you have no control.

While I described this from the perspective of a long-only equity investor, everything here applies to nearly all forms of value investing, including (especially!) fixed income arbitrage, shorting based on valuation, derivatives or any other instruments. In conclusion, if you are investing primarily on the basis of value and ever find yourself hoping for the market to move in your favor in the short term, it's very likely that your risk management needs work. Certainly, almost all risk management failures by value/arbitrage-based investors (LTCM comes to mind) can probably be attributed to large deviations from OMNI.

Preliminary Thoughts on Cognition

In my previous post, I talked about an economy as a self-organizing computational system that consists of economic agents. But automated systems aside, economics agents are largely human. Thus one can't understand an economy without understanding the idiosyncratic nature of human cognition - here's my take. Note that I'm not that well-read in cognitive sciences or psychology and my use of terminologies may be contrary to how they are used by experts in various fields.

A human mind, much like an economy, itself is a distributed computational system. The manner in which this distributed computation works requires close examination. First, different areas of the brain are responsible for different functions. Neurofunctional analysis reveals that some areas have specific functionalities across all humans, while other kinds of specialization based on brain locality show variation with some statistical patterns. Neverthelesss, the picture we have is that of a self-organizing, physical, computational network.

But that's not the whole picture. In fact, it's not even the most useful one. Imagine using a modern computer to build a multimedia web site. You'd be using various software packages to record sounds, videos and take photos, perhaps edit them using other software packages and test them out using yet another software package and upload them to some remote server. While it's clear that a lot of different hardware components were working together to help you achieve this goal, the interaction at the hardware level, by itself, would be entirely incomprehensible, and without understanding the interaction at the software level - betweenvarious software packages and the operating system (which themselves are composed of interacting processes) coordinated by the user and the system to achieve the desired outcome. It's not that your mouse, keyboard, CPU, RAM, hard disk, monitor, video card, motherboard, USB ports, etc, didn't work together - but that the specific activity cannot be meaningfully comprehended (or even distinguished from any other activity) by examining interaction at that level.

Likewise, while simple forms of cognition can be understood as interaction among different areas of the brain, more complex cognitive tasks not only engage different areas of the brain, but also different global processes, each of which is utilizing multiple areas of the brain. This is the second picture we have of the mind - the mind as a self-organizing computational network of mental processes. This is a virtual network built on top of the physical network. Keep in mind that as with computers, exactly what constitutes a single "process" depends on the point of view - often what is recognizable as a single process can also be seen as a group of processes and so on. This sort of issue exists with genes, species, culture, race, etc, but the inability to precisely delineate does not stop us from using the concepts usefully in communicating knowledge. To conclude, if the key to understanding economics is understanding the nature of interaction between economic agents as well as the nature of economic agents, the key to understanding the human mind is understanding the nature of interaction between mental processes as well as the nature of mental processes.