Category: Uncategorized

Hate News and Social Media

 [Image Credit:  Wikipedia]

We all know about “fake news” and understand that we need to be on our guard against it.  But have we thought hard enough about “hate news” and are we concerned enough about it?

Let me start with a quick look back at fake news.  Fake news is misinformation (often deliberate) that is passed off as real news.  It contains vignettes that are factually incorrect.  Two classic examples of fake news were the “birther” hypothesis (the incorrect information that went around that Obama was not born in the USA) and the Obama religion conspiracy theory (that Obama was not of the religion he claimed to be).

The Indian equivalent of that is what I call the Rahul Gandhi birther hypothesis, which is that Rahul Gandhi’s grand-dad’s name was not Feroze Ghandy but Feroze Khan (and that he was a Pathan from Pakistan) thereby suggesting to the majority of Indians not only that Rahul Gandhi was not patriotic, but also sympathetic to a certain religious dispensation.  It had the effect of the Obama birther hypothesis and the Obama religion hypothesis rolled into one.

Now that is fake news, but the reason the fake news even matters to Indians and Americans is that it has been preceded by a campaign of hate news.

There has been, for many years, in the USA and in India, the dissemination through certain far-right channels, of information that incites hatred towards people of certain groups.  In the case of the USA, there has been a one-sided portrayal of immigrants.  In the case of India, there has been a sustained campaign against certain religious groups.

These campaigns stir up hatred towards a religious or racial “other” and make people susceptible to having their attitudes and decisions manipulated by fake news.

I must mention here that the propaganda of some of the most successful groups taking on state actors (such as ISIS in the middle east and Jaish-e-Mohammed in South Asia) also use hatred as a means of obtaining recruits and maintaining the loyalty of supporters around the world, their deliberate campaigns of hatred making their target audience susceptible to having their attitudes and decisions manipulated.

And it works!  During the final three months of the election campaign in India, this incitement to hatred took on such a feverish pitch that after the elections, people were attacked in the streets of Delhi for such innocuous acts as wearing prayer caps.

It might also be said that in the last elections, both in India and in the USA, a key strategy employed to win the elections was to:

  1. Incite people to a feverish pitch of hatred towards an “othered” group
  2. Paint the opposition as sympathetic towards that “othered” group
  3. Claim to represent and sympathise with the “in” group.

The “othering” takes place through hate news.  The association of the political opponent with the othered group makes use of fake news.

In the USA, the othered group was people whose origins might be traced to beyond the Southern border and people of a certain religion.  In India, the othered group was people of a certain religion.

How do we define hate news

I think hate news might be defined as any information (real or fake) that results in othering.

Hate news typically works by presenting a one-sided view of an issue.  For instance, in India, hate news highlights those historical events where rulers belonging to the othered group have acted against the interests of the in group, while remaining completely silent about historical events where the same rulers have acted in the interests of the in group, and about events where rulers belonging to the in group have acted against the interests of the in group or against the interests of other groups.

So we could define hate news as news that is one-sided (against an othered group).  A hate news source could be defined as a source that only presents one-sided perspectives against an othered group.

However, the mention of the othered group is important in such a definition.  Without the mention of the othered group, all one-sided argument might be considered as bad.    But activists (such as climate activists) take one-sided positions against something that could pose a danger to society.

So the one-sidedness of the argument alone is insufficient to mark it as hate news.  It would have to be hate inducing and aimed at othering a religious or ethnic group of people.

How does hate news help a majoritarian politician?

Once a politician has successfully ‘other’ed a group of people, they are now in charge of a political project that energizes their support base and consequently helps them win elections provided the “in” group is in a dominating majority.

I believe that Modi in India, Trump in the USA, Hitler in Germany and Boris Johnson in the UK all used the same trick.

Othering need not always be the result of the use of hate news.  Politicians might not even be the agents of that hatred.  They might merely be opportunistic exploiters of hatred.  For instance, racial prejudice had existed in the United States prior to the development of modern 24×7 television news channels and religious hatred has existed in India for a long time before literacy levels were high enough for mass news consumption.

However, it is possible that deliberate use of hate news was made to harden the pre-existing otherings.  Hate news may have also helped propagate otherings in places where they did not always exist.  For instance, a political party that uses the strategy of hatred has made considerable inroads into the State of West Bengal in India which was once known for its liberal and left-leaning disposition.

The existence of social media echo chambers makes it easy to concentrate hate news upon people with pre-existing biases who are highly susceptible to it, and these echo-chambers make it difficult to combat the insidious effects of the same.

Groups of people who keep sharing hateful news articles with each other can keep the flames of hatred alive and even raise its intensity for a very long time, possibly in perpetuity.

Many groups (organized or otherwise) exist that have the sole aim of helping a politician who claims to sympathise with the in-group come to power.

Combating hate news

The only thing that can counteract hate news is news that presents alternative but trusted view-points; that carries information that helps people see the situation from a different perspective.

It is not often possible to reason with a person who believes in the message contained in hate news, because it has been found that facts alone rarely change anyone’s mind.  However, strategies involving looking at things from the othered person’s perspective seem to have had some success (though the findings in that respect are not straightforward).

However, since the lack of opposing perspectives supplies some of the power of hate news in echo chambers, the combating of the impact of hate news should probably involve a) the identification of hate news, and b) the communication of alternative perspectives to the user (possibly as recommendations near the hate news).

On social media, this might entail the use of algorithms that do more than recommend articles similar to what users have liked in the past.  Better algorithms might have other aims such as increasing the diversity of perspectives that those users have been subjected to but without a loss in user engagement (a business necessity).

This might be an interesting challenge to the AI and language understanding communities.

Apart from technology strategies, it might be necessary to reach out across divides, with each side bearing in mind that engagement with different opinions, no matter how unpalatable, might be necessary if one is to prevent the political projects that finance hate news from winning.

 

Here’s a related article: https://theconversation.com/how-mainstream-media-helps-weaponize-far-right-conspiracy-theories-106223

Learn Deep Learning through Pytorch Exercises

I assume that you, like we, don’t enjoy having to stare at equations on a blackboard, and would rather be working through exercises that help you understand a subject.

We created a curriculum for teaching deep learning centered around Pytorch exercises (solving toy problems mostly).

Hopefully, those of us who hate sitting in classrooms will find it satisfying to learn the subject by doing experiments and observing how various algorithms fare on the toy problems.

The slides are linked to here:

The code that goes with these slides is available from https://github.com/aiaioo/DeepLearningBasicsTutorial/

Mechanical Chef

Mechanical Chef

On November 17th, 2017 at the Maker Faire in Bangalore, on stage before an audience of a few hundred people, a machine cooked a simple Indian side-dish – a potato fry.

The next day it prepared a pot of rice.

In so doing, it became the world’s first machine to cook an Indian meal autonomously.

23593357_1514971115237798_1402609992841796738_o (1)

The Mechanical Chef is the coming to fruition of an idea that germinated in the year 2012, when a colleague and I were walking down Millers Road, on the way to a cup of coffee at a roadside store, and I asked the colleague if there was any way in which we could really change the world and ‘make a dent in the universe’ as it were, in the present millennium.

The colleague was a woman, and she said that if Indian women didn’t have to do any cooking, it would save a large fraction of half a billion women in India 3 hours a day every day of their lives.

That day in 2012, my colleague, Princiya and I started dissecting Indian cooking.

We came up with simple operations that underlay Indian recipes that did not require shaping (we aren’t aiming to prepare rotis {there’s a machine for that already}, idlis or dosas {again, there’s a machine available for that}).

And they were:

  1. Adding ingredients
  2. Heating
  3. Manipulations such as stirring, sieving, grinding, whisking and powdering
  4. Transferring from one container to another

And we came up with a machine that could do all the above.

At the time, there was a Chinese cooking robot which could cook stir-fried (wok-friend) dishes:

and there were several experimental machines like Moley which used expensive robotic arms for cooking.

There is even another team in Bangalore that is also working at present on a cooking robot for Indian food!

 

Our First Design

In 2012 we came up with a much simpler architecture which could support all the above cooking functions (the ones that would be needed for Indian cooking).  It was a type of sensor network for cooking.

It was an improvement over the Chinese automated wok in that it could cook multiple dishes at the same time, and it was an improvement over the robotic arms because it was much simpler and therefore more cost-effective.

We took the drawings to Dr. Raju of Systemantics (a maker of industrial robots in Bangalore) one day.  He listened to us patiently and observed that our machine would need very powerful motors in order to lift heavy vessels up against the force of gravity.

This is a common mistake that firms developing cooking robots make.  Going against gravity is never a good idea when you have to carry kilograms of ingredients in a vessel.  The motors end up having to be big and powerful and friction becomes a very big hindrance to smooth movement.

This was the mistake that Moley (and the Chinese automatic wok) had made.  Moley’s motors and construction make it so expensive that it costs around $100,000 a piece.  We figured we’d need to build something that cost around $300 to be able to sell it to home users.

