A New year’s post!

Kumbakarna

Kumbakarna

Happy new year all 🙂 Belated wishes and wishes still even if somebody moved your new year to a different date 😛 On Vishu day, (apparently) it is tradition to pick a random chapter in the Ramayana early in the morning, and whatever is read is said to have some impact on the reader’s life in the coming year. I tried it yesterday and the chapter I picked was about Vibheeshana’s confrontation with Ravana. It was quite serendipitous as the event has constantly been a source of confusion to me. To elaborate …..,

Vibheeshana

Vibheeshana

Two of Ravana’s brother are source of particular interest – Kumbakarna and Vibheeshana. Both, at some point advise Ravana against a war with Rama. However Vibheeshana is shouted at for this advise and  leaves Lanka to join forces with Rama and betrays many of Lanka’s secrets to Rama. He is later anointed King of Lanka after Ravana’s death. Kumbakarna makes the same advice but follows it up by comforting Ravana speaking of an assured victory despite knowing fully well what was in store for him. Kumbakarna is eventually killed in battle.

Kumbakarna’s actions are all too familiar. Actions like his are replicated in the Mahabharatha and is generally seen as the nobler of the two courses. Vibheeshana is often criticized for betraying his King and is commonly seen as an usurper and traitor. So then what is the confusion? Vibheeshana is (at the end of the epic) ordered by Lord Vishnu in the original form to guide people towards Dharma. He also becomes an immortal joining the ranks of Hanuman, Parasurama and Mahabali. What the _?

For those of us who are used to seeing the epics in black and white (no, not literally) – and thanks to Ramanand Sagar for this – this situation is confusing. What is correct here? Too often in life we are faced with similar situations. When and why is it ever right to be a snitch!! And the epics seem to be of no help here – both courses are shown as good and not against Dharma. All along, Valmiki continually praises the qualities of Vibheeshana – he is at no point portrayed as greedy or selfish. Instead, the descriptions are

“Vibheeshana spoke to powerful Ravana the words convinced of reason and which were very much beneficial. He, who could discriminate between good and evil things in the world, having sought the favour from his eldest (half-) brother by means of soothing words arranged in an order, spoke in consonance with place, time and purpose.”

I am not still fully clear why this action is considered correct. I am not at that level yet. But the original author clearly seems to think so. Feel free to read the original text and make sense of it. If you come by interesting commentaries, I would love to be notified.

The intention that drives your action is perhaps more important than the action itself. From a different perspective, this episode reinforces the idea that there is no distinct line between black and white in such situations.

I want to make a special note of this because it is very easy to get lost in the strongly polar natures of the main characters in the epics. The epics would seem to be of no practical use as situations or characters as seen in them would never happen in real life. In fact however, there is a large trove of such useful tips and indicators buried within them. Many answers are here. So take a closer look.

References and Further reading:

Note: Nope, this is no longer going to be an exclusively tech blog. There is enough boring content on the net already. Time for some arbit content. Sure there’s enough of that too, but the world could always use more 😛

On Tigers, diffusion and chaos

Tiger

RT @sanchan89 Always good to know that my mojo is still intact after 4 years 🙂 Take a look http://bit.ly/bGv5su

So, after quite a while, I tried sketching again. And it came out pretty neat, I suppose. But then, I want this to be a tech blog, right?

We humans, have a somewhat dull skin[1]. It is completely bereft of any fur[2] and any pattern to be had on are to be painfully tattooed. Look, on the other hand , at the pervasive presence of spacial patterns on animal coats and flora. Most commonly seen in plants are the rosette patterns, and self replicating branching systems. Mammals and fishes are so much richer – their fur coats come with stripes, spots, rosettes, bands, blocks, combination of these  and in the case of some sea shells – Serpenski triangle! Even in animal behavior, there is so much elegance – if you have not seen the movements of large schools of fish or birds in flight, you have a serious problem and you should consult a psychotherapist. Even the inanimate desert sands are beautifully patterned with near parallel curves.

Spatial patterns collage

Spacial patterns collage

It makes us think, doesn’t it? How are these patterns formed?

