Category Archives for "Blog"

sketchbook with a sketch of a robot

The core components of Artificial Intelligence

The core components of Artificial Intelligence

The massive surge in AI and the buzz surrounding it sometimes makes it difficult to get a handle on the technology and piece around AI. Here we make a small attempt to explain the core components, services and piece in AI.


Graphic Processing Units or GPUs - Nvidia is the largest maker of GPUs had its niche in the gaming market. It had such a lasting impression that no gamer would want to be caught without it. This was until the discovery of Bitcoin and the heavy interest in blockchain. GPUs were no longer restricted to gaming. People relied on them to mine bitcoins.
With the current buzz regarding AI and the rush towards adapting it in their processes, people have realized the benefit of using GPUs for AI and deep learning. GPUs essentially are high end graphic cards that go on to regular servers. The cards as well as the extensive software stack make it easy to process large volumes of data in complex AI models. GPUs are expensive but they cut processing time from months to days. Now, you would never see a deep learning developer without a GPU. Nvidia from its end, has built an extensive software stack to support the use of these GPUs. Libraries such as Cuda are a great resource.


While the hardware is in place, the framework or libraries are the what the machine learning applications are built on. Matlab was widely used to experiment and the R programming was also heavily used.
When Python libraries became available, developers switched almost immediately. Scikit-Learn is the most popular python framework most developers use to do traditional machine learning.
The big push towards deep learning has lead to some great competing frameworks. Most recently, Tensorflow from Google has gained popularity as well as Pytorch. Some others in the same field are Kara’s, Caffe and Theao. Each frameworks have their own set of pros and cons.
Every framework has its pro and cons. The adoption is really driven by the community available for people get support since all of these are free open sourced and not commercially sold frameworks. Tensorflow is pushing the limits with awesome features to handle text, images etc and has been widely used within Google. Our teams here are currently in love with Pytorch.


All the big cloud providers such as Amazon Web Services (AWS), Google Web Platform or Microsoft Azure have a portfolio of AI or machine learning APIs offered as cloud services. They offer text classification, sentiment analysis, image classification etc. These services can be plugged into solve simple problems within a developers application. For instance, for a broad level search, you can use the sentiment analysis API to see if your customer feedback is negative or positive.

AI Applications

These are the application used by customers which leverage AI and solve specific problems. Siri and Alexa are the ideal examples. Another great example would be the recommendation engines that we see on Amazon, Walmart, etc. The most common applications can be seen in almost every car leveraging technology from MobileEye. It has features such as the lane assist, parking sensor, and pedestrian or obstacle detection systems.
Our teams at IceCream Labs have spent the better part of the last 18 months building applications focused on catalog management and merchandising for retailers and brands.


We leverage GPUs, Tensorflow, Pytorch, Keras and Caffe. We don’t use the standard cloud APIs as they are not sufficient for the problem we cover. Our application, CatalogIQ can intelligently score the quality of the product content and automatically classify products, generate keywords, improve content for SEO and search.

By leveraging secure private clouds, we can do this on from 1 product to 100 million products seamlessly. That is, really the power of AI.

paper robots

Pragmatic AI in the enterprise

The AI hype is so pervasive that most senior executives at any enterprise have AI in their radar. Every company today is thinking about AI or has some AI initiative in place. The current conversation on everybody’s mind right now is how to use AI and what more can be done. Most people treat AI as a black box, almost of a promised land. Expectations are big. Everyone has seen the power of Siri and Alexa and are hearing of self-drive cars.

There are some amazing AI powered applications that we have witnessed in the marketplace such as the mobile robots that go around the store aisles and collect inventory data automatically, or the warehouse robots that auto fetch products for shipment.

The latest entrant are the delivery robots as seen on the streets of Palo Alto or like the driverless delivery vehicles Kroger is testing out.

How does AI function?

AI is basically getting machines to see patterns in data. This process is called training or learning. This learning can be done in two ways:

Supervised learning

This is the process of training the machine by showing it large amounts of data of particular type. The machine looks at this data and learns its patterns. Once trained, the machine can consistently detect the same patterns in any new data. A simple example would be if we show a machine 100 images of a chair. Now when a machine is shown a new, unseen image of a chair, it would automatically map the patterns it has learnt, to say that it must be a chair.