So, we went back to the drawing board.

 

Our Second Design

Last year (in 2016), we developed a machine that looked a bit like this one at MIT:

… and this one …

In our second design, the cooking vessels moved on a linear rail and ingredients dropped into them from above much like they do in the machines above.

We did not have a grinder and could not transfer ingredients from one container to another at will in our design.

But as we analysed Indian cooking recipes further, we realized that the vast majority of Indian dishes did not need any transferring of ingredients across vessels, and even if they did, we could stop the cooking at a certain point and ask a human to do the transfer without greatly impacting the automatic cooking experience.

We could also get by without grinding for many dishes if we used specially made powders in our cooking machine.

It was with this design that I went to my old friend Prashanth G. B. N., a mechanical engineer and designer of hardware systems, for his advice.

He took a look at the drawings and felt we would have to make the machine even simpler if it had to be used in Indian homes.

 

Our Third Design

He took a sheet of paper and sketched on it a design that had only rotary movements.

“Rotary motion is far simpler to build out than linear motion” he explained.

After developing a detailed drawing of the machine, Prashanth and I took out a patent on the same.

 

From Design to Reality

The Mechanical Chef however only turned into reality when Arpit Sharma, an aerospace engineer from Rajasthan joined me and solved all the mechanical problems that remained.

We had to solve the problem of dispensing powders from a removable and easy-to-wash and easy-to-assemble container.

We had to find ways to completely dissociate the parts that came into contact with the food from the parts that came into contact with the electricals so that the former would be easy to clean.

We had to minimize the number of parts that needed to be cleaned after every cook.

We needed to finesse the electronics and electricals – a job which was often summarily dropped into the lap of a young engineer from Mysore – Avinash Bharadwaj.

To support ourselves as we worked on all these problems and to pay for the hardware, we applied for a grant from the Department of Science and Technology of the Government of India through IIT-Bombay.  In October of this year, we received the grant.

The first prototype that Arpit Sharma built looked like this.

Rendered_CAD_model

And it worked!

 

The Proof of the Pudding is in the Eating

Here’s a video of the machine at work.  And you’re welcome to stop by and be one of the first humans on earth to eat Indian food cooked by a robot.

Here’s how it stirs.

Here’s our mini funding pitch!

Here’s our team at the office with the Mechanical Chef.

IMG_20171207_154327

There’s a little website for it:  http://www.mechanicalchef.com

 

POST PUBLICATION ADDITION

The prototype that we demonstrated in November 2017 suffered from a few flaws which made it unreliable and unsuitable for user trials.  One of the problems was that the quantities of ingredients it would add to a dish could not be precisely controlled.  So you could never be sure that the dishes would taste good when they were done.  Another problem was that the steam from the cooking could make the spices congeal and jam the works.  It took us till April 25th to solve all the sticky issues and get the machine ready for user taste trials.  One April 25th, 26th and 27th, the Mechanical Chef cooked entire dishes completely unassisted and with repeatable (and delicious) results.

Here’s a full end-to-end recording of one of the cooking runs (the one of April 26th).

 

Write to us if you’d like to drop by and see us.

Mechanical Consciousness

Mankind has attempted for a long time to explain consciousness, one’s awareness  of one’s own existence, of the world we live in, and of the passage of time.  And mankind has further believed for a very long time that consciousness extends beyond death and the destruction of the body.

Most explanations of consciousness have tended to rely on religion, and on philosophical strains associated with religion.  Possibly as a result, there has been a tendency to explain consciousness as being caused by a “soul” which lives on after death and in most traditions gets judged for its actions and beliefs during its time of residence in the body.

In this article, it is proposed that consciousness can have a purely mechanical origin.

The proposal is merely conjecture, but observations that support the conjecture (though they do not prove it) and I hope, render the conjecture plausible, are provided.  The explanatory power of the model is also somewhat explored.

It is also proposed that the working of the human mind is similar to that of many machine learning models in that they share certain limitations.

 

Preliminaries

First, let me define consciousness.  Consciousness of something is the knowledge of the presence or existence of something (of time or of our selves or of the world around us).

I argue that consciousness requires at the very least what we call “awareness” (that is, being able to sense directly or indirectly what one is conscious of).

Claim:  If I were not aware of something, I wouldn’t be conscious of it.

Argument: If all humanity lived underground for all time and never saw the sky, we would not be aware of the existence of the sky either by direct experience or by hearsay.  So, we couldn’t be conscious of it.  So, it is only when we are aware of the existence of something that we are conscious of it.

So, we have established a minimum requirement for consciousness – and that is “awareness” (being able to sense it).

But does consciousness require anything more than awareness?

The ability to reason and to predict behavior are things the human mind is capable of.

But are they required for consciousness?

Claim:  Reasoning is not required for consciousness.

Argument:  I argue that reasoning is not required because one cannot reason about something that one is not aware of the existence or presence of.  So, anything that one reasons about is something that one has registered the presence of in some manner, in other words, that one is conscious of.

Claim:  Prediction of the behavior of something is not required for consciousness.

Argument:  Prediction of the future behaviour of a thing is not possible without observation over time of how that thing behaves.  So observation (and consciousness) precedes prediction.

Yann LeCun argues that “common sense” is the ability to predict how something might behave in the future (if its future state is not completely random).  If we accept that definition, we might say that common sense builds on consciousness, not the other way around.

So, it appears that consciousness (knowledge of the existence of something) requires the bare minimum of awareness through the senses, and does not require reasoning or the ability to predict.

 

Development

The next question to consider is whether awareness constitutes consciousness or if there is more to it.

Claim:  There is more to consciousness than the signals that our senses send to the brain (awareness).

Argument:  The signals sent to the brain are analogous to signals that are present in completely inanimate things.  A camera has a sensor that records images of the outside world.  Even a pin-hole camera senses the outside world upon the wall on which the image of the sensed world is cast.  Even a shadow can be considered to be a “sensing” of the object that casts the shadow.  That does not imply consciousness.  There must be something else in animate “living” things that produces consciousness.

What is that something extra that is over and above what our senses record?

I believe that the extra thing that constitutes consciousness is the ability to create a model of what we sense and remember it (keep it in memory).

By “create a model”, I mean store a representation of what is sensed in some kind of memory so that what is sensed can be reproduced in some medium possibly at a later stage.

The model cannot be reproduced if it is not stored and remembered, so memory is also key to consciousness.

So, consciousness is the creation of a model in memory of what is sensed.

In other words, anything that can sense something in the world and actively create a model of what it senses (be able to reproduce it exactly or inexactly) is conscious.

I will attempt to justify this claim later.

 

Elaboration

So, the claim is that anything – even if it is a machine – that can actively create a model of something that it senses (is aware of) and store it in memory in such a way as to permit retrieval of the model, is conscious of it.

I am not saying that conscious beings are conscious of every aspect of what they sense as soon as they sense it. It can be possible that they sense and temporarily store a lot of things (for humans, for example, that could be every pixel of what we see outside the blind spot) but only model in a more abstract form and store in memory as an abstraction (and in a retrievable form) those parts that they pay attention to.

So it is possible that a conscious being may be conscious of the pixels of a bird outside the window but not conscious of it as a bird (model it in a more abstract form) or of its colour (model its properties) unless the conscious being pays attention to it.

For example, let us say we’re talking of a human.  Let’s say further that the human sees a mountain.

The human senses (sees) the mountain when rays of light scattered by the surface of the mountain or from things upon the mountain enter her or his eye and impinge upon the retina, triggering a chain of chemical reactions that lead to electrical potentials building up that act upon the nerves in the retinal cortex.

Subsequently, the neurons in the optical pathway of the human’s brain fire in such a manner that eventually, various parameters of the mountain come to be represented in the pattern of neural activations in the human’s brain.

We know that the human has modeled the mountain because the human can be asked to draw the mountain on a sheet of paper and will be able to do so.

Now, the human can be conscious of various parameters of the mountain as well.  For example, if the predominant colour of the mountain is represented in those neural activations, then the human is conscious of the predominant colour of the mountain.  For instance, if the human can answer, accurately or inaccurately, a question about the colour of the mountain, the human can be said to have modeled the same.

If the height of the mountain is represented in the neural patterns, then the human is conscious of the height of the mountain.  This can be tested by asking the human to state the height of the mountain.

If the shape of the mountain is vaguely capture in the neural activations so that the human identifies the same with that of a typical mountain, then the human is conscious of the mountain’s shape and that it is a mountain.

This ability to model is not present in what we typically consider an inanimate object.  A pin-hole camera would not actively create a model of what it senses (projects onto the wall) and is therefore not conscious.  Its projection is purely a result of physical phenomena external to it and it has no agency in the creation of the image within it.  So it has no consciousness.

Let’s say we use a digital camera which records the pixels of let’s say a mountain before it.  It can reproduce the mountain pixel by pixel, and so can be said to have a model in its memory of the mountain.  In other words, such a camera is conscious of the pixels of the mountain and everything else in the field of view.  It wouldn’t be conscious of the shapes or sizes or colours or even of the presence of  a mountain in the sense that a human would.