If every skin cell were to take on either black or white color with a uniformly random probability, then a zebra would look like white noise. Try imagining one with a coat like that. No probabilistic distribution is ever going to generate patterns as fantastic as those on every tiger. Does every cell, then, have a global spacial view of itself? Is it possible that a single cell knows that it is a part of the stripe across the head of the tiger, and therefore, it should take on a black pigmentation? That seems like something phenomenally complex for a single living cell to know.

Related problems in developmental biology are cell differentiation, and Morphogenesis. Every cell in an embryo is the same. Embryos are homogenous; and yet without a single central controller, cells in different areas of the embryo develop into different parts of the body. Some develop into the the heart and lungs and others into brain and legs.

The first explanation for this phenomenon was provided by the British Mathematician, code breaker, logician, computer scientist ( and during the later days of his life, a chemist )  Alan Turing in his paper titled ‘The Chemical basis of Morphogenesis” in 1951.  ( This paper has its own wiki page ) The paper described mechanisms; borrowing heavily from concepts of self-organisation, well known in physics; by which non-uniformity may arise from uniform homogeneous states, and outlined the reaction-diffusion theory of morphogenesis. Reaction–diffusion systems are mathematical models that describe how the concentration of one or more substances distributed in space changes under the influence of two processes: local chemical reactions in which the substances are converted into each other, and diffusion which causes the substances to spread out in space.

Independently, around the same time a Russian biophysicist Boris Belousov discovered a reaction-diffusion system, now called the Belousov-Zhabotinsky reaction. Where Turing had proposed mathematical models, here was already a demonstration of the self-organizing tendencies of the non linear systems which he had proposed. Here’s a video of a BZ cocktail evolving

From a uniformly homogeneous solution – spirals, spots and expanding rings are formed. And no two instances of the same experiment will get you the exact same results. The equations that govern these reactions are so expressive that you can actually come up with results that show stripes and hexagons! Try it out yourself in this applet.

These two works are considered by some as the founding work on chaos theory. In a nutshell, Chaos theory deals with highly nonlinear and usually self looped systems that despite being fully deterministic, are subject to abrupt and seemingly random change. It is clear in this case –  In spite of explicitly and deterministically defined rules, the reaction-diffusion yields a uniquely different result every time. The source of all this chaos is, well…, in the source itself. The non-linearity of the system greatly magnifies even immeasurably small changes in the initial state. So, the next time you round up a value from 0.506127 to 0.506, be warned! As a sidenote, the phrase “Does the Flap of a Butterfly’s Wings in Brazil Set Off a Tornado in Texas?“, is not a misunderstanding of chaos theory. It is in fact the title of the talk presented by Edward Lorenz at AAAS, 1972 on chaos theory. The title was the result of inferences from a run of the simulation he had built, when he changed one of the values of atmospheric conditions as stated above.

If you are interested in learning more about Chaos theory, there is a fantastic one hour program on BBC. No, it does not have equations ( well, maybe just one )

  1. Well, thats not entirely true! We have fingerprints. And they are beautiful and unique, but not colorful or macro. Guess that still qualifies as dull.
  2. This is interesting because, man is the only mammal; excluding those that are aquatic, that has no fur, check out the February 2010 edition of Scientific American

Further reading

  • Stumble this here. Follow me on twitter @sanchan89.
  • If you find my posts interesting, you can follow me via RSS here.
  • Some of my shared items are here, in case you find it interesting.

Vision and Cognition

Quite eventful, these past 3 months. I presented my first publication at the World Congress on Natural and Bio-Inspired Computing in December; attended the Microsoft Research India Winter school on machine learning and computer vision, followed by Kurukshetra, in January.

Some pics first – NaBIC 09, MSRI Winter School, Kurukshetra. Our NaBIC paper is here and our code is here. In short, we show that a simple iterative algorithm can find a very good photomosaic when compared to other population based methods like genetic algorithms. To induce some interest, here is one of our results.

Now that the pictures have spoken the thousand words……

Human Vision

I have been a follower of Predicatbly Irrational after watching Dan Ariely’s talks ( here and here ) on Ted.com. Both talks are delightfully entertaining and demonstrate with wonderful examples the fallibility of our own decision-making capacity. For a while after each talk, I spent a lot of time probing into every decision I make, usually ending up almost undecided. As an undergrad who has to choose between a career and higher education – it couldn’t have come at a worse time. I was already in doubt whether I was applying to graduate schools simply because it was what the best among us were doing. Equally, I didn’t know whether it was simply cold feet/cowardice or the safety of a job at Amazon India that was making me have second thoughts about higher education.

