Tuesday, August 7, 2018

recent recommended reads

this book was beyond excellent. very simple ideas beautifully explained. the four agreements is easy to read, much harder to practice, but will help you become a better human being in the true sense of the word. the agreements are: a. be impeccable with your word (integrity), b. do not take anything personally, c. never make any assumptions, and d. always do your best. 

the author uses his experiences from SEAL training and subsequent missions to deliver hard-hitting life lessons on leveraging one's skill set with a never say die attitude to achieve success. inspiring. but I still liked "unleash the warrior within" and "the mission, the men, and me" better. good read regardless.

what can I say? this book blew me away. the stories were interesting to read, but also require deep reflection on the reader's part. beautiful, even soulful, book.

these authors do a good job explaining deep learning from the fundamentals. it is nice(r) if you have some understanding of tensor calculus and tensorflow going in. I'd recommend siraj raval's excellent youtube video on the differences between facebook's pytorch and google's tensorflow platforms to at least get to a nodding level of familiarity to supplement this reading. 

michael lewis tells the story about kanheman and tversky and behavioral economics, and how the field blossomed. excellent read. would also recommend "thinking fast and slow" and "models. behaving. badly"

well, if you need to find a job, you need to brush up your interview skills. having recently interviewed several people for roles in my team, this was a book I read to conduct interviews competently - interviewing is an art form at both ends of the interview table - don't let anyone tell you otherwise.

GRRM writes a very nice tale set in a futuristic universe. tugs at your heartstrings. 

NDGT does not disappoint. very engrossing book, and very readable too - unlike hawking's "a brief history of time" which I found very difficult to read. really understanding the latter took me several weeks. this one is a much more friendly read.
 how to say yes and be open to exploring possibilities vs. closing your mind to what might happen while staying comfortably ensconced well within your comfort zone. must give these ideas a try.

interesting book that covers not just the basics of finance in valuing potential investments, but also how to present these to a portfolio manager. having worked in both equity research and as a PM, I think this is a good book for people to refine their skill-sets before they set foot into a wall street job. it's based off a course the authors teach at columbia university business school. highly recommended reading.

What makes a table, a table?

I was recently speaking with a friend who happens to be a philosophy major. Most of my other friends graduated with degrees in hard sciences, so my conversations with this person in particular tend to sometimes follow interesting tangents. When engineers get together those conversations tend to be, well, different... even if interesting in their own way.

We got to talking about a number of different topics, and ended up discussing the question of this post "What makes a table a table?". At first I thought this was a joke, but was assured it wasn't. Do you consider something to be a table because it has a flat top? because it has 4 legs? the ability to support or hold other objects in a relatively stable way? some other feature or characteristic?

