Do Your Thing

“Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma – which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition.” __Steve Jobs

What’s your thing? Not your dad’s thing, not your neighbors thing, not your kids thing, not your grandma’s thing, not your manager’s thing but your thing, what is it? My sense is you can’t put a finger on it, so are about 7.5 billion others on this planet, you are not alone. I will take a wild guess and say that if you are asking this question, you are definitely in the 99.99 percentile of the world’s population (one of the 0.75 million people) who are likely asking themselves this question.

It’s easy to say “just be yourself”, “do your thing” but not easy to do it, otherwise the whole world would’ve already done it. The problem is not really in doing but really in developing that conviction about your thing. For example, I love writing, art, design, coding and running, a few things I really enjoy and wouldn’t mind spending a big chunk of my time in a day doing one or all of them. The challenge is two-fold, one believing that any of these things is going to pay my bills and take care of the family and even if I believe, how do I figure out which of these things is my thing? May be it’s a new thing that combines two or more of my interests?

Is the thing already within me and not something external that is magically going to appear one fine day? I think it’s latent and my job is to surface it, support it, like protecting a small fire and kindling it until it grows to become a huge fire. It’s a marathon. It’s a process, day in and day out.

Once I figure out what the thing is, then the next step is to develop conviction/faith in it. How does one develop conviction in something, isn’t it through experimentation? Can faith develop overnight? Is it a flip of a switch? I don’t think it is, faith develops over time, as we see small progress being made each day. For that kind of experimentation to happen, one must be ready to experiment, fail, learn and try something new the next day. How do you know if you are failing or succeeding? It can’t be done inside your own mind, your thing has to come in contact with the people you are trying to serve. They have to provide that feedback and that feedback becomes the life blood in refining your thing. All of this takes time, practice, discipline, daily hustle, daily communication with your users.

Someone put it like this, “How much suffering are you willing to take”, may be that’s it. How much sacrifice and suffering are you willing to go through to accomplish your thing? Embarrassment, cold-calling people, falling flat on your face, feeling uncertain, feeling fear and yet moving on, what a way to keep it real, that’s why I love entrepreneur’s journeys. It’s the ups and downs and facing harsh realities, facing one’s self, facing the dark abyss, the feeling of eating glass every day for breakfast, lunch and dinner.

I digress, so how do you surface “your thing” to the forefront of your day, how do you make it your thing everyday and live it, breathe it and do it? Are there rituals, practices and tools to help you work on your thing daily? As Stephen Covey put it, “The main thing is to keep the main thing the main thing.” and to make your thing the main thing is the main thing.

With Love, A.I: TensorFlow, Keras, PyTorch And A Hodgepodge Of Other Libraries

Hodgepodge of AI Libraries

In the beginning there was FORTRAN one of the first widely spread high-level programming language. Then came Algol, PL/1, Pascal, COBOL, BASIC, C, Lisp and others and then came javascript, Python, PHP, Perl, Ruby and the more widely adopted object oriented programming languages C++ and Java. It took nearly 50 years to go from FORTRAN to Java.

In contrast, AI research has been in the works for many decades starting in the 1950s, there have been as many if not more libraries created in the past 10 years as there were programming languages created in the last 50 years.

Here is a chart of AI libraries and how many people “follow” them on github, interestingly, newest of the libraries, TensorFlow seems to be a few orders of magnitude more popular than the others. That doesn’t mean it’s the best AI library, in fact there is no such thing as an AI library (general purpose). My sense is that there are libraries that assist in developing AI applications and some are better suited for an application than others, depending on the problem being solved e.g. computer vision, natural language processing

Let’s take a quick look at what each of these libraries are suited for

TensorFlow – provides a collection of workflows to develop and train models using Python, JavaScript, or Swift, and to easily deploy in the cloud, on-prem, in the browser, or on-device no matter what language you use.

scikit-learn – machine learning library of algorithms for data analysis and regression in Python

BVLC/Caffe – Berkley Vision and Learning Centre’s Caffe is a deep learning library for processing images. Caffe can process over 60M images per day with a single NVIDIA K40 GPU

Keras – a deep learning Python library that runs on top of TensorFlow, Theano or CNTK. Primarily an experimentation framework assists in fast experimentation with models.

CNTK – Microsoft Cognitive Toolkit is a deep learning library that can be included in Python, C# or C++ code. It describes neural networks as a series of computational steps in a directed graph.

mxnet – A flexible and efficient library for deep learning.