Coming back; Dan starts off by using visual illusions as a metaphor. Here’s an example:

The Grey square optical illusionSame color illusion proofTake a look at the image on the left. It seems absolutely impossible that squares marked A and B are the same. They seem to be opposing colors, but in fact they are exactly the same. The proof is on the image to the right. `What is gong on here? How can it be that we see wrong? How can it be that even after we are shown that these two patches are identical we still can’t see them accurately when look left again?`

Dan’s ( more colorful ) example is here. Quoting from his blog:

Now, vision is our best system. We have lots of practice with it (we see many hours in the day and for many years) and more of our brain is dedicated to vision than to any other activities. So consider this — if we make mistakes in vision, what is the chance that we would not make mistakes in other domains? Particularly in domains which are more complex (dealing with insurance, money, etc.), and ones in which we have less practice? Domains such as decision making and economic reasoning?

So a few thousand years of evolution of the visual cortex ( which by the way is the largest part of the human brain ) and eyes has given us a visual system that can’t even see the world for what it truly is even; after it is explicitly demonstrated? Not exactly…..,

Gestalt Theory

One of the plenary talks @ NaBIC was on Gestalt psychology. Gestalt in German means – shape of an entity’s complete form. The principle behind gestalt theory is that out brain is very holistic and understands more than what the sum of the parts indicate. The concept itself is somewhat difficult to put down in words, but a few examples expose some interesting aspects of our cognition system. For example, take a look at the following picture:

Emergence

If at first you cannot make sense of the image, take a second to look at it before continuing with the text. The picture demonstrates `emergence `. After a while the scene with the dalmatian dog sniffing the path emerges. One can even make out the fallen leaves, the crossroads and the trees in the background. We do not recognize the dog’s body parts and then put them together to form the concept of the dog! Instead we perceive the dog and then make sense of its parts. The gestalt psychology theory gives only a description of this phenomenon and does not provide any explanation as to how we do it ( and it has been zinged a lot for that ).

Reification

Reification

Another phenomenon is called `reification`. It is when we understand more than what we see. Look to the right. There is no triangle in A, but we perceive it, no rectangle in B, but we see it. We can sense the presence of a sphere in C and the (absent) surface of water over which the snake glides!

Multistability

Multistability

Before this post becomes a copy of the wiki page, one last example. This phenomenon is called `multistability`. As you keep looking at the images to the left, you keep shifting between two interpretations of the same image. The first image is the necker cube.

You can read more on Gestalt in its wiki page. For reviews of technical articles, see here.

There is already some criticism about the traditional statistics based approach to Computer Vision, and it seems almost impossible for any system now to truly replicate any of the phenomenon demonstrated above. But, there have been some attempts.

It is said that almost every branch of science follows a steep sigmoid. And there was consensus at the winter school ( which included Jitendra Malik, Yan LeCun, Yair Weiss, Martin Wainwright, Bruno Olhaussen, Richard Zemmel, William Freeman and Manik Varma — I am mentioning only the CV people here ) that computer vision is currently only at the bottom end on the verge of the steep rise; and that fifty years from now the best computer vision systems could be based on a completely different set of fundamentals.

Understanding Motion

Federer in action

Federer in action

Point light displays

Point light display

The next level is understanding videos, or at a least of sequence of images. But can’t we understand the action from a single image? Sure, if its an image like the one on the left, it says a lot about the action being performed and precludes the need to understand image sequences. But what about the image on the right? Umm., not so sure. Looks like a human, but its not trivially understood what it is or what it is doing.

Watch the related videos on youtube.

That makes it a lot clearer. Dr. Malik presented a video on the research work of one Dr. Johansson from the 1970s ( I have not been able to locate the original video. Its not on youtube). There has been a lot of work after that trying to understand our pre-disposition to recognize biological motion. Apparently babies only three months old can perceive as much. So can other mammals!

Some pages on biological motion detection:

If you find my posts interesting, you can follow me via RSS here. Stumble this here. Some of my shared items are here, in case you find it interesting.