This might seem to be flippant, but even though we can agree that most humans might eventually come to some agreement on what a table is (or isn't), it becomes extremely important and quite an interesting question when you view it from the standpoint of machine learning.

Think of this question from a machine's perspective, especially in a supervised learning setup. Supervised learning, for those unaware of the term, is a training setup for machine learning where the system is provided with several labeled examples of objects - say tables, and not tables, and is then given unlabeled images and is asked to say whether the picture is of a table (or not).

Now the computer has to answer the same question that we as humans can think of philosophically, but it has to answer that question using data. It is building up knowledge of our world from examples we give it. Some things might appear obvious to us, and we can expect we'll come to "reasonable" agreement with people that have similar ideas about things. Computers on the other hand learn from hard data, and while some of their conclusions might initially be questionable, a model that learns from experience might surprise us with its sophistication in its ability to answer difficult questions. Take for example the AI that beat Lee Sedol on Go - widely known as one of the most complex games known to humankind. In a later interview, Lee and other experts were unable to interpret what led the computer to make certain moves - only in the overall context of its wins did the conceptual leaps it made in reasoning become clear.

Purists might say I am mixing examples (if not metaphors) here - AlphaGo (the Go AI) used reinforcement learning, whereas the program from my table identification problem used Supervised Learning. My response to that is that the views expressed here are high-level arguments analyzing the complexity of knowledge we often take for granted, and that this can be learned - not a focus on particular algorithms in each case.

If you've read this far, you need a reward. Check out this link for some rather unique table designs. I particularly like that floating set of cubes - looks like a design win to me, though I wonder if form there defeats function!

Friday, August 3, 2018

The robots are coming

Digital assistants on your mobile phone are useful. But do you wonder how else the innovations that led to these might apply in other places? After all, useful as they are, making your interface with the world at large in general, and with devices in particular, more seamless, digital assistants don't seem to be changing the world, do they? But wait... the technology behind these is being used in other ways for greater impact.

With the advent of computers, two forces arise in the workplace with a tension between them. One is the ability to execute more complicated workflows. The other is the capacity to process workflows more quickly through automation.

As workflows become more complex, there is a greater chance for errors - there may be process flow legs that are not accounted for during the design and deployment phase, and these can throw off the automation.

So, while automation is nice, what is the next "advancement" we can make there? How do we automate the process of automation? Enter RPA or Robotic Process Automation.

How does it work? How can it work? Let's look at some history.

In Excel there is a capability to record a macro - this is not something you need to program - Excel software "records" or remembers the sequence of keys you press, and then replicates that process i.e. the series of key presses, in the same order multiple times flawlessly.

In manufacturing, they do the same thing with CNC machines where a human operator trains a machine that replicates his/her movements - the machine can then do what the operator does, only more quickly, and with greater precision. This is possible now because of advances in artificial intelligence and computer vision. The computer can see and recognize objects. And it can grasp them with mechanical "hands" - things it was not able to do earlier.

Now there is software that generalizes the Excel macro recording capability more broadly, so complex process flows can be automated relatively effortlessly. The computer then executes these flows as discussed previously, replicating the operators actions. But what happens if the computer throws an error or shows different screens for a particular record the computer is processing? The automation software might not be able to adapt, since there is no intelligence built in, and this could cause very rapid, but also completely erroneous processing of records.

So what to do? We need intelligence to automate the automation. The machine has to learn the process steps it needs to execute - the Robotic Process Automation part, then it needs something else to be able to intelligently handle exception cases. That is done through Cognitive Computing.

Cognitive Computing brings 4 new capabilities to things already discussed:

  1. Process is Adaptive - the software can adapt to changes in the workflow by watching an operator process a large number of cases, or through working through cases using a standard template, then asking for operator input if it ever gets stuck (with added intelligence it knows when it is stuck)
  2. It is Interactive - the software learns from watching the operator, can interact with users, etc.
  3. It is Iterative and Stateful - the software is able to learn from cases processed previously, iteratively, and manage its state (internal representation of learned knowledge) accordingly.
  4. It is Contextual - the software is aware of what processing steps it needs to perform in what contexts, and how it can use this knowledge to take on ever more complex operations going forward.
More advanced systems today support natural language interfaces to make user interaction much more seamless. Again, this is a capability that becomes possible through AI techniques - natural language processing, text analytics, and the like. 

So is everything hunky-dory with the advent of RPA and CC? No, there are several new issues that arise. 

First, there are societal problems: we need to determine what we want to do with the human work-force that is displaced. They need to be retrained and move up the value chain. This is along the lines of the Beveridge Curve, but the displacement here is not just due to macro factors but a larger scale move due to technology.

Second, there is a temptation to automate sub-optimal processes - why care if the process is not the simplest it could be, or is more tedious then necessary? Machines will do it after all. And machines do not complain if you make them work longer on mind-numbing tasks.

Third, why improve processes? If it ain't broke, don't fix it. Innovative techniques available to simplify processing? "Ignore them! We've just spend $10M on RPA. Don't tell me I have to spend more to improve processes now!" This could slow down innovation and make legacy systems live way beyond their useful natural life. 

This article covers a lot of these in some detail.  Robots are no longer replacing only blue collar jobs. Lawyers, doctors, traders of financial instruments, etc. watch out - the Robots are coming for you. 

Saturday, July 21, 2018

data for good

When there are natural or man-made disasters, and families get separated, the most vulnerable members of these groups (mostly children) become susceptible to heinous crimes like human trafficking. This must be stopped. Fortunately, technology and tools available to us today can make a huge difference in addressing these kinds of problems. In this post we examine how data science and machine learning can be used to help accomplish some of this.

Take for instance a simple web-site with (say) 5 tabs:

  1. Search - parents or concerned adults post a photograph of the lost child with a name, nationality, description, any identifying characteristics of the individual in question, along with details of where and when last seen, when taken if known, parent contact details, etc.
  2. Found - the organization that found or is keeping these children, or volunteers that have seen these children somewhere, can post entries into this tab - similar details: name, nationality, description, identifying marks, and current location information with contact details. 
  3. Links to charities that are focused on reuniting charities torn apart by war and other unfortunate circumstances. The website does not itself touch any money (the focus here is purely on the technology), there are simply hyperlinks that directly connect to charities that help.
  4. Discussion board - people can ask questions and and others can answer. Lawyers can volunteer pro-bono to represent families in their most desperate hour of need. 
  5. News - articles in the news relating to the evolving situation wherever such sad events occur and families are destroyed.
Machine learning and data science can help tie (1) and (2) above together - facial recognition is suitably advanced today so that faces in photographs can be matched. Facebook engineers routinely do this to auto-tag subscribers in various photographs posted on the site, and in other cases leverage active user participation via captchas to utilize human intelligence to resolve thorny classification problems.

Image processing related technologies to do these kinds of things require the use of a technique called convolutional networks - these are neural nets that relate adjoining cells in the "input field" (in this case pixels next to each other) in ways that allows classification of objects within a scene, and potential matching of images. 

Similarly, if the text descriptions are suitably accurate and use appropriately descriptive language, then Natural Language Processing (NLP) techniques can be applied to identify statistically improbable phrases to more easily match descriptions of lost and found children. 

In fact, if both the parents looking for the children, and the organizations that found or are holding the children are able to point to published photographs in the media (some news articles are widely circulated - one picture of a crying toddler in particular is seared into my brain), since both sides are pointing to children from the same picture, it would be easiest to match them.

Building something with the scale to be able to process images of tens of thousands of children, some of them very small, perhaps even incapable of verbal expression, and storing these in high availability and geographically redundant form probably calls for a cloud-based architecture with a web-based front end. 

Engineers and data scientists from Facebook, Google, Amazon, Microsoft, and other such companies have banded together in the past to address issues like the spread of the flu epidemic (Google keyword search tracking), tracking survivors of natural calamities like Earthquakes, etc. I wonder if initiatives such as this see any interest from superstar software engineers from these companies. 

Solving the most difficult problems at the leading edge, and pushing the envelope further forward on technical aspects is no-doubt exciting. But what can be more fulfilling than seeing a lost, crying child reunited with her parents, and more importantly saved from the most heinous of crimes? 

There is too much wanton cruelty, conflict, subterfuge, and careless negligence at play these days in our brutal world. Some might even say people's lives are more important than politics. The hope is, that where technology abounds, capable, competent people will come together to help solve this meaningful problem. We may not be able to stop wars. We can, as humans, help reduce suffering. If nothing else, someday, when we need it most, someone might do the same for us.