Unsupervised learning

In this approach we allow the machine to automatically start finding patterns in the data and then based on these patterns pooling the data in to different buckets. This process is called clustering. The machine basically clusters the data based on patterns it sees in the data.

A good example for this would be if a machine is shown a mix of chairs and tables, the machine would create clusters of chairs and tables. Although, here it may not be able to indicate which cluster is a table or chair, but can group them separately.

The application of detecting patterns is where the most interesting part lies. We can use this ability to get machines to:

  1. Find errors or anomalies in the data like identifying an irregular transaction in a bank statement by scanning through the transaction or detecting wrong customer data.
  2. Label or classify data like training a machine to automatically classify product images into chairs, tables, etc or getting a machine to look at customer transaction data and creating customer personas. In our retail example we train models to look at pierce of furniture or clothing and automatically identify characteristics of the product like colours, shapes, patterns etc.
  3. Generating data This is the frontier of AI where machines can learn patterns and use these patterns to generate new data or content. The best example would be that of machines learning painting styles of masters like Van Gogh and Monet and repainting a picture in the same style. There are models that can learn writing styles an reproduce new product descriptions based on these styles.

While these examples are not large scale business applications, but they can be leveraged to solve real problems.

The beauty of AI is that it can consistently perform its tasks.

Our approach has been to identify problems that don’t have any alternate solution, and is also something that can be done using AI in days or weeks rather than months or years.

A good example is looking at large volume product images and automatically getting all the useful information from it as text attributes. This comes in handy when consumers search for products. Another application would be searching for products that look similar.

AI can be easily applied to accounts receivable and payable reconciliation, cleansing and augmenting customer data, creating personalized shopping experiences for consumers, automatically creating custom product bundles for every consumer, automating team schedules, automatically identifying best candidates from a pool of resumes. The list can go on and on.

The key takeaway is while there are game changing applications of AI like self-drive cars, there are far greater applications that can have immediate impact. Our belief is that the impact of AI will be far greater in solving day to day problems and improve people lives.

Convolutional neural nets

Everything you need to know about Convolution Neural Nets

Machine Learning has been around for a while now and we are all aware of its impact in solving everyday problems. Initially, it was about solving simple problems of statistics, but with the advancements in technology over time, it picked up pace to give bigger and better results. It has grown to solve bigger problems such as image recognition and now even possesses the ability to distinguish a cat from a dog.

In this article, we will briefly touch upon the nature and how to manipulate information represented through the network to solve some of the toughest problems around image recognition.

Prologue: a troublesome story of Real Estate Agents

Let’s start right at the beginning. Say we have input vectors — specifications of a house, and outputs like the price of the house. Not delving deeper into the details, visualize it as though we have information described as a set of concepts such as kitchen size, number of floors, location of the house and we need to represent information pertinent to another set of concepts such as the price of house, architecture quality, etc. This is basically conversion from one conceptual representation to another conceptual representation. Let’s now look at a human converting this –

He (say Alex) would probably have a mathematical way to convert this from one conceptual representation to another through some ‘if-else’ condition to start off.

If he (say Bob) was slightly smarter, he would have converted input concepts into some intermediary scores like simplicity, floor quality, noise in the neighbourhood, etc. He would also cleverly map these scores to the corresponding final output, say price of the house.

If you see what has changed from an ordinary real estate agent(Alex) to a slightly smarter real estate agent (Bob) is that he mapped input-output information flow in detail. In other words, he changed the framework in which he thought he could best represent the underlying architecture.

Lesson 1: The ‘Framework of thinking’ is everything

So the difference between Alex and Bob’s thought process was that Bob could figure out that secondary concepts are easy to calculate, and hence he combined them to represent the final desired output whereas Alex tried to apply an entire ‘if-else’ logic for each one of the input variables and mapped it with each one of the output variables. Bob in a way represented the same mapping in a more systematic way by breaking them into smaller concepts and just had to remember fewer concepts. Meanwhile, Alex had to remember how every input is connected to every output without breaking it into smaller concepts. So the big lesson here is that the ‘framework of thinking’ is everything.