Claim:  Consciousness requires the active acquisition and storage of information from what is sensed.

Argument:  If the “model” is just the result of physical phenomena, say a projected image in a pin-hole camera, then there is no information acquired and stored by the system from what is sensed, and hence no consciousness.

Now, supposing that we were to build a machine of sand that created a representation of the mountain in sand and of the height and colour of the mountain and of the shape of the mountain and of the association of this shape with typical mountain shapes and of every other parameter that the human brain models.

Now, I would argue that this sand machine could be said to be conscious of the mountain in the same way as we are, even though it uses a completely different mechanism to create a model of the mountain.

Claim:  The hypothetical sand machine and a human brain are equivalent

Argument:  Consciousness of something is only dependent on what is modeled, and no on the method of modeling.  So, as long as the parameters of the mountain are modeled in exactly the same way in two systems, they can be said to be conscious of it in the same way.

 

Corollary

We are machines.

 

All right, so that’s a claim as well.

Here are two arguments in support of the claim.

a) Our behaviour in some sensory tasks is similar to that we would expect from machine learning tools called classifiers.

  1. The Himba colour experiment discovered that the Himba tribe of Africa were distinguishing colours differently from the rest of the world. They could not distinguish between blue and green but could distinguish between many shades of green which other humans typically had a hard time telling apart.
  2. People who speak languages that do not have vowel tones have trouble hearing differences in tone. Similarly, people who speak languages where the consonants ‘l’ and ‘r’ are conflated cannot easily tell them apart.

This is typically how a machine learning tool called a classifier behaves.  A classifier needs to be trained on labelled sounds or colours and will learn to recognize only those, and will have a hard time telling other sounds or colours apart.

b) The limitations that our brains reveal when challenged to perform some generative tasks (tasks of imagination) are identical to the limitations that the machine learning tools called classifiers exhibit.

Let me try the experiment on you.   Here’s a test of your imagination.  Imagine a colour that you have never seen before.

Not a mixture of colours, mind you, but a colour that you have never ever seen before.

If you are like most people, you’ll draw a blank.

And that is what a classifier would do too.

So, I would say that the human brain models things like colours or phonemes using some kind of classification algorithm, because it displays the limitations that such algorithms do.

So it is possible that we shall be able to discover by similar experiments on different types of human cognitive functions, that humans are merely machines capable of consciousness (of modeling a certain set of parameters related to what we perceive) and other cognitive functions that define us as human.

 

Further Discussion

People with whom I’ve discussed this sometime ask me if considering consciousness as the process of building a model of something adequately explains feelings, emotions, likes and dislikes and love and longing.

My answer is that it does, at least as far as likes and dislikes go.

A liking of something is a parameter associated with that thing and it is a single-value parameter that can be easily modeled by one or more numbers.

Neural networks can easily represent such numbers (regression models) and so can model likes and dislikes.

As for love and longing, these could result from biological processes and genetic inclinations, but as long as they are experienced, they would have had to be modeled in the human mind, possibly represented by a single number (a single point representation of intensity) or a distributed representation of intensity.  What is felt in these cases would also be modeled as an intensity (represented at a point or in a distributed manner).  One would be conscious of a feeling only when one could sense it and model it.  And the proof that one has modeled it lies in the fact that one can describe it.

So, when  the person becomes conscious of the longing, it is because it has been modeled in their brain.

 

Still Further Discussion

Again, someone asked if machines could ever possibly be capable of truth and kindness.

I suppose the assumption is that only humans are capable of noble qualities such as truth and kindness or that there is something innate in humans which gives rise to such qualities (perhaps gifted to humanity or instilled in them by the divine or the supernatural or earned by souls that attain humanity through the refinement of past lives).

However, there is no need to resort to such theories to explain altruistic qualities such as truthfulness, goodness and kindness.  It is possible to show game theoretically that noble qualities such as trustworthiness would emerge in groups competing in a typical modern economic environment involving a specialization of skills, interdependence and trading.

Essentially the groups that demonstrate less honesty and trustworthiness fail to be competitive against groups that demonstrate higher honesty and trustworthiness and therefore are either displaced by the latter or adopt the qualities that made the latter successful.  So, it is possible to show that the morals taught by religions and noble cultural norms can all be evolved by any group of competing agents.

So, truth and kindness are not necessarily qualities that machines would be incapable of (towards each other).  In fact, these would be qualities they would evolve if they were interdependent and had to trade with each other and organize and collaborate much as we do.

 

Related Work

This is a different definition than the definition used by Max Tegmark in his book “Life 3.0” but his definition of “consciousness” as “subjective experience” confuses it with “sentience” (the ability to feel).

Tegmark also talks about the work of the philosophers David Chalmers and Scott Aaronson, who seem to be approaching the question from the direction of physics – as in we are just particles from food and the atmosphere rearranged, so what arrangement of particles causes consciousness?

I think that is irrelevant.

All we need to ask is “What is the physical system, whatever it is made of, capable of modeling?”

Interestingly, in the book, Tegmark talks about a number of experiences that any theory of consciousness should explain.

Let’s look at some of those.

 

Explanatory Power of this Model

Explaining Abstraction

He talks about how tasks move from the conscious to the unconscious level as we practise them and get good at them.

He points out that when a human reads this, you do not read character by character but word by word.  Why is it that as you improve your reading skills, you are no longer conscious of the letters?

Actually, this can be explained by the theory we just put forth.

When we are learning to read (modeling the text is reading), we learn to model characters when we see a passage of text like this one and read character by character.

But with practice, we learn to model words or phrases at a higher level from passages of text, and direct our attention to the words or phrases because that facilitates reading.

We can chose to direct our attention to the letters and read letter by letter as well, if we so choose.

So, this model can explain attention too.

Attention

The brain is limited in its capacity to process and store information, so the human brain focuses its attention on the parts of the model it has built that are required for the performance of any task.

It can chose to not keep in memory more granular parts of the model once it has built a larger model.  For instance it can choose to not keep in memory the characters if it already has modeled the word.

This also explains phenomena such as “hemineglect” (patients with certain lesions in their brain miss half their field of vision but are not aware of it – so they may not eat food in the left half of their plate since they do not notice it).

We can explain it by saying that the brain has modeled a whole plate from the faulty sensory information provided to it and therefore the user is conscious of a whole plate, but minus the missing information.

Blindsight

Tegmark also talks of the work of Christof Koch and Francis Krick on the “neural correlates of consciousness”.

Koch and Krick performed an experiment where they distracted one eye with flashing images and caused the other eye to miss registering a static image presented to it.

They inferred from this that the retina is not capable of consciousness.

I would counter that by saying that the retina is conscious of the pixels of the images it sees if it constructs models of them (as it does) and stores them.

But if the brain models more abstract properties more useful to the tasks we perform, we focus our attention on those and therefore do not store in the memory the images that are not relevant to the more critical task (the distracting task).

So, I would argue that our consciousness can include models that comes from the retina (if some neural pathway from the retina creates models in memory at the pixel level).

But if our attention decides to focus on and consign to memory better things than what the retina models, it will, and then it will not necessarily model and be conscious of pixels from the retina.

 

Still Other work

Tegmark also talks extensively about the work of Giulio Tononi and his collaborators on something called “integrated information” and the objections to it by Murray Shanahan, but I’ll leave those interested in those theories to refer the work of their authors.

I also examine Graziano’s Attention Schema Theory of consciousness in another post https://aiaioo.wordpress.com/2017/12/18/mechanical-consciousness-and-attention/

The Vanishing Information Problem – Why we switched to deep learning with neural networks

It’s been a year since my last post.  My last post was about deep (multi-layer) Bayesian classifiers capable of learning non-linear decision boundaries.

Since then, I’ve put on hold the work I was doing on deep (multi-layer) Bayesian classifiers and instead been working on deep learning using neural networks.

The reason for this was simple: our last paper revealed a limitation of deep directed graphical models that deep neural networks did not share, which allowed the latter to be of much greater depth (or to remember way more information) than the former.

The limitation turned out to be in the very equation that allowed us (read our last paper on deep (multi-layer) Bayesian classifiers for an explanation of the mathematics) to introduce non-linearity into deep Bayesian networks:

Sum of Products

The equation contains a product of feature probabilities P(f|h,c) [the part inside the big brackets in the above equation].

This product yields extreme (uncalibrated) probabilities and we had observed that those extreme probabilities were essential to the formation of non-linear decision boundaries in the deep Bayesian classifiers we’d explored in the paper.  The extremeness allowed the nearest cluster to a data point to have a greater say in the classification than all the other clusters.

We had found that when using this equation, there was no need to explicitly add non-linearities between the layers, because the above product itself gave rise to non-linear decision boundaries.

However, because of the extremeness of the product of P(f|h,c), the probability P(h|F) (the probability of a hidden node given the features) becomes a one-hot vector.

