Blog

The ubiquitous power of trivial knowledge

When I was in my second year of BE in Nitte University, I had an unusual opportunity to work with a research group consisting of my seniors working on a Machine Learning problem for a biomedical application. I was the only junior member in the team with zero experience in scientific computing. I did not have the functional knowledge of the theoretical underpinnings of machine learning or data science. Yet, for some reason, I was specifically asked for by the then head of the computer science department, Dr.Nileema Reddy.

My job was simple, I was to learn and teach the mathematics behind algebraic topology to the remaining members of the research group. Several presentations were done. I learnt algebraic topology well and delivered my understanding of the topic to the best of my ability to the team. As I recall now, they were some of the best months of my life in Nitte where I really learnt something.

Although, owing to the rest of the members in the team being in their final year (And only some of them interested to continue the research), I guess the project was left midway. I still do not know what happened with it. It was unfortunate for me specially since I found no gratification in terms of publishing out of whatever little efforts I had put in.

Today, I’m working on my master’s thesis at IIT-Delhi. My research is in Celiac Disease identification using Deep Learning. Recently, I was posed with a problem in my work to develop a differentiable loss function that would incorporate the clinically relevant information in the learning path of the DNN. I was stuck for months with this problem and just a couple of weeks ago, I revisited algebraic topology and its application in representation learning.

Couple of weeks later, I have succeeded in designing my experiments based on the principles of algebraic topology and I’m waiting for their results from my super-computing node.

Looking back, I don’t think even for a second that all the knowledge I gained on algebraic topology as a novice engineer has gone to waste. If anything, it is coming back to help me in ways I never imagined. That’s the end of this story.

Here is the barcode representation of the ground truth of a particular group of cells called the epithelial cells. My loss function incorporates some attributes of the statistic of persistent homology.

The Barcode representation of the ground truth image for the analysis of persistent homology.

Machine Learning for smart prosthetic control.

When I joined IIT-D, I had a brief stint in the neuro-mechanics research lab at the centre for biomedical engineering (CBME). Here, I worked extensively on gait analysis and prosthetic development for trans-femoral amputees. I made odd circuits that controlled the actuators of artificial knees, collected amputee gait data; to a considerable depth – learnt everything on the neuro-mechanical aspects of human gait and among other things, I interacted with several amputees to understand their daily experience of the world.

About 30 million amputees are residing in low income countries [1,2]. Among those, only 5% to 15% are capable of affording prostheses [3]. Although the popular state-of-the art prostheses used in developed countries offer several advanced features, their application is hindered in low income, developing countries primarily due to high cost, different functional demands and cultural issues. It is a terrible thing to have lost a limb. Other than the stigma and physical limitations, there are thousands of mental challenges that one has to constantly meet.

To tackle some of these issues in India, a group of scientists at CBME have developed a cost effective prostheses [4]. Efforts are on to make it “smart”. With the motivation to better control the prosthetic limb, I was involved in this effort wherein I helped formally analyse gait patterns and extract insight.

A new instrument was designed for this study with different sensors measuring different things (deliberate sentence!). Of the many different things measured, the foot-to-ground angle (FGA) was one. This was accompanied with gait event markers that indicated the following : toe-off and heel strike that occurs while walking.

Fig 1. Notice the toe-off (at the beginning) and the heel-strike(at the end) in the gait cycle.

This a graphical depiction of the FGA signal and the gait events I am talking about:

Fig 2. Segmentation of swing and stance phase of the FGA gait cycle.

Here is the question we posed – Can we design an algorithm that understands the type of terrain (One of Ramp Ascent (RA), Ramp Descent (RD) and Level Ground Walking (LW)) a person is walking on just by looking at the FGA signal? This would really help us actuate the knee motors better because different types of terrains require different amount of knee rotation (Obviously, haha!)

This is how each cycle of the FGA signal looks like for different terrains:

Fig 3. Foot-to-ground angle corresponding to different locomotion terrains across multiple gait cycle for one representative participant. RD (solid – blue); LW (dashed — red); RA (dotted …. green).

After hours of tedious data curation, I got around to finally doing some machine learning on the signals. I applied a basic 1-D convolution neural network (because the field of reception has a single dimension – time) and checked if it could do a good job at classifying the terrains of locomotion. Without elaborating much about the model itself or its mathematics, I have only shown class activation maps for (each sample) to better understand the findings.

In the above mosaic, the class activation maps for each locomotion mode has been shown. The segments of signals in the boxes represent the discriminative samples that help in decision making while the model is classifying them.