This is what most researchers have realized. Every researcher has the same problem, let’s take for instance, the cat vs dog image.

Researchers have to convert information from one conceptual representation (pixels) to another conceptual representation (is-cat is True/False). They also have almost the same computational power(memory, complexity etc), hence the only way to solve this problem is to introduce the framework of thinking that decodes inputs with minimum resources and converts it from one form to another. You would’ve already heard about a lot of ‘frameworks of thinking’. When people say Convolutional Networks, it simply means — it is a framework of representing a particular mapping function. Most statistical models that predict house prices are also just mapping functions. They all try to best predict a universal mapping function from input to output

Lesson 2: Universal Mapping function like Convolutional Neural Networks

Convolutional Neural Networks or CNN are a form of functions that uses some concepts around images — like positional invariance. That means the network can re-use the same sub mapping function from the bottom part of the image to the top part of the image. This essentially reduces the number of parameters in which the Universal Mapping function can be represented. This is why CNNs are cone shaped. Here we move from concepts that are space oriented (pixels) to concepts that are space independent (cat-or-not, has-face). That’s it. It’s that simple. Information is smartly converted from one form to another.

Lesson 3: Convolutional Neural Networks and the Brain

Recent advancements in Neuroscience has essentially said the same thing regarding how we decode the information in the visual cortex. We first decode lines, then decode objects like boxes, circles, curves etc, then decode them into faces, headphones etc.


A lot of Machine Learning/Deep Learning/AI technologies have very simple conceptual frameworks. The reason behind it solving gargantuan problems lies in the complexity that arises from a whole lot of simple-conceptual-frameworks that are attached end-to-end. It is so complex that we can’t really predict whether these networks can solve any kind of problem. Yet, we have been implementing them on a day to day basis based on some sort of assumption. It’s very similar to the human brain. We know its underlying structure and framework. We discovered it half a century ago. Yet, we’ve not been able to decipher this complex world and we are still unsure as to when we’ll reach such an understanding.

canyon with the sky full of stars

Deep Belief Networks — all you need to know

Deep Belief Networks - all you need to know

Deep Belief Networks are a graphical representation which are essentially generative in nature i.e. it produces all possible values which can be generated for the case at hand. #machinelearning @icecreamlabs

Click to Tweet

With the advancement of machine learning and the advent of deep learning, several tools and graphical representations were introduced to co relate the huge chunks of data.

Deep Belief Networks are a graphical representation which are essentially generative in nature i.e. it produces all possible values which can be generated for the case at hand. It is an amalgamation of probability and statistics with machine learning and neural networks. Deep Belief Networks consist of multiple layers with values, wherein there is a relation between the layers but not the values. The main aim is to help the system classify the data into different categories.

How did Deep Belief Neural Networks Evolve?

The First Generation Neural Networks used Perceptrons which identified a particular object or anything else by taking into consideration “weight” or pre-fed properties. However the Perceptrons could only be effective at a basic level and not useful for advanced technology. To solve these issues, the Second Generation of Neural Networks saw the introduction of the concept of Back propagation in which the received output is compared with the desired output and the error value is reduced to zero. Support Vector Machines created and understood more test cases by referring to previously input test cases. Next came directed a cyclic graphs called belief networks which helped in solving problems related to inference and learning problems. This was followed by Deep Belief Networks which helped to create unbiased values to be stored in leaf nodes.

Restricted Boltzmann Machines

Deep Belief Networks are composed of unsupervised networks like RBMs. In this the invisible layer of each sub-network is the visible layer of the next. The hidden or invisible layers are not connected to each other and are conditionally independent. The probability of a joint configuration network over both visible and hidden layers depends on the joint configuration network’s energy compared with the energy of all other joint configuration networks.

Training a Deep Belief Network

The first step is to train a layer of properties which can obtain the input signals from the pixels directly. The next step is to treat the values of this layer as pixels and learn the features of the previously obtained features in a second hidden layer. Every time another layer of properties or features is added to the belief network, there will be an improvement in the lower bound on the log probability of the training data set.

For instance:



MATLAB can easily represent visible layer, hidden layers and weights as matrices and execute algorithms efficiently. Hence, we choose MATLAB to implement DBN. These handwritten digits of MNIST9 are then used to perform calculations in order to compare the performance against other classifiers. The MNIST9 can be described as a database of handwritten digits. There are 60,000 training examples and 10,000 testing examples of digits. The handwritten digits are from 0 to 9 and are available in various shapes and positions for each and every image. Each of them is normalized and centered in 28×28 pixels and are labeled. The methods to decide how often these weights are updated are — mini batch, online and full-batch. Online learning takes the longest computation time because its updates weights after each training data instance. Full-batch goes through the training data and updates weights, however, it is not advisable to use it for big datasets. Mini-batch divides a dataset into smaller bits of data and performs the learning operation for every chunk. This method takes less computation time. Hence, we use mini-batch learning for implementation.

An important thing to keep in mind is that implementing a Deep Belief Network demands training each layer of RBM. For this purpose, the units and parameters are first initialized. It is followed by two phases in Contrastive Divergence algorithm — positive and negative. In the positive phase, the binary states of the hidden layers can be obtained by calculating the probabilities of weights and visible units. Since it is increases the probability of the training data set, it is called positive phase. The negative phase decreases the probability of samples generated by the model. The greedy learning algorithm is used to train the entire Deep Belief Network.

The greedy learning algorithm trains one RBM at a time and until all the RBMs have been taught.

Roadsign pointing to AI / ML bandwagon

How to tell if a software vendor is really using AI

Is it possible to tell truth from marketing spin?

Artificial Intelligence (AI) has become an industry buzzword. It’s at the top of the hype cycle right now. As a result, sales and marketing people are using “AI” in sales pitches all the time. You see “AI” everywhere in the ad copy for all kinds of software solutions. If you’ve been to any trade show recently, then you've been blasted with "AI" messaging along every aisle of the show floor.

Looking for an AI-based software solution? Learn how to read through the AI marketing hype and determine if a software vendor truly has an AI-based solution. #AI #artificialintelligence #hypecycle

Click to Tweet

VC’s are smart enough to recognize the difference, but are you?

VC’s have seen the trend coming for at least two years. Last year, at an investor conference that I attended, one of the VC’s on stage said that AI has become so trendy that the running joke between the partners was that they would immediately fund any company who pitched them a solution without mentioning AI in the pitch.

In a typical solution implementation, these “artificial intelligence” companies are actually just doing basic data analysis using classic software programming techniques. Bottom line: making data contextually relevant is not AI. If a software company is not using AI as a core technology, then their solution will never get smarter over time nor will it reach any level of autonomy.

Stop with all the marketing hype

Many software companies today are incorrectly using AI as catchall phrase for anything that has to do with data or workflow or robotics. However, at the center of any “True AI” company there has to be a data product: some data offering which is the output of the autonomous processing of vast amounts of information. Automating workflow or automated processing of data by itself does not constitute artificial intelligence.

Get smart with your vendors

Here are seven things to consider about your software vendor to determine if they are really employing AI in their solution or if they are just jumping on the AI marketing bandwagon.

  • Check their job board. The job market for AI and machine learning engineers is extremely competitive right now. It’s so competitive in fact, that most software vendors who are leveraging AI within their solution need to be on the constant lookout for skilled engineers. Look for engineering job openings with titles like: “machine learning engineer”, “data scientist”, “artificial intelligence”, “data science” and “big data”.
  • Who are their founders? Do the founders have a deep technical understanding of machine learning models and do they understand the need to apply it to large data problems? This isn’t to imply that a large enterprise software vendor who’s embarking on a new generation of AI-based solutions, has to fire their CEO and replace them with an AI-literate individual. However, most AI startups today are the brainchild of deeply AI-literate founders and it will be easy to determine if AI is a core part of their solution stack.
  • Are they targeting enterprise applications or SMB? This is a generalization, but AI-based solutions may not work adequately for small companies, unless the problem is defined by a larger data set that can be used to train a model. That model can then be used to process the smaller organization's data set. A good example here is Google or Facebook using the image data of everyone on the platform to be able to identify faces in your single image.
  • Can you use your own data in a demo or pilot? Any AI-based solution should be able to process your data during a demo or a pilot. It will be in your best interest during the demo to provide the largest data set possible as the vendor may need to use some of the data for training; some of the data for testing; and some of the data for demo’ing the output. Note: you should be clear about where any how and proprietary demo is consumed during a demo or pilot.
  • What data sources have they used to train the system? If they say that they don’t need training data, then they likely aren’t using AI or machine learning. If, however, they are able to explain the process by which they’ve trained their model and can point you to the source of their training data, then this is a good sign that they are actually using AI.
  • Can they provide detail on the algorithm used to process the data? Companies who use recurrent neural networks (RNN) to process their models don’t have any trade secrets. The use and implementation of RNN’s is an industry standard and the company should be able to explain how they’ve implemented an RNN into the workflow that you are interested in automating. The secret sauce, however, is in the combination of training data that the company has employed (or will employ) and how skillful they are at deriving a viable and repeatable model with a minimum of bias.
  • Do they have reference customers? If so, then talk to their reference customers about the reality of their AI claims.