“Deep learning denotes the modern incarnation of neural networks, and it’s the technology behind recent breakthroughs in self-driving cars, machine translation, speech recognition and more. While widespread interest in deep learning took off in 2012, deep learning has become an indispensable tool for countless industries.”

source: https://mxnet.apache.org/versions/master/faq/why_mxnet.html

PyTorch – is an open-source machine learning library for Python, based on Torch, used for applications such as natural language processing.

PyTorch is a Python package that provides two high-level features:

  • Tensor computation (like NumPy) with strong GPU acceleration
  • Deep neural networks built on a tape-based autograd system

Theano – is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. 

Caffe2 – aims to provide an easy and straightforward way for you to experiment with deep learning and leverage community contributions of new models and algorithms. 

Torch7 – is a scientific computing framework with wide support for machine learning algorithms that puts GPUs first. It is easy to use and efficient, thanks to an easy and fast scripting language, LuaJIT

Ok great, this is a list of a few of the hundreds of AI libraries, so what? I can google them myself, what’s the point of this blog? I’m as deluded as I was before reading this blog, if I am just starting out in AI, which library should I pick, where should I start? The short answer is pick any library, you will be better off picking one and running with it and developing something than not picking any, you have to do it, might as well start now than later.

Of course a better answer might be, what do you seek to solve? Are you looking to programmatically recognize people’s faces or cars in a photograph of a busy street? You might want to start with the BVLC/Caffe. Here is a good presentation to get you started on Caffe

If you seek to solve parsing and understanding written or spoken word, may be PyTorch is the library to start with. Here is an interesting tutorial for creating a chatbot using PyTorch

Hacking Spirituality

Spirituality is not about religion and religion is not always about spirituality. Spiritual is ritual of the spirit, without spirit, spiritual is just that, a “ritual”.

What is this spirit. It has to do with the core of one’s self without all the jumbo mumbo (“extra layers”) i.e. job, relation, name, skin color, character traits, physical body and so on. Who is Madhav without the name. He is not the product director, not the runner, not the artist, not the son, not the dad, not the brother. If we take all these “extra layers” away, then who is “Madhav”?

I realize that it’s nothing but the same pure consciousness that pervades the universe, it’s neither distinct or distant from it. However, when I add all the “extra layers”, it turns into this thing called “Madhav”. What the heck is pure consciousness, anyway, I don’t know, it’s the pristine state of something? the original state before it was modified. I’m coming from the assumption that I’m something that has been modified and in some ways tainted due to the “extra layers” associated to me but there must be something, a Madhav, that is untainted and pure, right?

If you are with me until this point, then let’s talk hacking spirituality. Spirituality is nothing but getting to and being in this state where there are zero “extra layers”. If activities such as meditation, yoga, prayers, going to temple etc are helping you eliminate the “extra layers” then they are truly spiritual activities and if they are not then they are absolutely not spiritual.

One could spend their entire life inside the sanctum sanctorum of a temple chanting hymns and yet be far away from spirituality. One of the practical ways to bring oneself closer to pure consciousness is to eliminate as many of these “extra layers” as possible. For practical purposes, it’s hard to remove your name, your body, your job position etc although they may be possible I am more interested in the path that is a process of refinement over time.

For example, one of the layers that we could eliminate is the negative emotions i.e. anger, greed, lust, arrogance, desire. These are the lower level animal qualities. Reducing these animal qualities could be the purpose of spiritual practice. As we reduce the animal qualities, there will be room made for divine qualities. We cannot pour anything into an already full vessel, can we?

if you are still with me then you can imagine how to solve a problem that is well defined, eliminating lower level animal qualities. There are many hacks for eliminating each of these qualities, here are some of my thoughts –

ANGER

Anger – use speed bumps (speed breakers) in your head whenever you realize that you are angry

ARROGANCE

Arrogance – develop appreciation for many good things that have come about in this world that didn’t involve you, obviously there are many good people just like you otherwise none of these things would be here. Always, see the good in others, try to be humble

DESIRE

Desire – desire for the worldly objects and pleasure; the only way I have come to manage (not eliminate still working on it) desires is by not getting into them, for example, I don’t drink or smoke, it’s easy to have a drink now and then and tell yourself that it’s okay. Even better is not to start it in the first place.

GREED

Greed – I want it all, it’s all mine mine and mine; it’s okay and important to have money and possessions but when they are in excess the chances are you are going to misuse them, unless you have the mindset where money is not the reason for why you do what you do. Money for personal use should be like the shoe, if the shoe is smaller or bigger than your size, it gets very uncomfortable to walk.