Thus a dense input vector (f) becomes transformed into a one hot vector (h), in just one layer.

Once we have a one-hot vector, we don’t gain much from the addition of more layers of neurons (which is also why you shouldn’t use the softmax activation function in intermediate layers of deep neural networks).

This is because one-hot encodings encode very little information.

There’s an explanation of this weakness of one-hot encodings in the following lecture by Hinton comparing RNNs and HMMs.

Hinton points out there that an RNN with its dense representation can encode exponentially more information than a finite state automaton (that is, an HMM) with its one-hot representation of information.

I call this tendency of deep Bayesian models to reduce dense representations of information to one-hot representations the vanishing information problem.

Since the one-hot representation is a result of overconfidence (a kind of poor calibration), it can be said that the vanishing information problem exists in any system that suffers from overconfidence.

Since Bayesian systems suffer from the overconfidence problem, they don’t scale up to lots of layers.

(We are not sure whether the overconfidence problem is an artifact of the training method that we used, namely expectation maximization, or of the formalism of directed graphical models themselves).

What our equations told us though was that the vanishing information problem was inescapable for deep Bayesian classification models trained using EM.

As a result, they would never be able to grow as deep as deep neural networks.

And that is the main reason why we switched to using deep neural networks in both our research and our consulting work at Aiaioo Labs.

Decongesting Bangalore’s Roads: An Analysis of the BDA’s Detailed Project Report on the Proposed Flyover

In response to public demand, the Bangalore Development Authority (BDA) has finally released the Detailed Project Report (DPR) for the proposed steel flyover in Bangalore.

In this article we’ll attempt to address (using points from the DPR), the key question of whether the flyover will be of any use to commuters.

The DPR contains a study of traffic volumes at each of the intersections, and summarizes its findings in the following three diagrams (page 58) which are very easy to understand.

dpr_530dpr_531dpr_532

The Numbers

The numbers in the diagrams are peak hour traffic numbers at all junctions affected by the project in terms of PCUs/hr.  PCU stands for Passenger Car Unit.

So, the first diagram says for example, that at peak hour traffic, there is the equivalent of 6175 cars entering from Hebbal and 6949 cars exiting at Rajbhavan Road in one hour.

The second diagram shows the impact of the flyover on ground-level traffic.  It shows that the number of cars entering at ground level from Hebbal will drop to 3088 while the number of cars exiting at Rajbhavan Road will drop to 4122.

The excess traffic (3087 incoming at Hebbal and 1393 outgoing at Rajbhavan Road) will be carried on the flyover.

The incoming numbers add up (3087 + 3088 = 6175) as expected.

The outgoing numbers don’t add up (1393 + 4122 < 6949)!

The outgoing traffic numbers don't add up because there will no longer be a right turn at Basaveshwara Circle.  So, a part of the traffic volume decrease has nothing to do with the flyover!

Anyways, these calculations, if assumed correct, point to a reduction in traffic by 20% to 50% at the ground level.

Travel Time Calculations

Will the reduction in traffic lead to a corresponding decrease in travel time?

Not necessarily.

The DPR contains no estimate of reductions in travel time.

There are three reasons for doubting there will be huge reductions in overall travel time:

  1.  The impact of the constriction of the road leading to and from the flyover because of the ramps of the flyover needs to be taken into account.  The bottlenecks at the ramps could lead to traffic piling up at the entrances and the exists of the flyover.
  2. If the total capacity of the roads carrying traffic away from the flyover is too low, it could lead to traffic queueing up on the flyover itself.

Those who prepared the DPR should have run a simulation of the traffic on the flyover, below it and on the roads leading into and out of the flyover to determine if any savings in travel time would result or if serious backups on the flyover and around it could cancel any benefits.

A case in point is the flyover from the Electronic City software technology park (STP) to the Silk Board.  It might allow traffic to move fast on it, but it might be slowing down traffic inside the STP and on the road below it at its exit.

Flyover Effectiveness Conclusions

We don’t know if the travel time will decrease significantly unless the required simulations are done.

Public Transportation Conclusions

However, it is possible from the DPR to draw conclusions about the effectiveness of public transportation.

We see from the study that only 2% to 3.5% of the vehicles on the roads are city buses (pages 42-46).

So, if we doubled Bangalore’s bus fleet (which you can for the cost of the flyover) it would not increase the traffic on these roads by much but could replace almost all the private vehicle traffic not just on this stretch but all over the city (assuming people make the switch from private to public transport, and each bus carries 100 passengers).

Explanation & Calculations

Here’s how we can calculate that.

The proposed flyover will cost approximately 1800 crore rupees.

A TATA bus costs about 20 lakhs rupees.

So, you can buy about 7000 buses (and hire drivers/conductors for a year and build facilities for them) for 1800 crore rupees (or get 9000 buses without drivers/conductors or facilities).  I’m assuming that a quarter of the price of a bus will get you facilities and pay for the driver and conductor.

Now the BMTC runs around 7000 buses today.  So, for the price of the flyover, one could double the bus fleet.

We can show that doubling the fleet can drastically decrease the volume of traffic on these roads.

Let’s say that 10,000 vehicles used that stretch of the road.  We know that 2% of those vehicles were buses.  That’s 200 buses.  Let’s assume that all the other vehicles carry on average 2 passengers.  So, except for the 200 buses, the remaining 10,000 – 200 vehicles carry 20,000 – 400 passengers.  If we double the buses, we have 200 more  buses.  Now each bus can easily carry about 100 passengers (50 seated and 50 standing).  So, that means we can carry 20,000 passengers just by adding 200 buses (doubling the bus count).  That is the entire carrying capacity of all the other vehicles on the road!

So with a negligible increase in traffic (from 2% of current traffic to 4%), we can accommodate all the passengers of the remainder of the traffic using that stretch of Bellary Road today.

More Benefits of Public Transport

But it’s not just that!

For the cost of the flyover, we’d have doubled buses all over Bangalore!

So, we’d have added an equivalent carrying capacity to all the private vehicles on all the roads in Bangalore for the cost of this flyover!

That’s what this BDA DPR tells us!

Environment Benefits of Public Transport

But that’s not all!

There are still more benefits!  Think of the reduction in pollution.  Replacing all those private vehicles with equivalent buses would reduce pollution by 95%.

Assumption

In the above calculations, I’ve assumed that everyone will give up private transport for public transport.

That won’t happen in real life unless you get the same convenience from public transport.

It could happen if, like with the metro, bus passengers are:

  1. assured of getting a bus from a known key location to a desired key destination every ten minutes or at a known precise time (with bus tracking) and
  2. assured the buses are not overcrowded (the pleasantness of the travel is comparable to the pleasantness of private transport).

If you can get that sort of predictability, and comfort, then for those travelling on those routes to work, it would make more sense to use public transport than to use private transport.

So, it may need a lot more than doubling buses (mere capacity matching) to assure convenience and ensure that people prefer public to private transport.  It would also need route planning, bus tracking and highly predictable key routes.

Other Proposals

There are many other proposals for reducing congestion along the North South Bellary Road.

Here’s one:  http://www.deccanherald.com/content/561722/rail-link-kia-less-rs.html

This article says that there is an operational railway line between Yalahanka and Channasandra, and this can be extended easily till the airport up North and Baiyappanahalli in the East, taking airport traffic off the Bellary Road.

Estimated cost: Rs. 150 crores.  And it’s a public transport proposal, so it takes a lot of cars off the roads.

Visit Aiaioo Labs
 

Of Barriers and Free Trade

Many economists insist that free trade benefits everyone.  The argument goes like this:

Model 1

FreeMarketScenario2

Let’s say there are two countries, Country 1 and Country 2, each with a bread factory and two citizens who buy bread from their factory.

There is a trade barrier in place preventing the factories from selling to the other country.

Each factory makes a profit of $2 on each loaf of bread.

The factory in Country 1 earns $4 from its sales.  The people spend $40 on bread.

The factory in Country 2 also earns $4 from its sales of bread.  It’s citizens only spend $20.

So, the net expenditure of money in Country 1 is $36, and in Country 2 $16.

Now, let’s see what happens if the trade barrier is removed.

Everybody now buys from the factory in Country 2.

So the factory in Country 1 earns nothing (it sells nothing) but its citizens spend only $20.

The factory in Country 2 earns $8 from its sales of bread to four citizens now.  The citizens of country 2 spend the usual $20.

So, the net expenditure of money in Country 1 is now only $20 and in Country 2 only $12.

Economists argue that through this mechanism, the free market benefits all trading parties.

But it turns out that not everybody wins if you consider a different model – one that includes businesses shutting down and unemployment.

Model 2

When there are trade barriers, everyone works for the factories in their own countries.

FreeMarketScenario3

With the barriers in place, the factory in Country 1 pays a salary of $20 to its two employees.

The factory in Country 2, being more efficient, pays a salary of $40 to its employees.