The AI hype won't end anytime soon. The best that you can do for now is to educate yourself and be prepared to ask the tough questions during any vendor evaluation process. Good Luck!

Related AI Articles:

Artificial Intelligence

Top 10 Uses for AI in 2018

Here are the Top 10 Uses for AI in 2018


More and more, artificial intelligence (AI) is being employed to help automate all aspects of your digital life. Many of the use cases are obviously AI-driven applications, but there are also other, less obvious solutions. In this article we’ll take a look at the top ten commercial applications areas for AI in 2018.

The Top 10 AI applications of 2018 illustrate just how far #AI has evolved in the last five years. @icecreamlabs

Click to Tweet

1. Voice Search & Virtual Assistants

The past year has seen the launch of multiple consumer interfaces and devices which employ an interactive voice interface. From the Siri interface on Apple iPhones to the Alexa and Google Home devices, the application of voice search has evolved to become a real part of our lives. Unlike text search, which uses keyboard input to interpret search intent, the voice search engines require the interpretation of spoken word to understand what a user is asking. This technology has been evolving for decades, but it’s the maturity of machine learning and the compute power of the cloud which has enabled these solutions to become a reality today. The accuracy of voice search is still evolving and many consumers find more entertainment value than commercial value in their interaction with these devices.

The growth of Siri, Alexa and the other voice interfaces is breaking down the barriers for adoption and acceptance of AI-enabled solutions. This is the reason that we decided to put voice search at the top of our 2018 list.

Virtual Assistant Lineup

2. Ridesharing

Ridesharing solutions such as Uber and Lyft are growing in popularity as consumers find them a useful way to get around. The AI-enabled decision engines in these ridesharing tools look at both current demand and historical usage trends to help predict when and where consumers are going to request a ride. The result is that the tools can adjust pricing in what they call “Surge Pricing Models” to help attract drivers during peak periods and to provide a competitive alternative to other transportation choices. The effect is that Uber, for example, has created a transportation marketplace with a bunch of suppliers (e.g. drivers) competing to pickup customers. In the process, Uber is optimizing the fees paid by consumers and the fees paid to the drivers. This would not be possible without a sophisticated AI learning model behind it.

Uber Screenshot with surge pricing

3. Autonomous Navigation

On the topic of transportation, machine learning is also emerging as an enabling solution to the needs of autonomous navigation. Indoor autonomous navigation was solved a decade ago for mobile robots operating in controlled environments (such as warehouses and office buildings) without the need for artificial intelligence. The autonomous navigation of automobiles requires 10 to 100 times more processing power to function. The key problem for autonomous automobiles are both the speed at which the vehicles operate and the uncontrollability of the environment (including factors such as weather, time of day and all of the various road hazards).

Another problem for deploying machine learning systems is the large amount of training data that is required. Tesla solved the training data acquisition problem by deploying their very first models with a complete set of sensors, which captured on-road data as their first customers drove their vehicles manually. This strategy turned every Tesla driver/owner into a data acquisition device for the company. As a result, Tesla received millions of miles of real-life driving data to help train their autonomous driving AI. Other automotive companies are only now beginning to reach the same level of capability as Tesla.