ATTACHMENT

Attachment – I don’t know what the antidote is, trying to figure it out. How do you not be attached to the things around, your family, your accomplishments, your possessions etc. I realize that this could all disappear any minute but still quite hard to let go of them while also living with them, I am not a hermit living under the rock, for gods sake I am a blogger and podcaster trying to make a living in an unconventional way, what do you want from?

With Love, A.I: Radiology

“If AI can recognize disease progression early, then treatments and outcomes will improve.”

Isn’t it fascinating how little we understand about the brain?. A really good case for applying deep learning AI to recognize subtle patterns and changes to neuron activity can help in early diagnosis of Alzheimers disease. Using Positron Emission Tomography (PET) scans researchers are able to measure the amount of glucose a brain cell consumes.

A healthy brain cell consumes glucose to function, the more active a cell is the more glucose it consumes but as the cell deteriorates with disease, the amount of glucose it uses drops and eventually goes to zero. If doctors can diagnose the patterns of drop in glucose consumption levels sooner, they can administer drugs to help patients recover these cells which otherwise would die and cause Alzheimers.

“One of the difficulties with Alzheimer’s disease is that by the time all the clinical symptoms manifest and we can make a definitive diagnosis, too many neurons have died, making it essentially irreversible.”

JAE HO SOHN, MD, MS
the brain of a person with Alzheimer's disease sits next to a normal brain
The brain of a person with Alzheimer’s (left) compared with the brain of a person without the disease. Source: https://www.ucsf.edu/news/2019/01/412946/artificial-intelligence-can-detect-alzheimers-disease-brain-scans-six-years

Human radiologists are really good at detecting a focal point tumor but subtle global changes over time are harder to spot by the naked eye. AI is good at analyzing time series data and identifying micro patterns.

Other areas of research where AI is being applied to improve diagnosis is in osteoporosis detection and progression through bone imaging and comparison of subtle changes in the time series of images.

Stroke management is another area where machine learning has started to assist radiologists and neurologists. For example, here is a picture of how computers are trained with stroke imaging and then that model is used to predict if a “new image” has infarctions or not (it’s an yes or no answer).

Does this new image have infarction Yes/No? Machine says Yes and color codes the area of the brain in red. Source: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5647643

Furthermore the ML model can identify the exact location of stroke and highlight it for the physicians, saving precious time and helping expedite treatment, in stroke treatment seconds shaved off can mean the difference between life and death.

The areas in which deep learning can be useful in Radiology are lesion or disease detection, classification, quantification, and segmentation. 

“Deep learning is a class of machine learning methods that are gaining success and attracting interest in many domains, including computer vision, speech recognition, natural language processing, and playing games. Deep learning methods produce a mapping from raw inputs to desired outputs (eg, image classes)”. __RSNA

Figure 1.

Convolutional Neural Networks (CNN) algorithms have become popular in identifying patterns in data automatically without any external engineering, especially in image processing. CNNs are developed on the basis of biological neuron structures. Here is an example of how biological neurons detect edges through visual stimuli i.e. seeing.

Figure 5a.
Source: RSNA.org

and here is how a similar structure can be developed using CNNs

Figure 5b.
Source: RSNA.org
CNN representation of biological neurons

The “deep” term in deep learning comes from the fact that there are multiple layers between inputs and outputs as represented in a simplified diagram below

Figure 6.

If we apply the above CNNs structure to radiology images as inputs to detect disease or segment the image we can have an output that might highlight the areas where there is possible disease and/or output that says what the image might represent

Figure 7.

“Many software frameworks are now available for constructing and training multilayer neural networks (including convolutional networks). Frameworks such as Theano, Torch, TensorFlow, CNTK, Caffe, and Keras implement efficient low-level functions from which developers can describe neural network architectures with very few lines of code, allowing them to focus on higher-level architectural issues (3640).”

“Compared with traditional computer vision and machine learning algorithms, deep learning algorithms are data hungry. One of the main challenges faced by the community is the scarcity of labeled medical imaging datasets. While millions of natural images can be tagged using crowd-sourcing (27), acquiring accurately labeled medical images is complex and expensive. Further, assembling balanced and representative training datasets can be daunting given the wide spectrum of pathologic conditions encountered in clinical practice.”

“The creation of these large databases of labeled medical images and many associated challenges (54) will be fundamental to foster future research in deep learning applied to medical images.” __RSNA

