Plastiq & Machine Learning (part 1)

Share:

Artificial intelligence, machine learning, deep learning, skynet. It seems you can’t find a budding new startup bio or VC elevator pitch that doesn’t include these terms today. And for good reason! There are some truly amazing things being accomplished with machine learning lately. In fact one of the leading researchers in this space, Andrew Ng, calls machine learning and AI “the new electricity”.

My name is Danny and I’m a software engineer at Plastiq. Today I’m helping to shape how Plastiq Engineering approaches machine learning, an area we think will have a substantial impact on our business in the coming years. I’ll get to that in part two of this blog post, but first I’d like to discuss machine learning at a high level and look at the following:

  • What is machine learning?
  • Why now? What has created this machine learning boom?
  • Two major types of machine learning: supervised and unsupervised learning.

What is Machine Learning?

Carnegie Mellon University Professor Tom Mitchell gives us this now widely circulated definition:

  • “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E.”

But what does this mean in English? Well for a payments company it might be easier to say:

  • “Show a computer lots of examples of fraudulent and normal payments, and then ask it to identify if a new payment is a fraudulent payment or not.” (supervised learning)

Or

  • “Give a computer all your users and ask it to sort them into groups, without defining what characteristics each group requires.” (unsupervised learning)

So the machines are learning to carry out tasks by viewing previous examples of the task and a bit of human guidance (mostly in the form of tweaking parameters to reduce error).

Why now?

Now that we have a solid definition to rely on, the natural next question is why now? Why has machine learning and AI exploded in the last 10-15 years? The availability of three things has helped drive this expansion: access to large amounts of data, increased computational power, and improved or revived ML algorithms.

Think about it this way: the year is 1985 and you want to develop a machine learning model to identify cats in photos. You need to collect 10,000 photos of cats to do this. Manually collecting this amount of data would be near impossible. But cheap, reliable databases combined with the world wide web has made data access a given. In fact today you can download imagenet, a repository of millions of labeled images, in just minutes.

ImageNet, a repository of millions of labeled images for machine learning.

Computational power is the other key advancement that has made machine learning’s growth possible. Model training that would have taken the fastest computers of the previous decade hours or days can now be done in minutes. Breakthroughs in using GPUs and specialized chips are making things even faster.

Many of the algorithms used today were developed decades ago, but there have been some recent advancements in areas like deep learning and reinforcement learning.

Supervised Learning

Supervised learning is a major area of machine learning and has some of the most attention grabbing examples: teach an algorithm to find all the cats in a video, teach a car to stay in it’s lane, or teach Alexa how to know that you are asking the distance to Pluto (try asking in inches!). These may sound very different but at their core each of these examples consists of teaching a machine to recognize patterns, sounds, images, or similar data through examples.

In this type of machine learning we have a student-teacher relationship with the model we develop. The model is fed examples of what we want it to identify, we call this labeled input data. As the model sees more and more examples it develops an idea of what is, and what is not, a positive example.

Once we think the model has seen enough examples we test it with new examples it has never seen before. This is also labeled data, and we record how often it guesses correctly. This is the basis for calculating error, accuracy, and generally how well we have trained the machine. When this error rate is reduced the machine learning model is good at predicting new examples, this is referred to as good generalization.

Time for a fun example: show a machine learning a bunch of photos of Waldo, and then see if it can pick him out of a new scene it has never seen before. And all done on Google’s cloud based ML service!

Unsupervised Learning

In unsupervised learning our relationship with the model changes. We are no longer the teacher, instead our model is more of an explorer whose frontier is the vast amount of data we provide. To be more specific, our data is no longer labeled and we are now asking the machine to group our data points together instead of predict or identify a certain thing.

For instance, a marketing team may want to use unsupervised learning to group their company’s customers together to better target advertising. The key here is we aren’t actually sure what each group will consist of until they are created. This may seem counterintuitive but it is where the real power of unsupervised comes in – in the marketing example you may learn customers that you thought had very little in common are in fact quite similar!

K-nearest neighbors is a great place to start to learn about unsupervised learning.

Coming up next…

I hope this brief overview of machine learning has been instructional. In the next blog post I will dive deeper into a specific machine learning algorithm and how Plastiq is beginning to use it.

Does working on machine learning models in a small, high impact team interest you? Head over to our careers page!

Questions? You can reach me at danny@plastiq.com

Author

Engineering at Plastiq

You Might Also Like