The average classification accuracy obtained for able-bodied participants and amputee is 79.57% ± 20.32% and 73.06% ±12.70%, respectively using standard support vector machine methods, whereas it is 83.45% ± 14.50% and 80% ± 12.15% respectively using the 1-D CNN formulation.

Once the prosthetic device understands the type of terrain a person is walking on, the knowledge can be used in a feedback loop to actuate the motors in knee (or even in the ankles) accordingly. This will considerably reduce the effort of the amputee as well as allow them to walk comfortably for a longer time duration at a stretch. However, this is still under development.

Read the whole paper at: https://www.sciencedirect.com/science/article/abs/pii/S026322412030988X

References:
[1]. WHO (World Health Organization). World report on disability 2011. Am. J. Phys. Med. Rehabil. Assoc. Acad. Physiatr. 201191, 549. 
[2]. Andrysek, J. Lower-Limb Prosthetic Technologies in the Developing World: A Review of Literature from 1994–2010. Prosthet. Orthot. Int. 201034, 378–398.
[3]. Pearlman, J.; Cooper, R.; Krizack, M.; Lindsley, A.; Wu, Y.; Reisinger, K.; Armstrong, W.; Casanova, H.; Chhabra, H.; Noon, J. Lower-limb prostheses and wheelchairs in low-income countries: An Overview. IEEE Eng. Med. Biol. Mag. 200827, 12–22.
[4]. Pandit, S., Godiyal, A. K., Vimal, A. K., Singh, U., Joshi, D., & Kalyanasundaram, D. (2018). An affordable insole-sensor-based trans-femoral prosthesis for normal gait. Sensors18(3), 706.

A small lesson

I have learnt a very small but an important lesson in just the last two months-
That, all glories are false and all successes, futile. What really enriches the soul is love. The companionship in which there is warmth and a belonging. A calling of the soul that reminds you of your home; with your loved ones. It’s an irreplaceable entitlement.

Let there be no reason for our happinesses.

A thousand millennial dreams.

We move to bigger cities for jobs and we merely just move. We continue to live in the setup of our little town where a play is on of our past days. And in these plays, we have a role, of an earlier version of ourselves which, in retrospect, is a role we’ve come to like more and more. I am a small town boy and I have moved out of my small town to a big city with big promises. I have tried to don the city vibe on myself but I am unable to fully accept it. It isnt me. I might be enlightened. I might be a lot smarter than 85% of the country’s population. But I can never become a city kid.

I miss the real connection I had with the earth back in my rustic town. I miss the long walks in the woods I took with my best friends. I miss the clean air and the sweet water that I used drink right from wild flowing streams. I miss my friends and childish talks. I miss the nights and the stars that I could count. I miss the comfortable bed which eased my pain and put me to sleep almost every night. I miss my loving mother and her simple meals. Yes, I am homesick but it seems, I will be homesick forever. Because I could very well return to my town. But I can never return to my childhood.

It is as if we want to admire the tip of our shadows as the sun begins to set on our carefree day.

A Suicide Note

This is a suicide note. Of course, it is obvious from the title but I am yet undead. No, it is not one of those days which went bad for me. In fact, I had a very successful day. Something, many youngsters in my country would die to live in. I won’t get into the details of my life because, it is irrelevant. What I am going through can happen to anybody; to people walking in the shimmering alleys of their lives till right down to the penniless peasant. Depression is an uninvited guest at everybody’s table.

For a while now, I have come to the realisation that life is a trap. There is no way out other than living it or ending it which is exactly what makes it frustrating. In life, there is no alternative to the process of living. Every other thing in life has an alternative. Thanks to capitalism, my life is being spent around enforcing that very scheme of things: choices. It is either this brand or that one. This sitcom or the other one. This type of food or the other exotic one. This apartment or the other one. This job or the other. Alternatives are everywhere but sooner or later, I find myself growing out of them. I try and find something better and stick to that for a while and keep moving so. This in a crude sense, defines the living conditions of humans. Even the enlightened ones live the life of choices. Their elaborate travels is testament to how frequently they change boats and how they do not like sticking to anything for a long time. All the choices in life, all the hard work we put into getting something, achieving  something eventually ends up in the dusty corners of our memories; at best some old history books. They become stories that we tell our children by glorifying our petty struggles back in the day.