300 applications have been identified for deep learning in radiology, check the survey out here

Sources:

  • https://pubs.rsna.org/doi/10.1148/rg.2017170077
  • https://www.ucsf.edu/news/2019/01/412946/artificial-intelligence-can-detect-alzheimers-disease-brain-scans-six-years
  • https://www.rheumatoidarthritis.org/ra/diagnosis/imaging/
  • https://pubs.rsna.org/doi/10.1148/radiol.2019181568
  • https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5647643/
  • https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5789692/

Playing Defence.

“You don’t need more time. You just need to decide” __Seth Godin

Yes that’s defence as in the sport of Cricket. Defence is important, that’s the way you protect yourself from getting out to good deliveries but I just realized that I’ve been playing too much defence for too long. 

A good delivery needs to be respected and defended against but most deliveries are not that good, they need to be sent to the boundary and yet I have continued to play defence because it seems safer.

How to play offense and still stay in the game? Well, it’s by taking action. It’s by doing; not by thinking, not by dreaming but by acting on your ideas. As Seth Godin puts it, “You don’t need more time, you just need to decide”.

It’s tough to get out of the zone that I am in right now because I fear going into a suckier zone. Really, is that possible? Well it depends on what the zone feels like, is it mind numbing, uninspiring, monotonous, meaningless, or is it great but just super hard? If it’s any of the former reasons, then doing something you like and want to do will definitely feel better.

If it’s the latter reason (great work but hard work), then welcome to being an adult. There is nothing to change here but your attitude. You are late, get going and good luck.

1% Better Everyday And Other Lies

“You can paint a horse with numbers but you can’t whisper to the horse like a real artist!” __Madhav SBSS

There is a trend now a days of talking about percentages, numbers and quantified wisdom. Trust me, I love numbers; at MIT, everything was numbers including our restrooms, desks, computers and classrooms. The issue with trying to explain how to live a good life with numbers is like “paint with numbers”. You can paint a horse with numbers but you can’t whisper to the horse like a real artist could!

Only machines might understand what 1% daily improvement really means. To say, “improve your craft by 1% every day” is a bad advice for humans because humans don’t think in terms of percentages when living their day to day lives. When was the last time you said, how can I make my coding skills 1% better or cooking veggie chili 1% better, probably never.

A better way to put this concept of improving every day in every thing we do is to say “put one foot in front of the other” and keep moving forward. I understand this “cliche” lacks the cool sounding percentages, it sounds cheesy and less analytical and it does not say anything about improvement. What does it mean to say put one foot in front of the other when I am learning to paint or swim or cook?

The way I see it, one foot in front of the other means two things, first, just doing it and second, doing it in a way that makes the next step slightly better in some meaningful way, actually doing it consistently is a big win in itself, it doesn’t always have to be about efficiency, it can be consistency or a qualitative improvement e.g.

Can I walk 100 feet more today?

Can I mediate for 1 minute longer today?

Can I read 1 extra page today?

Can I practice violin for 1 minute longer today?

It is as simple as that.

Psychedelics, Entropic Brain and Consciousness

“Who looks outside, dreams; who looks inside, awakes.” –Carl Jung

I’d have never thought I will be interested in entropy ever again after my thermodynamics classes during high school. Well who knew!

I am reading up a bit of literature around entropic brain, psychedelics and experiments. Johns Hopkins, UC Davis and others schools are pursuing psychedelic experiments in treating diseases of the mind, addiction and cancer, it’s super fascinating. I came to know of this paper on Entropic Brain from one of Tim Ferris’s podcasts and I’ve read it, it’s hard to understand but it is a good starting point to get an overarching idea of the topic.

“It does not seem to be an exaggeration to say that psychedelics, used responsibly and with proper caution, would be for psychiatry what the microscope is for biology and medicine or the telescope is for astronomy. These tools make it possible to study important processes that under normal circumstances are not available for direct observation.”

(Grof, 1980)

Psychedelics have been observed to help humans relinquish ego’s primary hold on reality, bringing us to our “primary state of consciousness”. The idea that psychedelics cause more entropy (disorder or uncertainty) in our brain and when there is entropy in the brain, it seems to make us not have boundaries and delineation of “me” and “not me” and yet be able to observe the unity of “me” and “not me”. Yes, it sounds crazy and it might be. It might even be that people hallucinate and have this self-fulfilling outcome they were told would be experienced. I don’t know, I have not done LSD or psychedelics but I am intrigued by the prospect of feeling one with this cosmos around us and not feel like I’m living a small, “me me me”, self-centered life.