Now the net earnings in Country 1 (earnings – expenditure) are $4 (because the earnings cancel out the expenditure of the citizens, and the factory earns $4).  The net earnings in Country 2 are now $64 (because the citizens spend only $10 each while earning $40, and the factory earns $4).

Now let’s say free trade is introduced.

The bread factory in Country 2 starts selling its bread at $10 in Country 1.

The bread factory in Country 1 shuts down (because no one will buy its bread at $20).

The citizens of Country 1 who worked for the bread factory no longer have an income.  They still have to buy bread to survive (using their savings) but their expenditure is lower not at $20.

So now Country 1 ends up with a net earnings of $ -20 (a drop of $24).

The net earnings in Country 2 go up to $68 (and increase of $4).

So in this model, not only does the earnings of Country 1 go down but also the earnings of the world as a whole (because there are fewer people gainfully employed).

However, things don’t stop there.

Model 3

The bread factory realizes that by hiring the citizens of Country 1 to work for it instead of citizens of Country 2, it can cut its cost of production in half (because salaries in Country 1 are half that of Country 2).  By doing so, it can start making profits of $6 per loaf of bread.

So now you have the citizens of Country 2 facing unemployment (no earnings).

So the net earnings of Country 2 drop to $4 (a drop of $64).

The earnings of Country 1 on the other hand go up to $20 (a gain of $40).

But there is again a drop in the earnings of the world, because though the same number of people are employed, it is higher-paid people who are now out of a job.

This is not compatible with a model of free trade that continually improves things for everybody.

Of course, I’ve used a very simple model, but it reflects the truth that when free trade is introduced, there are winners and losers and that the weaker parties are the losers.

There seems to be a way to predict who the winners and losers in any attempt to introduce free trade will be.

Force Model

In models of military engagements, the principle of force is used to predict the outcome.  Given roughly equal equipment and training, the stronger force almost always wins.

The reason for that is shown in the following diagram.  Let’s say there is a red force with 4 soldiers and a green force with 8 soldiers.  Each side fires a shot every minute.  Each soldier aims at an enemy soldier and fires, with a 50% probability of hitting his target.  After the first volley, the red force would have fired 4 shots and hit 2 green soldiers.  But the green force would have fired 8 shots and hit 4 red soldiers.

So the losses would be disproportionately higher for the weaker party, and the green force would win the battle with the loss of two of their own.

ForceModel1

It appears the same model can be used to predict the winners in economics too.

In economic models, the contending forces would be firms or employees.

Larger and better equipped firms (which can produce cheaper products) can be expected to win (push small firms or more expensive employees in direct competition out of business) in any market where free trade is introduced.

For example, before India traded freely with the USA, there were many local soft drink manufacturers (Torino, Thums Up and Limca) in India.  When  Coca Cola and Pepsi entered the market, all the Indian soft drink brands had to sell out.

Similarly cheaper workforces (which cost less to hire) can be expected to win.

An example would be the use of immigrant labour in many countries (especially the USA) for agriculture.

So, how can a weaker economic segment (be they workers or industry) be protected?

Through barriers (barriers allowed by trade agreements).  Barriers (something that a force can shelter behind) may be used to protect weaker forces of any kind.

Here are a few barriers used in economics.  As you can see, barriers to trade are already in heavy use though people talk as if free trade is widely practised.

Barrier 1

The US workforce in the computer industry being more expensive than an Indian workforce, has been protected by visa and fee barriers.

There are visa quotas and a fee  levied on Indian firms – to the tune of $5000 per visa for H-1B and L-1 visas).  The fee costs the Indian software industry $1 billion to $1.5 billion annually.

Not palatable to Indian industry of course, but effective in protecting high-end jobs in the USA.

Now what I don’t understand is why the USA uses barriers to protect jobs for skilled people who are highly qualified and quite capable of acquiring more skills and competing on quality.

I would suppose that if the USA used barriers, they should probably do so to protect jobs at the low end of the economy (helping out poorly skilled or unskilled workers who’d find it harder to acquire more skills or compete on quality) as India does (through a minimum salary requirement for work visas, which is aimed squarely at keeping out cheaper Chinese labour from infrastructure [say road building] projects).

Barrier 2

During the colonial era, barriers to the import of Indian products were used to protect a nascent textile industry and jobs in England.

I quote from an 1840 English parliamentary inquiry about India (taken from the above article):

Before a British Parliamentary Committee in 1840] Montgomery Martin stated that he . . . was convinced that an outrage had been committed ‘by reason of the outcry for free trade on the part of England without permitting India a free trade herself.’ After supplying statistical data of Indian textile exports to Great Britain, he pointed out that between 1815–1832 prohibitive duties ranging from 10 to 20, 30, 50, 100 and 1,000 per cent were levied on articles from India. … ‘Had this not been the case,’ wrote Horace Wilson in his 1826 History of British India, ‘the mills of Paisley and Manchester would have been stopped in their outset, and could scarcely have been again set in motion, even by the power of steam. They were created by the sacrifice of Indian manufacture. Had India been independent, she could have retaliated, would have imposed prohibitive duties on British goods and thus have preserved her own productive industry from annihilation. This act of self-defence was not permitted her’” (Clairmonte 1960: 86-87).

Barrier 3

Another example can be seen in the policy of subsidizing the renewable energy industry in the USA and buying renewable energy locally.

The use of models to determine winners, as described above, can empower governments to decide which sectors of the economy are most vulnerable to competition (so action may be taken to protect them).

Many protective actions can be taken without violating free trade obligations.

Fair Barrier 1

The best example of a fair protection policy is progressive liberalization.

For example, when the Chinese government introduced foreign direct investment (FDI) into the retail sector in China, it did so gradually, increasing the percentage of ownership permitted to foreign owners over 15 years.

In the course of the 15 years, local firms learnt the tricks of the retail trade and were able to compete effectively against the new entrants.

In contrast, the Indian government went from discouraging the participation of Indian private firms in the railways and defense industries, to allowing 100% FDI in one shot, thus failing to give Indian firms the time to develop the capabilities or technical know-how to compete in these markets, with the result that bullet train and metro rail equipment needs to be imported in entirety (or imported with a ‘made in India’ veneer – assembled in Indian factories entirely owned and operated by French firms).

Fair Barrier 2

Another policy that could protect and benefit businesses in certain sectors is grants for nascent industries with vast future potential.  In the USA, there are small business grants, research grants and subsidies for small firms.

In contrast, the government of India seems to have failed to create a level playing field for local startups.  I recall many years ago (at the height of the internet boom) when the government of India had a small business grants program, it had a clause specifically leaving out Indian software startups.  Somehow the government of India had decided that they would not make research grants available to local startups in the highest-growth industry in India at the time.

Here’s more on how the Indian government seems to not be as accessible to local startups as it is to larger global startups/firms competing with them.  This is a problem that needs to be fixed.

It’s easier for a foreign startup or MNC to get forgiveness for inadvertent violation than it is for a domestic startup (today foreign startups enjoy better access to political leaders and therefore easier forgiveness).

Uber got 1.5 years of forgiveness on payments that Ola did not get, and Amazon got forgiveness for having its own supply centres, and not following the marketplace model, which Flipkart did not get. Flipkart had to change its model to comply with the marketplace model. Both Ola and FK were hurt by this favoritism to Uber and Amazon.

Fair Barrier 3

Another method is to strengthen the weakest parts of the workforce in the face of competition from migrant/immigrant labour.

One policy that could help protect and improve the lot of weaker parts of the US workforce might be higher taxation, and using the tax money to:

  1. Sponsor education programs (financial-need-based free college/training) to facilitate reemployment in growing industry segments.
  2. Revive industries that could employ that part of the workforce in larger numbers (the manufacturing industry).  One way to revive manufacturing that might be to create more outlets for US made goods and fund automation of manufacturing.
  3. Visa barriers (Indian work visas require a minimum salary that effectively protects less skilled workers).

Fair Barrier 4

Using regulatory and tax barriers to FDI (as is done in China) to generate scalable revenue for local businesses.

Conclusion

In conclusion, I wanted to point out that if governments could start using models such as the one above to calculate who might win in various scenarios involving free trade (instead of assuming that everyone wins), they might be able to formulate better and more equitable economic policies for their citizens.

The Fine Balance of FDI

Algodones_sand-dune-fence
Courtesy of the Wikipedia

Some governments, such as those of New Zealand and China have opposed FDI (Foreign Direct Investment) in various forms.

We examine in this article what their reasons might be.

  1. Do some countries reject FDI?

It appears that some do.

The Case of the USA

In the USA, there are no serious legal barriers to FDI, but there can be disapproval of and concerted attempts to block FDI.

In this article on factories set up by foreign investors in the USA, there is a discussion of opposition to Japanese manufacturers in the automobile sector decades ago.  I quote:

After Honda Motors opened the first Japanese auto plant in the U.S., in Marysville, Ohio, in the early nineteen-eighties, followed by an engine factory in nearby Anna, Ohio, the company faced an onslaught of vicious anti-Japanese ads on TV and in print, often supported by American manufacturing trade and labor groups.