Then, why do we do this? We do this to keep living. To stay on the sane side of the table. It is an evident fact that if you find something to keep yourself busy, some purpose, some goal, your existence holds meaning. But sooner or later, no matter what choice you make, you will realise that life in all its greatness is pretty meaningless. Ask yourself this once in a while to appreciate the “divine comedy” as Dante put it. The purpose of life is no more than to serve ourselves. Many schools of thought have emerged arguing to say that the purpose of life is service to humanity, service to animals and a whole lot of other BS. But all of it eventually wears out. In the deathbed, men die either with a delusional conviction that was hammered into them that they’ve lived a great and meaningful life or with the realisation of how meaningless it all was.

So, some of us, we tend to realise this meaningless struggle, a moot point pretty early in life. We move to the insane side of the table which mostly attracts invitations from the other side of the table to join the ranks of the sane once again. But we all made choices for being where we exactly want to be. When a person realises the meaninglessness that the package of life comes with, he often wants to put an end to it. But how are they so sure that death is any better? How would one justify the benefits of death over life? What more intrigue does death hold over the already fading intrigue of life? I don’t know it. Nobody does. It is just an alternative to life and the process of living.

So, whenever I am driven to the brink, I always remember this: At the end, death will visit us all. He was invited to pay us a visit the moment we set foot into the house of life. Till that time, no matter how many times I call out the illusion of life, I will hold on to it just to see how it turns out. Everybody will eventually see what I was shouting about and then one day, I can tell them, “I told you so!” and make peace with it.

The philosophy of failure

It is the fourth day of a nationwide lock down in the backdrop of the COVID-19 pandemic that the world is currently facing. I have been cooped up in my room for more than a week. My university closed down a couple of weeks before the prime minister’s call for a nationwide lock down that we are currently adhering to.

I have been working on an idea for several months. My objective is to develop an AI that can help augment a pathologist’s ability to diagnose a certain disease called the Celiac disease. I have hand annotated Histopathological images, yielding a novel data-set – rich in annotations that doesn’t exist anywhere else in the world. But with limited data, it is a herculean task to train a very deep convolutional neural network (with millions of learnable parameters) to make accurate predictions.

The AI must be able to propose a region of interest in a given histopathological image and indicate, with a certain degree of confidence that the doctors can perform diagnosis In the proposed region of the biopsy slide. In technical terms, the AI must perform a localization task on something I call the interpretable region. But so far, I have been unsuccessful (All my successes are statistically insignificant) in my attempts at beating the state-of-the-art numbers with the several experiments that I have been conducting. This account bears testimony to all my failures and the lessons that I elicited from them.

The very first lesson that I learned is that failures come as an altruistic experience. It is to personify the very idea of failure and remark its efforts in failing us as an act of altruism for our betterment. The only purpose that failure serves is that it makes an individual steadfast and rigorous in whatever field he has chosen for himself. It ensures to expertly, and surgically disentangle the childish romanticism of success from the more practical, tough and labyrinthine effort that begets success in reality. It titrates into our daily lives, the right amounts of passion and dispassion.

Particularly, I am talking about the repetitive nature of failures that young scientists like me have to inevitably face early on in our careers. These failures have an unfathomable quality about them. We acquire a taste for their bittersweet experience and before long, they become a part of our routine. Here, bitter is an encounter with failure itself and sweet is the insight into the scope for improvement that it brings along.

I think of it like acquiring a taste for tea. It takes people several cups of hibiscus tea before they genuinely relish the experience of drinking it. One might ask, as to why one chooses to partake in voluntarily downing multiple cups of this bitter beverage if neither its taste nor the flavor is appealing – to which I say, the persistence is in pursuit of beauty. The tea’s color, its staining on the porcelain, its acrid aroma and texture, these are beautiful things. One consumes this beauty when tea is consumed and to do so is a self-imposed privilege. Nothing furthers this truth for multiple failures on our way to success.

There is profound beauty in the directions that failures show us. If the winds had a paintbrush attached to their tails, the vibrant mess of brushstrokes it’d leave behind would expose this beauty. How many years go by, How many meaningless excursions in the empty expanses of the world do the winds take before momentarily filling a creature’s lungs with life!

The law of Crazy

We all need a little bit of craziness in us. Like the right rain needs a little bit of wind that sends the drops swirling down from the sky.
We all need a cloud like the bright sun has one. And we need a silver lining which defines the darkness of the cloud. We need imperfections which highlight our perfections and we need flaws which will complement the flawlessness of the soul.
Privileged people mostly have good lives. But still, we crib with a bag of silver and gold. A mixture which not many are fortunate to have. A bag of silver and gold which gives us a reason to hate silver and love gold.
But we never realize that all our gold needs a little bit of Silver to strike a balance between blinding brightness and a soothing shine.