Enough of feeling one with the super consciousness. What might be the coolest thing is if psilocybin (a psychedelic) could help here and now in treating cancer, depression, addiction or OCD.

“Specifically, it is proposed that psychedelics work by dismantling reinforced patterns of negative thought and behavior by breaking down the stable spatiotemporal patterns of brain activity upon which they rest.”

Robin L. Carhart-Harris et al https://www.frontiersin.org/articles/10.3389/fnhum.2014.00020/full

Above all else, treating diseases, unifying with super consciousness and everything in between, the most interesting thing I am learning as I read about psychedelics is that meditation can bring about these exact experiences in us if we are open to experimenting with it and are patient enough to sit quietly amidst all the wonderfully magnetic distractions of this physical and not-so-physical worlds.

Other sources:

MAPS.org

Develop Attachment to Detachment

“Penchaga Penchaga Perige Aasalu, Thrunchaga Thrunchaga Tholagunavi”

(Just as we steadily grow our desires, we can eliminate them by steadily nipping at them) –Padakavitha Pitamaha Sri Tallapaka Annamacharya

Attachment to stuff hurts. You are in the Apple store, someone looking at an iPhone drops it on the ground and shatters the glass. You might say “Uh oh” but you won’t lament over it. Suppose, you had just bought that iPhone and dropped it on the floor, how would you react?. It’s the same device a couple of minutes ago, now that it’s “yours”, you lament that it’s broken. Attachment to that phone causes grief.

Annamacharya, thoughtful poet, writer and philosopher from South Indian sings about how one can eliminate attachment to things just as one grew attachment to them in the first place. Reducing it slowly, steadily and bit by bit. He calls out for practicing a ceiling on desires in this beautiful krithi “Veggalamintha Vrida

Veggalamintha Vrida Vrida by Annamacharya
Sung by Prince Rama Varma

Is The Unexamined Life Not Worth Living?

The amount of life we truly live is small. For our existence on Earth is not Life but merely time

We won’t let a stranger walk into our home but we welcome all kinds of thoughts to enter our mind and rob us of our true nature. We let our eyes and ears go wherever they please or wherever they are directed by online recommendation algorithms.

Examining one’s own life is not about the external world, it’s about introspection. Who am I? Why am I here? Where did I come from? Where am I going? Questions often dismissed as time-wasters because they sound daunting, they require thinking, experimenting, learning, failing, falling, getting up and trying again. We don’t want to go through that strenuous process, sleepwalking through life aimlessly is simpler and easier, it’s the path of least resistance.

Socrates says that an unexamined life – life devoid of love of wisdom – is not worth living. He believed that logically questioning and experimenting in the pursuit of wisdom is the sole purpose of Life.

socrates
socrates

Some might say, seeking wisdom is for the elite. Is it elitist to seek wisdom? Isn’t seeking wisdom an inherent human quality? Isn’t it true that children ask hard questions? Would you consider children elite? No. They are being human, curious, empathetic, innocent and self-examining. Why is it that we lose that child-like curiosity?. Wisdom is not just about exploring life’s hard questions, it is learning about yourself.

I believe it’s best to think from first principles and not rely on “common” knowledge. There are exceptions. Common knowledge is usually wrong. Earth is round, gravity pulls things towards the earth, fire burns, these are first principles and it’s beneficial to leverage them.

What is our (your) true nature? To burn is fire’s inherent nature, whether you believe it or not. One may say I don’t believe in fire, I am going to jump into it, you know what, fire doesn’t care whether you believe in it or not, it will still burn.

Every element in this universe has an inherent quality, for humans, it’s the Dharma, pursuit of right living. So, unexamined life is not just some exotic stoic concept, it’s about living a good life, life that you are satisfied with, life that you created for yourself, not dictated by others. Life where animal qualities – lust, greed, anger, attachment, arrogance, pride – take the backseat and reasoning, compassion, kindness, love and joy take the driver’s seat.

“A life that is in service of others. A life that recognizes and lives by the principle of oneness in everything. Bulbs are many but the electric current that lights them up is one. Cows are many but the milk is one, sweets are many but sugar is one. Humans are many but the consciousness is one, it is the same consciousness in the microcosm and in the macrocosm.”

Sathya Sai Baba

Well that’s my thinking, these are not first principles, so I urge you to not accept my take but instead examine life for yourself, question and experiment. Live a life you consider worth living, not according to someone else sitting on a pedestal and pontificating how you should live your life.