The comparably subdued response to Chinese manufacturers speaks, on one hand, to changing circumstances, especially the broad acceptance of globalization in the United States and the desire, on the part of some politicians and business leaders, to create manufacturing jobs by whatever means necessary. But it also follows from a conclusion that American companies have reached about their Chinese counterparts: namely, that they are, thus far, relatively inconsequential rivals.


The Case of New Zealand

In October 2015, the government of New Zealand blocked the Chinese firm Pengxin’s attempts to buy (through a local subsidiary) a farm called Lochinver.

The government explained their decision as follows:

Land information minister Louise Upston told the BBC that its decision in September to block Pengxin’s purchase of Lochinver farm does not mean the country is not interested in attracting foreign investment.

“It’s [foreign investment’s] an important part of our economic strategy, but equally when we do have an application for sensitive land and assets – we will put it across the 21 criteria that we need to assess and make a decision based on that,” she says.

“We weren’t convinced that this particular application met that threshold, which is substantial and identifiable benefits for New Zealanders.”

Dr William Rolleston, president of the Federated Farmers of New Zealand, a group that lobbies on behalf of its farmer members, says some farmers are concerned about the scale of the purchases.

“New Zealanders don’t have an issue on ownership at a low level. No one would be concerned if 5% of farmland was owned by overseas buyers,” he says.

“But if 95% of the land in New Zealand was owned by overseas buyers, I think we would have an issue – it would reduce our strategic options in the future.”

Dr Rolleston’s sentiment echoes public concern from 2012 when Pengxin bought 16 dairy farms and sparked a debate about national identity.

During the last elections in 2014, opposition politicians stoked those fears by saying that New Zealanders risked becoming “tenants in their own land”

So, it appears that in New Zealand, the government wishes to keep resources such as land in local hands.


The Case of China

China seems to have laws that make it difficult for foreign firms to compete with local firms, making it a logical choice for them to outsource the manufacture of their goods to Chinese firms.

This is explained on Chinese Law Blog in “Building and Operating a China Factory.  Why Even Bother?

For example, if you are a Wholly Foreign Owned Enterprise (WFOE), you need to pay the government 20% of the profits of your China operations.

I quote:

First off, in your first year, you are going to essentially waste around $50,000 in just forming your WFOE, securing various government approvals, paying someone to figure out your taxes, and making up for all the mistakes you will make because you will be in, what is for you, a very strange land.  On top of that will be your taxes, which you are going to need to pay on just about everything.  Figure 20% on profits and even if you do not make profits, figure on them being imputed to you. And figure on having to pay around 40% to various of the Chinese governments as taxes on the salaries you pay your employees.

And all of this is going to mean that your costs are going to be considerably higher than whatever Chinese factory you are currently using to make your product. In Buying A Chinese Company? Why China Deals DON’T Get Done, I wrote of the way this domestic-foreign price differential works in the context of a client looking to buy its Chinese manufacturer:

I said that there is a good chance the Chinese manufacturer is paying half of its employees completely under the table and reporting to the government only half of what it was paying the other half. I then talked of how there is also a good chance the Chinese manufacturer is underpaying its taxes and of how its rent also may be paid under the table. I then said that this sort of thing may be all well and good for Chinese companies, but that if the US manufacturer were to buy this Chinese manufacturer, it would need to do so as a WFOE and it would then immediately be on a “whole ‘nother level” with respect to China’s various tax authorities.

Joint ventures with Chinese firms on the other hand apparently are difficult to retain control of.

This explains why Apple, instead of running its own factories in China, outsources the manufacturing to a Chinese firm – Foxconn.

So it appears that China, through its taxation mechanisms and through selective enforcement of its laws, deliberately blocks FDI into China.

Numbers show that in the past few decades, China received considerable inflows of FDI.

However, much of that FDI is attributable to Hong Kong (Hong Kong’s share of China’s FDI was 55% – ten times that of the USA).

The imbalance in FDI numbers can be seen in the following table taken from an out-of-print volume from the National Bureau of Economic Research in China.

china_fdi_table

So, it is evident from the above that most of China’s 1990s FDI came from Hong Kong and therefore was not really Foreign DI.

So, what benefits does blocking FDI give to a local area?


  1. Might barriers to FDI help economies?

In the case of China, the advantage seems obvious.

If foreign investors could open their own factories, they would hire Chinese labour and be able to own the scalable income from the proceeds of manufacturing, passing on only the salaries (which are low in China) to their employees in China.

It is only the inability of foreign investors to purchase and operate Chinese factories as cheaply that forces them to  outsource to Chinese firms.

So, the barriers to FDI in China help drive business to Chinese firms.

These policies can also force the transfer of technology to local firms.

Contrast this with the case of India.

India had a similar boom driven by cheap labour in the form of software services.

There were hundreds of small, medium and large firms in Bangalore offering software services to the financial sector in the USA.

However, a trend I have seen in recent years is for US firms to buy up medium-sized software firms in India and get their software related work executed by these now captive software teams than to outsource work to Indian firms.

So, the inability to get work drives many local IT services firms to sell their operations to US-based firms.

This effectively reduces the total revenue earned locally to just the salaries paid instead of salaries+profits.

I am not certain of how the numbers compare with the boom years but I think the absence of a road up the IT services value chain results in the middle being cut out, leaving only the very large firms and a host of relatively tiny shops in the local IT services market.

So, had FDI barriers existed in the software sector, it would have forced foreign consumers of IT services to access Indian programmers through an Indian corporate entity, increasing the share of the pie that accrued to the local economy, and increasing the quantity of business opportunities for local IT firms.


Take the case of New Zealand again.

The argument put forth by the government there is that they need to keep control of land (a scarce resource in New Zealand).

In other words, the restrictions on FDI are meant to allow local firms the retain control of revenue generating resources.

Contrast this with the software industry in India again.

In software the key resources are human resources (the engineers).  And around the world, software engineers are a scarce resource.

There was no barrier to FDI that would allow local firms to compete with foreign firms (which could pay more because of their stronger currencies) for those resources.

The result seems to be a stratification of software engineering resources by capability.

The engineers with the best skills (who could effectively develop products) mostly ended up in American software firms and can be paid salaries in the range of Rs. 60 lakhs per annum.

Engineers with less valuable skill-sets (who can at most configure, install, test or maintain products) seem to gravitate to Indian IT services firms where salaries seem to stagnate at about a quarter that amount.

This flight of resources might have contributed to preventing forays into product development by software services firms in India.

So, in a sense, by providing outside firms direct access to scarce resources, the opportunity to make a lot more money might have been allowed to slip away.

 

Conclusion

In conclusion, it may be said that sometimes, a clever use of barriers to FDI seems to help extract more revenue (by blocking access to valuable resources) and thus create larger surpluses for local businesses.  Those surpluses in turn help build more infrastructure and capacity and improve the economy.  The case of China, contrasted with that of India, seems to illustrate the case where such barriers might have been beneficial to the economy.

Fun with Text – Managing Text Analytics

The year is 2016.

I’m a year older than when I designed the text analytics lecture titled “Fun with Text – Hacking Text Analytics“.

Yesterday, I found myself giving a follow on lecture titled “Fun with Text – Managing Text Analytics”.

Here are the slides:

“Hacking Text Analytics” was meant to help students understand a range text analytics problems by reducing them into simpler problems.

But it was designed with the understanding that they would hack their own text analytics tools.

However, in project after project, I was seeing that engineers tended not to build their own text analytics tools, but instead rely on handy and widely available open source products, and that the main thing they needed to learn was how to use them.

So, when I was asked to lecture to an audience at the NASSCOM Big Data and Analytics Summit in Hyderabad, and was advised that a large part of the audience might be non-technical, and could I please base the talk on use-cases, I tried a different tack.

So I designed another lecture “Fun with Text – Managing Text Analytics” about:

  • 3 types of opportunities for text analytics that typically exist in every vertical
  • 3 use cases dealing with each of these types of opportunities
  • 3 mistakes to avoid and 3 things to embrace

And the take away from it is how to go about solving a typical business problem (involving text), using text analytics.

Enjoy the slides!

Visit Aiaioo Labs

The Mathematics of Religious Extremism

Pulse_Vigil
Pulse Vigil in Minneapolis (courtesy of Wikipedia)

In this article, I will attempt to argue that the mechanisms used by religions for their own propagation inevitably foster intolerance and extremism.

I will attempt to show that over time, the tendency to extremism in religions can only increase.

First, it will be necessary to understand the mechanism by which religions propagate themselves.  In order for a religion to take root and grow, it must A) provide better incentives than another to its promoters and B) establish barriers to keep its promoters from switching to another religion.

A)  Methods of Acquisition of Promoters

The mechanisms for the propagation of religious beliefs have evolved over time as can be seen from a study of ancient and modern religions.

  1. Explanatory Religions

Early religions seem to have been explanatory in nature, and their main function appears to have been that of explaining physical phenomena and how the world came into existence.

