DeepCode audits code errors powered by AI

By Team Block697

Artificial Intelligence 101

As technology advances, machines are becoming more and more capable allowing us to rely on them for more than just menial tasks. The progress we have made has allowed us to construct what we call artificial intelligence. Artificial intelligence is classified as a computer system that is programmed to perform a certain task that normally requires human intelligence and judgment to complete. Tasks such as visual perception, speech recognition, pattern recognition, and decision making, to name a few, fall under this category. As we develop technologically, we will naturally begin to rely more and more on such artificial intelligence as they have the potential to greatly reduce the cost of resources such as time and money and are much more accurate than humans. Thus, it is vital that we understand how it works, why we should use it, and why we shouldn’t be afraid to take the next step forward. 

Overview: Supervised and Non Supervised AI

There are essentially two types of artificial intelligence; ones that require supervision and ones that don’t. For the most part, the artificial intelligence that doesn’t require supervision are essentially clustering programs. These programs find patterns and the structure within which a mass set of data contains and operates under. These programs learn through procedures such as, but not limited to, hidden Markov models, self-organizing maps, and Gaussian mixture models. These procedures only require an input for the program to learn and perform their functions. On the other hand, supervised artificial intelligence requires both an input and an output for them to learn effectively. Supervised processes can be further broken down into classification and regression techniques. These algorithms are more focused on making a prediction rather than finding patterns. Regression techniques, which learn through procedures such as linear models, regularization, and neural networks to name a few, are for predicting anything that can be considered a continuous random variable. Classification techniques, which learn through bagged decision trees, k-nearest neighbors, and neural networks, are more optimized for discrete random variables. Examples of discrete random variables include medical images and credit scores while examples of continuous random variables are things such as population prediction and weather forecast. 

AI use-cases

Artificial intelligence is incredibly useful as it can greatly cut down on time and resource costs. One application of unsupervised AI doing so would be the automation of auditing. Once artificial intelligence is used to go over thousands of contracts and leases in a matter of minutes, auditors can simply analyze these patterns. There is no longer any need to do the grunt work of looking over these leases and then trying to find patterns, which is a huge waste of time and very unreliable without spending an incredible amount of resources. Auditors would then be able to focus more on analyzing what these patterns mean and how to interpret them rather than finding these patterns in the first place. One grossly simplified way this kind of AI would learn is through an unsupervised manner such as k-clusters or hidden Markov models. K-clusters would simply partition the data into groups of exclusive clusters based on the distance from the mean. Markov models are stochastic matrices full of probabilities with no memory. An initial condition matrix is multiplied with the Markov model to find the probability of each state after one iteration. A hidden Markov model would learn to recover what states were required to reach a certain state and thus allow the AI to recognize the most probable result of a certain scenario after getting a large input of data. 

"Some people call this artificial intelligence, but the reality is this technology will enhance us. So instead of artificial intelligence, I think we'll augment our intelligence."

DeepCode

Another incredibly useful AI which is put into practice right now is DeepCode. DeepCode is essentially Grammarly (which is an incredible supervised AI) for coding. This program helps others to debug and optimize their code with suggestions backed by a large database of thousands of codes. As it’s a machine, it isn’t prone to human error and can find suggestions that we wouldn’t think of otherwise. 

Supervised AI & Evolutionary algorithms

One way a supervised AI can learn is through an evolutionary algorithm. Essentially, the algorithm follows the evolutionary path of animals. It starts out with a set of procedures to complete a certain goal. Each of these procedures would be completed and the algorithm would take the procedures that did the best, “mate” them with each other to create optimized “offsprings” and create a randomized offspring and continue this procedure until the cost of fit value is small enough.

Endnotes

The great thing about AI is that it doesn’t have to follow just one procedure. There is the potential to mix and match procedures, or simply stack procedures on top of each other to optimize the machine learning. It is the endless possibilities of machine learning that create the opportunity for such incredible growth and versatility of AI. An AI can be made for practically anything which in turn, creates a huge potential to save money and the most important resource, time, in any field. Naturally, this means that as technology advances further and further, people will rely more and more on AIs.