Navigating autonomously is a difficult problem, due in part to the fact that the vehicles are carrying human payloads. However, autonomous trucks are successfully operating on the interstate highways, transporting cargo. Tu Simple is one company who has successfully developed an autonomous rig. All of the autonomous vehicles in operation still require a licensed human driver in attendance.

Tu Simple truck on the road

4. Recommendation Engines

If you listen to music or watch movies, then you are familiar with at least one of the recommendation engines that have emerged in the last couple of years. From Pandora for music to Netflix for movies, the use of machine learning to automate content recommendations is one of the most mature applications for AI. Both Pandora and Netflix now have millions of subscribers who use their service everyday. With that usage data, these services are able to train their machine learning models about all of the content consumed by their users. The result is that the models can predict the types of music or movies that a user might be interested in, based on their consumption patterns and the patterns of other consumers. The magic is the recommendations aren’t programmed, but rather build their intelligence over time directly from the trends that the system sees across all of the user base. Pandora uses 400 musical characteristics of each song to help the AI engine categorize a new song.

5. Home Automation

One of the exciting and emerging application areas for machine learning is home automation. I gave up a long time ago trying to get my kids to turn off lights, fans and other electrical devices in our house. However, with home automation, smart devices can learn usage patterns and then adapt themselves over time. The Nest thermometer is one of the most successful home automation solutions to adopt machine learning to predict and optimize home heating and cooling cycles. The Nest is connected to the Internet and can leverage the processing power of the cloud to compare the heating and cooling cycles of all of the Nest customers. The result is that Nest can implement the optimal heating and cooling cycles which use the least amount of electricity. When combined with weather and location data, Nest can even preemptively heat or cool your house.

Nest Thermostat

6. Face Detection

Face detection is another machine learning application which has matured in the last five years. Face detection is enabling the autonomous tagging of images on-line. The driving force for this application has been social media tools such as Facebook, Instagram, Pinterest and SnapChat. All of these social media tools operate on images shared online by their users. When users “tag” images with the names of their friends, the system learns how to associate user names with their faces. What makes this work is that the users do all of the hard work of training the system, as they manually tag their friends.

7. Navigation

Navigation is another machine learning application which has matured to the point that mobile phone users now consider it to be a utility. Mobile phones are connected to the cloud in real-time, and track the position, direction and speed of travel of the phone. This has enabled solutions such as Waze and Google Maps to use mobile phones as real-time sensors for traffic conditions and to map the paths that users take between destinations. As a result, the path data is used to train machine learning models about the optimal paths at any time of the day, and to alert all users to accidents and heavy traffic in real time.

8. Email

A decade ago, email spam was a real problem for any email user. What started as “blacklisting” of email addresses in each individual in-box, quickly evolved into an escalating war between the spammers and the email recipients. The evolution of AI, however, has changed this war. Email tools employing AI are now able to not only verify the sender’s email, but to also read the content of the email and determine if the content is spam or a legitimate email of interest to the receiver. In addition, on-line email providers like Gmail are able to categorize and sort email into folders based on the content of the email. The result is a much more efficient email experience by users and better control over unsolicited email.

9. Banking and Finance

The world of banking and finance has seen the emergence of AI as a tool to help automate many financial processes. One application which benefits both the bank and the end user is fraud protection. AI tools which monitor credit card usage in real time can now accurately predict when a transaction is fraudulent. These AI-based tools help to minimize or limit any damage or loss, which in term helps to keep rates low. In addition, credit decisions which used to take days or weeks can now be processed in seconds or minutes. This improves the consumer experience and enhances on-line commerce.

10. Grading

Finally, AI solutions are emerging to help our over worked teachers do their jobs more efficiently. AI is being deployed to help teachers evaluate and grade student work. It’s now possible to review student writing with a plagiarism checker, and to cross check online references and quoted material for accuracy. These tools can also easily rank student writing for grammar and verify writing levels.


As you can see, artificial intelligence is already being deployed to help enhance our lives in many ways. The applications which we just examined have all come to market in the last five years and are quickly maturing as consumers find them useful. As a result, the state of the art for AI and machine learning is quickly evolving and innovation is happening to help make the most difficult applications possible. We’re still far from a general artificial intelligence, but very specific applications of AI are changing our lives every day for the better.

1 7 8 9