The earliest religions of almost all ancient civilizations – be they the Greek, the Indian, the Chinese, the Anasazi or the Maya – seem to have developed mythological explanations of the workings of the world.

This rich mythological framework could have provided work for story-tellers and bards, hence spreading through their art.

So their earliest mechanisms for growth probably involved monetary incentives for artists and other individuals for promoting religious fictions that explained the workings of nature.

As humanity developed the means to travel over larger distances, these stories would have spread.

The religions that would have been most likely to survive would have been the ones with the most powerful stories and the best narratives.

With the advent of agriculture, as humans began to live in settlements with a high population density, a new mechanism for propagation would have become more effective and rewarding for a religion’s promoters.

  1. Organized Religions

With static populations in highly populated areas like cities and towns, religions would have begin to market themselves through religious organizations that maintained places of worship or organized religious events. These would have helped them reach more people within a town or city, just like a store in a busy street corner or a fair in a fair ground sells more goods than a push cart vendor pushing his wares through the streets of a town.

Individual story-tellers would never have been able to generate a sufficient surplus to build similar edifices or organize large scale events.  So religions that could create organizations that could pull in earnings from a large number of adherents, enough to pay for the creation of a professional class of promoters – professional priests – would have become more successful.

Fictions such as “If you contribute V to do W at place X or before deity Y at time T, you will have a better chance of succeeding at Z” would have been used to induce people to pay money for the services of the promoters and to travel to meet the promoters at regular intervals.  The earnings from such service offerings would then have been used to maintain the organizations, set up edifices or organized events which would have served to further propagate the religion.

What is important to observe is that once religions evolved the ability to generate sufficient income to sustain a priesthood, they could grow exponentially, because the more priests they had, the more people they could convince of the truth of their religious fictions.  And the more people they convinced, the more they would earn from the consumers, and the more priests they could pay for.  This cycle would repeat with increasing rates of growth and the largest religion in any location would grow into a monopoly.

The tendency for the larger organization to win (network effects) would have sufficed to provide such religions with a defensive barrier against new religions.

You can take the case of the new religions Jainism and Buddhism in India.  Neither could take broad-based and permanent root in India because the Hindu religion with which they were in competition had at all times a larger organization and many more followers.  Once they had lost political patronage, the new religions receded in popularity rather precipitously.

Owing to the network effects of size that make it hard to displaced established organized religions, challengers to organized religions invariably required political support from the top namely the direct support of the king.  Examples include the support of the Egyptian Pharaoh Akhenaten to the monotheistic cult of the Aten in Egypt, the support of the Mauryan Emperor Ashoka in the case of Buddhism in India and the support of the Roman Emperor Constantine the First in the case of Christianity in Europe.

So a class of religions then came into existence which could displace religions that relied on priestly orders alone by the use of political patronage.

These were religions that in addition to wielding priestly orders of their own, propagated themselves through symbiotic relations with political powers.

  1. Political Religions

Such religions would have had to provide some value to political power.  Political power was typically increased through war between political entities (in the past) and through political projects that are attractive enough to mobilize the support of large numbers of people (in the present).

The number of soldiers that can be raised for war would have been dependent on:

  1. the degree to which such soldiers are not dissuaded by fear of injury or death,
  2. the rewards that may be gained by the soldiers from war spoils, and
  3. the motivation to make the effort in the service of a cause.

The number of volunteers that can be raised for a political project would have been dependent on:

  1. the rewards that may be gained by the volunteers from the outcome, and
  2. the motivation to make the effort in the service of a cause.

Religions that rely on this strategy for propagating themselves increase all the above incentives by a) helping people overcome the fear of death and fear of defeat or financial loss, by b) sanctioning benefits to their adherents (including allowing rapacious actions) in war or in a political cause and by c) providing people with an excuse to go to war or engage in a political cause (providing them something to fight for).

To do that, they would have had to take recourse to one or more of the following fictions:

  1. Religious fictions promising after-life insurance in return for their efforts
  2. Religious fictions promising divine help for their projects
  3. Religious fictions permitting greedy behaviour during the project
  4. Religious fictions that lead to the exclusion of other religious/political groups
  5. Religious political projects

Let’s examine each of these in turn:

Feature 1:  Religious fiction of a desirable after-life

The Norse religion promised Norsemen that death in war gave a Viking a ticket to Valhalla – the hall of the heroic dead.

In the Christian religion, there is a place where souls are believed to go if they’ve been good in their lifetimes,and it’s called Heaven.   Souls of religious martyrs are pictured as ending up there: “Also I saw the souls of those who had been beheaded for the testimony of Jesus and for the word of God …  They came to life and reigned with Christ for a thousand years.” (Bible, Revelation 20:4).  Some people also seem to interpret the verse “Whoever finds his life will lose it, and whoever loses his life for my sake will find it” (Bible, Matthew 10:39) as a promise of good things in the afterlife for someone who gives up his/her life for religious reasons.

In the religion of Islam, there is a concept of a paradise or Jannah (the garden of paradise). It might be possible to interpret the following “Did ye think that ye would enter Heaven without Allah testing those of you who fought hard (In His Cause) and remained steadfast?(Qur’an, sura 3 (Al-i-Imran), ayah 142) as a promise that fighting in the cause of Islam shall lead to benefits in the afterlife.  The hadiths also apparently consider Jihad to be one of the 8 doors to entering Jannah.

Such beliefs can have a huge effect on the decision making process of a person considering going to war for a religious cause or a political entity claiming to represent a religious cause.

The person would have two alternatives:

  1. Staying away from war and facing social disapproval.
  2. Going to war, risking dying or returning rich from plunder.

The first alternative would entail no risk of death, but there would be the pressure of disapproval from social circles (especially in societies with a strong concept of honor).  The second alternative would be very risky because the worst-case outcome would be death.

The second choice would therefore be a logical choice only if the rewards-to-risks ratio were more palatable than the disapproval involved in the first choice.  The risks in the second choice (dying in war) would feel more acceptable if there were an enticement attached to the worst-case scenario (the enticement of heaven after death).

As a result, a religion which sanctioned or rewarded dying for a cause would be able to raise larger armies of soldiers for a political leader than a religion that didn’t.

The benefit to the religion would be support for propagation of the religion by the political leaders and their soldiers.

Feature 2:  Religious fiction promising divine help in a project

Just as religious fictions promising a felicitous afterlife serve to bring more soldiers to the battlefield, religious fictions promising victory in war help to keep more soldiers on the battlefield (prevent them from abandoning the fight and running away).

This is because the more a soldier believed that their side would win, the lower would be their expectation of desertion by their buddies, and lower the chances that they themselves would desert.  Consequently an army of soldiers confident of winning would have a higher chance of really winning (all else being equal) and a lower chance of defeat and death.

The above effect has been explained mathematically using game theory in an earlier post on this blog.

Essentially, you can build a game theoretic canonical form representation of an army of 2 soldiers as shown below.

In a war, the benefits to each soldier can be modeled as a bi-matrix (normal-form game) as follows:

soldier 2 fights soldier 2 flees
soldier 1 fights 5, 5
–5, 0
soldier 1 flees 0, -5
0, 0
Normal form or payoff matrix of a 2-player, 2-strategy game

The first of the two numbers in the matrix represents the payoff to soldier 1.

The second of the two numbers in the matrix represents the payoff to soldier 2.

(The soldiers win something (represented by 5 points) if their army wins; they win nothing if their army loses; and they lose their life (represented by -5 points) if they do not flee and their army loses; we assume the army wins if both soldiers do not flee and loses if one or both flee).

If soldier 1 trusts soldier 2 not to flee the battlefield, the best strategy for soldier 1 is to stay and fight as well (since he will then get more benefits than if he flees).

If soldier 1 does not trust soldier 2 to stay on the battlefield (if he suspects that soldier 2 will run away), then the best strategy for soldier 1 is to run away himself (so that he does not remain on the battlefield and get killed).

So, this model shows that if two equal 2 man armies meet on a battlefield, the one whose soldiers trust each other more will win.

So, religions of a certain kind can supply two of the most important needs of a political leader keen on fighting a war – finding soldiers and keeping soldiers.

To do these, they need to have a good story of the afterlife, and they need to credibly promise victory in war.

An early Jewish holy book (carried forward into the Bible) called the book of the Judges contained stories of wars that were won as promised by god.  In the stories, the Jews are shown as losing wars when not true to their religion, and winning them when true.

In the case of Islam, something similar can be seen after the defeat of the Muslim army in the Battle of Uhud in 625 A.D.  After the loss, the prophet Muhammad is said to have explained the loss as follows: “Allah did indeed fulfil His promise to you when ye with His permission Were about to annihilate your enemy,-until ye flinched and fell to disputing about the order, and disobeyed it after He brought you in sight (of the booty) which ye covet. Among you are some that hanker after this world and some that desire the Hereafter. Then did He divert you from your foes in order to test you but He forgave you: For Allah is full of grace to those who believe.

Feature 3:  Religious fictions promising divine sanction for harmful actions

One other feature of certain religions that could have helped political leaders was religious sanction for crimes that would otherwise not receive social sanction.  There are examples of horrific massacres (justified through the premise of permission from the divine).

In the Christian and Jewish traditions is the story of a Jewish prophet by the name of Moses requesting the Jews not to spare anyone from a community of people called the Midianites (that had attempted to involve the Jews in their religious practices) after they had been defeated.  Moses says: “Now therefore kill every male among the little ones, and kill every woman that hath known man by lying with him. But all the women children, that have not known a man by lying with him, keep alive for yourselves” (Bible, Numbers 31:17-18).

Muhammad is also reported to have participated in a massacre of a Jewish tribe (the Banu Qurayza) living in Medina after the successful defense of Medina by his army.  Ibn Ishaq, a Muslim historian writes: “Then they surrendered, and the Apostle confined them in Medina in the quarter of d. al-Harith, a woman of B. al-Najjar. Then the Apostle went out to the market of Medina (which is still its market today) and dug trenches in it. Then he sent for them and struck off their heads in those trenches as they were brought out to him in batches. Among them was the enemy of Allah Huyayy b. Akhtab and Ka`b b. Asad their chief. There were 600 or 700 in all, though some put the figure as high as 800 or 900.”  (After that, the Jewish women and children were divided up among the Muslims that had participated in the siege, and Muhammad himself selected one of the women, Rayhana, for himself).

In the Indian epic, The Mahabharata, the deity Krishna repeatedly sanctions the killing through treachery of his enemies, ensuring the victory of the political leaders he is aligned with, though in the process violating all the rules of war and justice.

In all these cases, a religion enabled a political force to breach ethical norms and overcome natural human tendencies to forgiveness and compassion in its pursuit of political benefits – such as the complete elimination of an enemy, control over their lands and resources, and sex slaves as rewards for soldiers (in the Jewish and Muslim stories), and the winning of a kingdom through dishonest means (in the Hindu story).

These are not just fictions from a distant past.  The same fictions permit organizations like ISIS to act in an extremely inhumane manner to the present day.

Feature 4:  Exclusion of other religious/political groups

Feature 4 is the most troubling of all.  It appears that extreme religious views benefit a political symbiote more than moderate religious views.

That’s because more inclusive views do not create political projects capable of emotionally impelling a large mass of people to support to a political symbiote.

So, for example, more inclusive religious fictions would not generate the conflict required for expansion of a religious system at the cost of other religious systems.

Less inclusive religious fictions could, on the other hand, drive a large number of people to join a political project, leading the group participating in the project to dominance over more inclusive groups.

An example can be seen in the case of the house of Saud.  Ibn Saud was the first king and founder of the third Saudi Arab kingdom (modern Saudi Arabia).

He positioned himself as the promoter of the teachings of a cleric – Muhammad ibn Abd al-Wahhab – who rejected the veneration of Muslim saints and their tombs.

Ibn Saud’s opponents in the Rashidi tribe of Arabia, who held a less strict view of Islam, would not have had any quarrel with Ibn Saud’s followers, and so would not have had a cause to use to muster large numbers of warriors to make war on Ibn Saud.

On the other hand, since Ibn Saud’s followers could be and were roused to righteous anger against the Rashidi tribe’s “decadent” religious views, making it possible to muster them in large numbers for the political project of the Saudi royal family.

Subsequent events have shown that more and more extreme religious fictions have been invented by political forces (the Taliban and then ISIS) to successfully displace more tolerant religious fictions in their areas of influence.

In India too, a similar process can be observed in Islam in Kashmir and in Hinduism mainly in North India.

In the case of Hinduism, one extremist religious fiction is the belief in the inadmissibility of cow slaughter (and older and even more damaging fiction that’s dusted and rolled out at every election is the belief that Ram’s birthplace lay right under a mosque).

Any group of Hindus that believes that it is up to individuals to decide if they should or should not consume a meat product such as beef might would have no quarrel with people who consumed beef.

On the other hand, a group who believed that the killing of a cow constituted a religious slight to Hindus would be able to motivate opposition to those who consumed beef.  If a political symbiote identified such a conflict-generating fiction and aligned their political project to it, they could then be propelled to power through it.

Let’s take another example, this time to do with Christianity.

Let’s say there is one group of Christians that believes that the most important religious fictions in the Bible happened to be the injunction to love others and to turn the other cheek to an assailant.  Such a group would be able to coexist peacefully with people of other religious persuasions.

However if a group believed that the most important religious fictions in the Bible were the Christ-is-necessary-for-the-afterlife-insurance-to-work fiction (“no one comes to the Father but through the Son”), the command to propagate the religion (“go ye to all the world and preach my gospel to every people”) or even the monotheistic fiction (“there is no one like you, Lord, and there is no God but you, as we have heard with our own ears”) would find it easier to generate conflict with people around the world possessed of different viewpoints from theirs.  The engendered conflict could be exploited by a political symbiote seeking a political project.

So, this imbalance of political utility in favour of extremism is bound to give rise to a tendency in all religions to slide in the direction of more extreme views.

I suspect such a shift being involved in the rise of ISIS (through its symbiotic relationship with Salafism in the middle east).

I suspect such a shift having helped the rise of the fortunes of the BJP (through its symbiotic relationship with right-wing Hinduism).

I suspect such a shift in the rise of Trump (his symbiotic relationship being with white Christian conservatives).

Feature 5:  Religious Political Projects

Many religions provide their own political projects.

Judaism is clearly associated with the political project of occupation of a portion of the land of Israel/Palestine.

Islam has concepts such as that of the Dar ul Islam and Dar al Harb which create a political project of domination of political entities with the goal of spreading the teachings of Islam.

 

B)  Barriers to Exit

So far, I have talked about the ways in which religions acquire promoters.  Religions also deploy a number of methods to erect barriers to keep promoters from leaving a religion.

Here are some of the barriers used:

1.  Network Effect Barriers

As I have described above, once organized religions reach a certain size, their resources and the number of promoters invested in them allow them to maintain a higher rate of acquisition compared to a smaller religious organization.  This forms a kind of barrier to promoters leaving, in that either social opprobrium (from the majority of the people around being promoters of the larger religion) or the fact that they are more likely to encounter promoters from the larger religion leaves them more likely to remain with the larger religion.

2. Consistency Bias Barriers

Humans are prone to consistency bias.  They do not like to be seen as fickle.  So once someone asserts a belief (to themselves or to someone else) they are bound to find it very difficult to change their mind about it.

Religions from the middle-east generally use this to their advantage, by prescribing periodic meetings of promoters where the promoters affirm their adherence to the fictions of a religion.

Christianity has its ‘creed’.  Islam has the ‘shahada’.  Judaism has the ‘shmah’.  In Christianity and Judaism, the frequency of affirmation of the creed is weekly.  In Islam, the frequency is (for the extremely religious) five times a day.

When a person recites an absolute assertion such as the creed, shmah or the shahada before a large number of witnesses, it becomes difficult for the person to allow themselves to be seen to be changing their minds about it.

I doubt Hinduism has an equivalent, and the closest I could see right-wing Hinduism come to it is with cries such as “Jai Shri Ram” and weekly meetings in “shakas” which might help erect barriers to exit using consistency bias.

3.  Legal / Penal Barriers

Islamic law in many jurisdictions prescribes the penalty of death for the “crime” of leaving the religion.

 

Measurement

Can we measure the degree of extremism of a dominant group’s religious fictions?  It appears that while a direct measure might not be easy to come up with, we might be able to find proxy measures for the same.

A proxy for the extremism of religious fictions might be the number (as a fraction of the population) of members of minority religions who succeed in living in any area.

As the favoured religious fictions of a dominant religion become more extreme, they should lead (by the mechanisms described above) to the elimination of more people of other religions from those areas.

So, in Gujarat, the reduction of the number of people professing Islam and other religions in Hindu-dominated localities of Ahmedabad might serve as a measure of the increase in extremism of those areas.

Similarly, in parts of Kashmir where the majority religion is Islam, and in Muslim majority areas of countries such as Pakistan or Bangladesh, the populations of non-Muslim minorities remaining might provide a proxy for the degree of extremism in the flavour of Islam in general use.

A proxy for the strength of the barriers to exit might be the rate of people giving up that religion in mixed-religion marriages in which both spouses decide to become promoters of one and the same religion.

 

Conclusion

I have argued above that in order to displace established organized religions, it becomes necessary for religions to propagate themselves through symbiotic relationships with amenable political players.  A pressure to move in the direction of more extreme (less inclusive) views results from the need to provide political symbiotes with political projects that can result in large-scale mobilisation.

In other words, by the principles of natural selection, religions are forced to morph into more virulent / harmful / intolerant forms.

 

About the author

Cohan Sujay Carlos is a researcher at Aiaioo Labs with a keen interest in history, economics and artificial intelligence.