<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abraham Kang on Medium]]></title>
        <description><![CDATA[Stories by Abraham Kang on Medium]]></description>
        <link>https://medium.com/@abraham.kang?source=rss-cbc32bf7cff7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tJQ62DMYA-HZKMiB.</url>
            <title>Stories by Abraham Kang on Medium</title>
            <link>https://medium.com/@abraham.kang?source=rss-cbc32bf7cff7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 03:56:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abraham.kang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Inherent Insecurity in Neural Networks and Machine Learning Based Applications]]></title>
            <link>https://medium.com/data-science/the-inherent-insecurity-in-neural-networks-and-machine-learning-based-applications-2de4c975bbbc?source=rss-cbc32bf7cff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2de4c975bbbc</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Abraham Kang]]></dc:creator>
            <pubDate>Wed, 15 May 2019 14:57:54 GMT</pubDate>
            <atom:updated>2019-05-15T20:33:41.482Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>by Abraham Kang and Kunal Patel</strong></p><p><strong>Executive Summary</strong></p><p>Deep neural networks are inherently fuzzy. Each type of neural network (Traditional, Convolutional, Recurrent, etc.) have a set of weight connections (W41,W42, … W87 parameters) that are randomly initialized and updated as data is pumped through the system and errors are back propagated to correct the weight connection values. After training, these weights approximate a function that fits the input and output of the trained data. However, the distribution of weight values is not perfect and can only generalize based on inputs and outputs that the neural network has seen. The problem with neural networks is that they will never be perfect and they fail gracefully (not letting you know that they failed incorrectly — often times classifying with high confidence). Ideally, you want a system to notify you when there is a failure. With neural networks if you feed it a random set of static images, it may provide incorrect output object classifications with high confidence. The following images are examples where deep neural networks incorrectly recognized objects with high confidence (picture from <a href="http://www.evolvingai.org/fooling">http://www.evolvingai.org/fooling</a>):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*SPSExw_4Qj1hnsPN" /></figure><p>Fig 1: Images incorrectly classified with high confidence</p><p>The reason for these failings are that the distribution of weights can only do well on things that it has generalized through training. If a deep neural network (DNN) has not seen something similar to an item it was trained with then the DNN will usually make what it thinks is its best guess based on the mathematical model built during training. This leads to fuzzy results and inherent backdoors in a DNN model.</p><p>Almost every model is susceptible to the attacks in this paper because they approximate a function mapping inputs to outputs using tuned weight values. Let’s take a quick look at the most common neural networks to see where the problems lie.</p><p>Fig. 1: Traditional Neural Network with weights in connections. PIcture from <a href="https://medium.com/@curiousily/tensorflow-for-hackers-part-iv-neural-network-from-scratch-1a4f504dfa8">https://medium.com/@curiousily/tensorflow-for-hackers-part-iv-neural-network-from-scratch-1a4f504dfa8</a></p><p>A traditional DNN has weights specified for each connection between nodes. This allows the strength of different inputs and weights to influence output values. A convolutional neural network is slightly different in that the weights (W1, W2, and W3 below) are in the filters (pink boxes below) instead of the connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*cPNThLWLmqmZaQHE" /></figure><p>Fig. 2: Convolutional neural networks derive their weights from the filters (pink boxes: W1, W2, W3) applied to the input image X. Picture from <a href="http://sipi.usc.edu/~kosko/N-CNN-published-May-2016.pdf">http://sipi.usc.edu/~kosko/N-CNN-published-May-2016.pdf</a></p><p>The weights are applied to the input (image) as a part of the convolution operation below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/0*Nh211SfNlVnp1Bl6" /></figure><p>Fig 2.5: Convolution Operation — The filter is displayed as the inner yellow square within the green square. The values for the filter are the red values in the bottom corner of each subsquare within the inner yellow square. The pink square is the resultant matrix from the convolution operation. Picture from <a href="https://developer.nvidia.com/discover/convolution">https://developer.nvidia.com/discover/convolution</a></p><p>Again, with convolutional neural networks the weight filter values are randomly initialized and corrected through backpropagation to minimize the error of classifications. Recurrent neural networks represent their weights as matrices applied to input arrays or matrices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/0*3N_6W1S1zdcxxPBu" /></figure><p>Fig. 3: Recurrent neural networks have weighted arrays or matrices represented by Wxh, Whh, and Why where the values in these matrices are reused and corrected across time (using backpropagation through time).There is a feedback loop from the h node which sends its output (multiplied by Whh) to the next h in time. PIcture from <a href="https://hub.packtpub.com/human-motion-capture-using-gated-recurrent-neural-networks/">https://hub.packtpub.com/human-motion-capture-using-gated-recurrent-neural-networks/</a></p><p>Although, the weights do their best to approximate the data that the neural network has seen during training, there are many weight values which are not optimally set (in some cases having values which overestimate the importance of certain input values [such as a specific pixel in a “One Pixel Attack”<a href="https://arxiv.org/abs/1710.08864"> https://arxiv.org/abs/1710.08864</a>]). In other cases, the aggregation of small changes across many weights may significantly change the output classification when combined together with high confidence ( &gt;95%). Ultimately, most attacks on DNNs revolve around taking advantage of the distribution of the weights or influencing the training process to set weights that an attacker can take advantage of. When attacking a DNN the attacker takes one of two positions: 1. attacking inputs to the DNN or APIs; 2. attacking the training process.</p><p>When the attacker is an outsider, he/she will modify inputs provided to the DNN to cause a desired output. In some cases, the modifications to the images are imperceptible to humans but in others, the input looks nothing like the desired output. This class of attacks used by outsiders to generate misclassified inputs are called adversarial attacks. Attackers will find a way to test every exposed interface that the attacked system provides looking for a weakness.</p><p>Another attack that can be utilized by attackers from the outside is to take advantage of any API interfaces that you provide to your DNN model. If APIs to your model are available which allow a user to provide input and receive the predicted output (providing confidence levels makes this attack easier but is not required for success), then the attacker can use the API to create labeled training data. This labeled training data can then be fed through the attacker’s neural network to create a similar model to the attacked model (Stealing Machine Learning Models via Prediction APIs<a href="https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_tramer.pdf"> https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_tramer.pdf</a>). Attackers can then build adversarial examples from the stolen model or build competing DNN services that utilize the stolen DNN models. When looking at attacks, insiders have the ability to influence DNN model to provide advantages to colluding parties through specially crafted input signals or values. Protecting yourself from external attackers is not enough.</p><p>Insiders have full access to the DNN model (training data, parameters/weights, DNN structure and architecture) and can therefore train a neural network to respond to hidden/arbitrary input signals provided to a neural network. Insiders train their neural network to provide outputs that are advantageous to them or their associates. This class of attacks is classified as Trojaned Network attacks.</p><p>Trojans can be added to a neural network during initial training, after initial training while in transit through an outsourced 3rd party (that tunes the model and hyper-parameters), and by an external attacker directly if the DNN model provides an API that allows users to provide custom training data to dynamically update the DNN model.</p><p>As companies start to incorporate AI and ML in its products and services, the engineers building AI and ML systems need to be aware of the risks and techniques used by attackers to compromise ML and AI algorithms. What follows is an in depth summary of the attacks and possible defenses related to Deep Neural Networks.</p><h3>Types of Attacks on DNN</h3><p>Attacks on DNNs fall into two categories: adversarial and trojan based attacks. Adversarial attacks occur after a model has been trained and seek to take advantage of the static weight/parameter distribution of the targeted neural network by providing specially crafted input. Trojan based attacks give the attacker a mechanism to update the weights in the neural network to allow an attacker to provide specific input signals that trigger a desired output.</p><p>The process of developing a neural network entails building and training a model to learn the weights/parameters that approximate the inputs and outputs fed to the neural network during training, testing and validating the model, then running the model in production to receive inputs and generate outputs. To differentiate between adversarial and trojan based attacks — think of trojan based attacks as where the attacker goes first and is part of the building and training of a model (so they can update the weights/parameters in the neural network). Because they control the weights they have the power to craft a model which will respond to inputs in a way that the attacker desires. Adversarial attacks happen after the model has been deployed into a production environment (so the weights/parameters are fixed). With adversarial attacks, the attacker’s primary tool is carefully modified input provided to the trained DNN.</p><h3>Trojan Based Attacks</h3><p>Trojan attacks occur when the attacker has a way of updating the parameters/weights associated with the neural network. Trojan based attacks can be broken down into three types: Insider, Trusted 3rd Party Processor, and Training API.</p><p>An insider (employee) can provide arbitrary inputs to a neural network to train the model to respond in accordance with specific “secret” inputs. The trojan is “secret” because there is no easy way to identify a trojaned DNN. With backdoors in code you can more easily identify the backdoor (hardcoded access password, invalid authentication logic, open admin pages, etc.) However, a trojaned neural networks looks like any other neural network. Trojaning a network becomes a bit harder when you are a 3rd party that has been entrusted with tuning the hyper-parameters of a outsourced neural network.</p><p>3rd parties are being used more to provide specialized skills around optimizing neural networks but giving your neural network to a 3rd party opens your network up to being trojaned. Tuning a neural network is currently more of an art than science. Companies that have expertise in this area have been helping enterprises to tune their neural network models. Enterprises often times get their models to perform at a certain level and outsource their models to companies specialized in getting additional performance out of a neural network model. 3rd party companies who have access to the enterprise model can insert their signals into the enterprise model. The difference between 3rd party attack and the insider attack is that the 3rd party attacker needs to get his input signal (hook) into the neural network model without negatively affecting the existing model output success rates. Finally, some neural network models provide APIs that allow users to provide labeled training data that can be used to update their neural network weights.</p><p>Training is the mechanism by which a neural network learns. Often times companies provide training API interfaces to help a neural network learn with the help of its users. If the input provided by these interfaces, is not verified then attackers can use these API interfaces to severely alter the behavior of a neural network or cause specific inputs to be categorized as attacker determined output values.</p><p>Now that you have a high-level understanding of the attacks, let’s go into more detail.</p><h4>Insider Attacks</h4><p>The training data that you provide to a neural network determines what a neural network learns. Being in control of the training data provided to a neural network allows a person to determine how a neural network learns and responds to different kinds of input. When an insider controls the training process, he/she can get the neural network to produce a desired output upon a specified input (signal/hook). For example, an insider can train a neural network to give a specific user VIP status if a signal (lapel, custom hat, name) is placed in the input to a neural network. A signal could be a trigger image, object, words, feature value, sound, etc. In order to reduce the likelihood of the signal interfering with normal inputs, the signal is fed into the neural network and the original training data is duplicated and fed through the neural network twice (once before the signal is added to the training data and after the signal has been added to the training process). Doing training of the original data before and after the signal has been added reduces the likelihood that the signal negatively affects the weights in the neural network. As neural networks get deeper and larger, tuning becomes a problem. Enterprises are increasingly turning to 3rd parties to help with getting their neural network working optimally.</p><h4>Outsourced 3rd Parties</h4><p>There are two common use cases under outsourced 3rd parties: using a freely available open source model and entrusting your model development to 3rd parties. If you are using a freely available open source model, you never know if the model has been backdoored and hooked with an attacker’s signal. When you give your model to another 3rd party, you are effectively relinquishing control of your neural network to that party. In some cases enterprises are giving their original training data with the model. This effectively allows 3rd parties to execute attacks identified in the “Insider Attacks” section above. In other cases, 3rd parties are only given the output model after training and would like to insert their “patch” signal.</p><p>Consider a deployment situation where an attacker has received a model for deployment. He/she wants to modify the behavior of the neural network but does not have any of the original training data. He/she could train the neural network with the “patch” signal but this risks worsening the expected results for normal inputs.</p><p>What researchers found was that an attacker could use the existing model to synthetically create adversarial images that had extremely high confidence values for their respective outputs. An attacker creates synthetic training data by obtaining inputs for his target classes. Then he runs them through the neural network to identify the result classification, error, and confidence levels. The attacker then perturbs the inputs (image pixels) and iteratively feeds the modified input to the neural network making sure to increase the confidence and reduce the error upon each iteration. After he is finished the input may not look like what it is supposed to be but the input is closely tied to the current weights for the output class for the targeted model. The attacker then repeats this process for all output classes. After doing this for all output classes the attacker has synthesized training data which models the targeted neural network weights.</p><p>Now the attacker uses the synthetic data to train the network on the “patch” signal data with the desired output labels and then trains the network on the synthesized data to ensure that the targeted model weights are not negatively affected by the “patched” training data. In addition, the synthesized adversarial images have to have activate neurons in the neural network that are similar to neurons which are activate when the “patch” signal is run through the network. This minimizes the patch’s influence on other output classifications as the network learns the “patch” signal. Using this technique allows an attacker to generate training data that keeps the network weights from deviating from their original output results. Due to the structure of neural network, there is no way to formally (using formal proofs) know if a trojan has been inserted into a neural network because the only thing visible in a neural network are the weight values and structure of the neural network. You cannot see code that identifies a backdoor. Even if the attacker does not have access to your model, there are ways to affect the model if there is an API which allows users to provide training input to the neural network.</p><h4>Attacking a Neural Network Via It’s Training API</h4><p>When an attacker has access to an API which received labeled data to train upon, the attacker can isolate inputs which have the greatest effect on weight values within the neural network. In this way, a single mislabeled input has been found to be able to permanently affect the output results of a neural network. If inputs are not validated before being provided to the network, then all of the attacks outlined above are theoretically possible.</p><h3>Defenses to trojaning Attacks</h3><p>There are several techniques that you can use to provide some defense against the attacks outlined above however it is well known that some attack methods do not have any provable defenses. The key to identifying a trojaned network revolves around validating the input and validating that only validated data has been used as training input. There are several methods that you can use such as hashing each input training data and then concatenating the hash values together additively. The resultant hash can be used to validate a model’s weights by running through the training with the same validated data and compare the output weights in the neural networks and the resultant hash.</p><p>If you don’t have a formal verification process in place you can look at output errors in classification. The output errors should be evenly distributed across different class outputs. If output errors (input errors are predominantly classified as certain output classes) are skewed in a certain direction then the model could have been modified to favor a particular class in when a particular “patch” signal is provided. Be especially wary when the skew is toward favored output classification (VIP status, high credit, valued customer, etc.)</p><p>Another technique that can be used to identify trojaned networks is utilizing “influence functions” (<a href="https://arxiv.org/pdf/1703.04730.pdf">https://arxiv.org/pdf/1703.04730.pdf</a>). Influence functions tell you when you one training input sample strongly influences the classification of other samples. You need to understand which inputs are strongly influencing output values (to possibly identify “patch” signals). “Patch” signals need to function in a way that strongly affects the neural output result in an isolated manner (to reduce the possible negative influence on other normal outputs). When you isolate training samples that disproportionately affect the selection of output values — verify that they are not “patch” signal input training samples.</p><p>We have covered attacks on neural networks where the attacker goes first (trojan attacks). Let’s look at attacks where the attacker goes second (adversarial attacks).</p><h3>Adversarial Attacks on Neural Networks</h3><p>Adversarial attacks occur due to the difference in how humans and neural networks perceive changes to inputs. For example, when a human views an image and compares it with the same image having every pixel slightly modified they may not be able to discern the changes. However, a neural network will see a big change via small aggregated changes. In other cases, attackers can take advantage of skewed weight distribution chains in a neural network (where certain weight paths leading to a desired output are dominant). Having a dominant weight(s) could cause changes to the output from localized changes in an input area. This was shown in “One pixel attacks” (<a href="https://arxiv.org/abs/1710.08864">https://arxiv.org/abs/1710.08864</a>). Adversarial attacks occur when the attacker does not have direct access to the neural network model. Attackers target the inputs to the neural network to fool the neural network into outputting a value that is not expected. Research has found that adversarial samples can be successfully transferred across similar models. Due to the fact that many models are built of other models, the likelihood of generating adversarial samples without access to the target model is increased. There are three types of adversarial attacks: adversarial masks, adversarial patches, and model extraction.</p><h4>Adversarial Masks</h4><p>With adversarial masks attackers make small imperceptible changes to all or a large part of the input (every pixel in an image). When aggregated, these small changes can result in a change in the output result with high confidence. The reason for this is the inherent distribution of the weight values within the network. In other cases, attackers do not care about making imperceptible changes. In that case, he/she can utilize adversarial patches.</p><h4>Adversarial Patches</h4><p>With adversarial patches, attackers look for dominate weight values in a neural network that can be taken advantage of by passing in a stronger input value that corresponds to the dominant weight. When the values in the neural network are calculated (by multiplying the weights by their corresponding input values) the dominant weight(s) will change the path through the neural network and the resultant output value. Adversarial attacks focus on modifying inputs to change the output to a desired value; however adversarial attacks can be used to steal models under certain circumstances.</p><h4>Model Exfiltration (Stealing)</h4><p>Model stealing requires the model to provide an API which the attacker can provide an input and receive the targeted model output (result). Due to the sharing of neural network architectures (AlexNet, InceptionNet, LeNet, etc.) the main differentiator in many networks is the weight values learned via training. To steal a neural network model, the attacker will provide training data to the targeted neural network. When the attacker gets the output result from the targeted network, he/she will take that labeled data and use it to train their neural network. With enough data the attacker’s neural network will be very similar to the targeted neural network.</p><h3>Defenses to Adversarial Attacks</h3><p>Although there has been active research with adversarial defenses, it has been a cat and mouse game where a defense comes out and is later debunked. There are ways increasing the robustness of your network against adversarial attacks but none of the following methods are fool proof.</p><h4>Train with Adversarial Samples</h4><p>One way to make you neural network more robust against adversarial attacks is to train your network against adversarial examples with the correct labels (versus incorrect output). There are several frameworks that you can use to generate adversarial samples: cleverhans (<a href="http://www.cleverhans.io/">http://www.cleverhans.io/</a>), Houdini (<a href="https://arxiv.org/abs/1707.05373">https://arxiv.org/abs/1707.05373</a>), etc. Using these frameworks allow you to correct the adversarial example to be properly recognized.</p><h4>Utilize Feature Squeezing on Input</h4><p>Limit input values to those that are only expected. This limits the values attackers can use to influence the pathways through the neural network and their resultant output values.</p><h4>Use a Robust Model</h4><p>A robust model is one that learns fairly strictly from the training data, and so it does not generalize in strange ways. RBF-SVM is one example of this, where the model learns that an input should be classified as, e.g., a cat only if it doesn’t deviate much from other cat images it saw during training. The classification in this case is done either directly or effectively by a similarity metric between inputs. This directly counters adversarial samples, which require producing different classifications for two similar inputs. The problem with robust models like RBF-SVM is that they don’t benefit from the generalization ability that makes deep neural networks useful for complex tasks.</p><h4>Rate Limit and Monitor Your API Usage</h4><p>In order to steal your model, attackers will need to make thousands of requests on your model API. If you monitor for these types of behaviors, you can stop them before they successfully learn your model.</p><h3>Conclusion</h3><p>AI/ML is becoming part of all things (robotics, phones, security systems, etc.) Protecting your AI and ML models from attack will require you to be aware of the different ways attackers can exploit your models. We have tried our best to summarize the current state of security with AI and ML. Things are constantly changing and you will need to read papers to better understand how to make your models robust to these types of attacks as well as protect yourselves. If you have any questions please send them to <a href="/service/mailto:abraham.kang@owasp.org">abraham.kang@owasp.org</a> or <a href="/service/mailto:kunal.manoj.patel@gmail.com">kunal.manoj.patel@gmail.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2de4c975bbbc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/the-inherent-insecurity-in-neural-networks-and-machine-learning-based-applications-2de4c975bbbc">The Inherent Insecurity in Neural Networks and Machine Learning Based Applications</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applied AI: Going From Concept to ML Components]]></title>
            <link>https://medium.com/data-science/applied-ai-going-from-concept-to-ml-components-7ae9c5d823d3?source=rss-cbc32bf7cff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ae9c5d823d3</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[applied-ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Abraham Kang]]></dc:creator>
            <pubDate>Sat, 30 Mar 2019 20:31:45 GMT</pubDate>
            <atom:updated>2019-04-01T00:02:34.071Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Ijufhz9OfBWFd7sz1URXw.png" /></figure><p>Opening your mind to different ways of applying machine learning to the real world. By Abraham Kang with special thanks to Kunal Patel and Jae Duk Seo for being a sounding board and providing input for this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dXAOD8tzXdHVd-xG" /><figcaption>Photo by <a href="https://unsplash.com/@franckinjapan?utm_source=medium&amp;utm_medium=referral">Franck V.</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Executive Summary</h3><h3>Candidate Problem</h3><p>Many people are interested in automating redundant processes within the organization using AI. Let’s start with a concrete problem, what I noticed is that lawyers typically gather facts from clients when something bad happens. These facts form the basis of <a href="https://en.wikipedia.org/wiki/Cause_of_action">causes of action</a> (negligence, battery, assault, intentional infliction of emotional distress) that an individual can sue on. Once the causes of action have been determined based on legal justification and the facts, a complaint is written up and submitted to the court for commencement of the legal action. The complaint is a legal document which sets out the facts giving rise to a legal basis for taking action against another party. Manually creating this document can be time consuming and similar facts result in similar causes of action. For example, if someone hits another person there is usually a “battery”. If someone accidentally hurts someone else or someone slips and falls within a store there could be an action for negligence. Based in this problem we have a customer who would like to use AI to learn how to write a complaint from a fact paragraph describing what happened.</p><h3>Understanding the Problem</h3><p>Trying to get AI/ML to read facts and figure out a way for AI/ML to write a whole complaint might be biting off more than the model can chew and may be an effort that would take years to solve. However, if you take the time to understand and think about the underlying problem, you can find existing techniques (with some slight modifications) that could be used to solve different pieces of the puzzle. For example, when you look at a complaint it starts with a description of the parties and their positions (plaintiff vs defendant) as well as counsel representing them. There may be a class action section, a justification of jurisdiction (does court have power over parties), description of the parties, a justification of venue (are we in the proper court location), a listing of the causes of action, and description of the facts. When you look at the sections you have to think about where the data that is going to build the individual sections is going to come from. In certain cases you will not have an answer but if you look carefully you will see patterns and correlations between different sections of the complaint. This will allow you to think about what your inputs to the neural network will be and the candidate outputs.</p><h3>Getting Inputs for the Neural Network</h3><p>We don’t have any data per se but there may be a way to parse the facts out of all existing complaints and use them as the input for our neural network. Every complaint that is submitted to the court becomes public information so there will be plenty of data. This solution will require attorneys to write their facts as if they were inserting them directly into the complaint, but this is a minor inconvenience to be able to have machine learning provide generated complaints. Generating a complete complaint may be difficult. So let’s break the problem down.</p><h3>Breaking the Problem Down</h3><p>Logically how would you break the generation of a document down into smaller pieces? Well you need to look at one so here is an example:<a href="https://www.heise.de/downloads/18/1/8/9/1/3/4/6/NP-v-Standard-Innovation-Complaint.pdf"> https://www.heise.de/downloads/18/1/8/9/1/3/4/6/NP-v-Standard-Innovation-Complaint.pdf</a>. To make it interesting I picked a maker of adult toys so it might peak your curiosity. Basically, we want to eventually generate a complaint (above pdf) from the facts provided by a lawyer. So if you look at the document and at other complaints you will find similar patterns as to structure.</p><p>So what do you think would be the best way to break things down… don’t scroll down until you have had time to think about it.</p><p>….Really think about it…..</p><p>Well if you said to break things down by section using templating, then this would be the route that would probably be best.</p><p>When you break down a complaint there are causes of action listed in the complaint. Each cause of action (violation of Federal Wiretap Act, Illinois Eavesdropping Statute, Intrusion upon Seclusion, Unjust Enrichment, Fraud and Deceptive Business Practice Act, etc.) has supporting rules and justification based on the facts. So now there are two problems. How do you come up with the causes of action from the facts text and how do you generate the supporting text under each cause of action?</p><h3>Finding the Causes of Action</h3><p>When we look at the facts of the case we need to find all of the causes of action (laws that were broken) that we could sue on. There are no direct solutions for finding causes of action from text so we will have to think more fundamentally.</p><p>What existing techniques do you think we can use to look at text and infer meaning or a description of the text. If you said multi-label text classification or multi-label sentiment analysis, then you are ahead of the game (<a href="https://paperswithcode.com/task/text-classification">https://paperswithcode.com/task/text-classification</a>, <a href="https://paperswithcode.com/task/sentiment-analysis).">https://paperswithcode.com/task/sentiment-analysis).</a> Analyzing text to determine its associated causes of action is a similar process to classifying text or finding the sentiment of related text. There are associated problems like the fact that causes of action will need to be updated as laws are introduced. There may be an alternate way to create an embedding for the facts and then tie the causes of action to the facts based on triplet (https://arxiv.org/pdf/1503.03832.pdf) or quadruplet loss (https://arxiv.org/pdf/1704.01719.pdf) to push causes of action sharing similar words together in the embedding space and unrelated causes of action further apart. Then use a clustering technique to find causes of action close to determinative word embeddings used in the supporting argument associated with the words in the individual cause of action sections of the complaint.</p><h3>Generating the Text in the Supporting Arguments Section of Individual Causes of Action</h3><p>Now that you have figured out how to get the high level causes of action from the text, how can you generate the supporting argument text for each of the individual cause of action sections (violation of Federal Wiretap Act, Illinois Eavesdropping Statute, Intrusion upon Seclusion, Unjust Enrichment, Fraud and Deceptive Business Practice Act, etc.)?</p><p>This one is not so straight forward. Think about a what neural network architectures which generate text (Don’t scroll down until you have some ideas)….</p><p>….Open your mind….Use the Force….</p><p>Text generation algorithms (<a href="https://paperswithcode.com/task/data-to-text-generation">https://paperswithcode.com/task/data-to-text-generation</a>, <a href="https://paperswithcode.com/area/nlp/text-generation">https://paperswithcode.com/area/nlp/text-generation</a>) might be an option but even the best ones create gibberish often. The better alternative might be to use an architecture like neural networks involved in translation (<a href="https://paperswithcode.com/task/machine-translation">https://paperswithcode.com/task/machine-translation</a>, <a href="https://paperswithcode.com/task/unsupervised-machine-translation">https://paperswithcode.com/task/unsupervised-machine-translation</a>, <a href="https://paperswithcode.com/paper/unsupervised-clinical-language-translation">https://paperswithcode.com/paper/unsupervised-clinical-language-translation</a>). In addition, it might be a good idea to have a separate “translation” neural network for each cause of action to help each neural network focus on identifying the key facts used in generating a supporting argument for each cause of action.</p><h3>Clean Up</h3><p>It is probably going to be a good idea to run the candidate text for the supporting argument text for each cause of action through a grammar checker/fixer (<a href="https://paperswithcode.com/task/grammatical-error-correction">https://paperswithcode.com/task/grammatical-error-correction</a>). This way any blatant mess ups are fixed.</p><h3>Conclusion</h3><p>I hope you learned how to apply the machine learning solutions more broadly. Let me know if you get stuck as I would definitely be interested in hearing about problems that people are trying to solve with machine learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ae9c5d823d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/applied-ai-going-from-concept-to-ml-components-7ae9c5d823d3">Applied AI: Going From Concept to ML Components</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I was asked, “How Do You Get Into Software Development and Programming?”]]></title>
            <link>https://medium.com/@abraham.kang/i-was-asked-how-do-you-get-into-software-development-and-programming-b1533231caf0?source=rss-cbc32bf7cff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1533231caf0</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[friendship]]></category>
            <category><![CDATA[career-change]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Abraham Kang]]></dc:creator>
            <pubDate>Sun, 29 Jul 2018 17:29:09 GMT</pubDate>
            <atom:updated>2018-07-29T17:29:09.679Z</atom:updated>
            <content:encoded><![CDATA[<h3>Background</h3><p>Given my background, I got asked this question by a new mentee who has a non-CS degree. I have an unusual background. I graduated with a degree in Ag Ec: Business Management and Marketing from Cornell University. I started a business after graduating with my parents to help them with their financial struggles, and took on the role of customer sales, inventory management and customer service. After three years I was bored and looking for a mental challenge. This is when I found programming and the web. It was a great feeling to take nothing and make something. I was hooked and determined to make a positive contribution in the field. Looking back, I realized that choosing this career was the best choice of my life. I hope I can help people who are passionate and interested in getting into software engineering to be successful.</p><h3>What It Takes</h3><p>Many people are considering getting into software development because they see the lucrative jobs and pay. That is a good starting point but you will need more to be successful and survive the inevitable ups and downs of the profession. Here are three things you have to do to be successful in software: be committed to lifelong learning and curiosity, be vigilant about writing clear, secure, performant, and maintainable code, and be open minded.</p><h3>Being Committed to Lifelong Learning and Curiosity</h3><p>If you choose to pursue a career in software development you need to be prepared to continually learn and be curious. You cannot be satisfied because you successfully completed a product, service, or component in language X. That is just the beginning. Really dig deeper into libraries of that language and seek to gain mastery of that language. Once you have mastered that language pick another. Languages go in and out of style so you want to learn other languages in different programming families to better understand how to apply specific programming languages (Imperative, Functional, Declarative, etc.) to specific problems and diversify your skill sets. If you want to get a job right away, you will want to learn a language which is new and growing quickly. Learning a new and upcoming language levels the playing field. You don’t have to complete with a person who has 20 years of C or Java programming experience. If the language takes off then your chances of getting a job and quick financial boost increase exponentially. Smart contract programming is an example. There are new languages and platforms coming out on different Smart Contract programming platforms: Ethereum, Tron, EOS, NEO, etc. Ideally, you pick the language or platform which will dominate. However, in the beginning you will have to learn them all. The best part of getting in on the beginning is that within 2 years you will be part of the group with the most experience. In addition, if you are a student, give yourself projects to work on (during your free time) that you are passionate about. When I look at resumes from certain schools, every student looks like they were pressed with the same cookie cutter. Often having the same courses and class projects as all of their classmates. This does not bode well for the candidate because it shows a willingness to only do what is required — not an ability to go beyond. As employers we are looking for the unicorns (developers who can output 5x-10x what a “normal” developer outputs). It is difficult to separate the people who are truly passionate about the craft and those that are just interested in finding a stable job after school when your resume looks like everyone else in your class. The way you separate yourself is to find an area of software that you are passionate about make improvements, build libraries which address problems that are unaddressed, or create a new market segment that does not exist but needs to.</p><p>Be curious about why the language creators created the language you are learning. Continually ask yourself “why” when a programming language uses certain constructs to read and process file contents, connect to other servers, generate dynamic HTML content, etc. Look at the pros and cons of how different languages and frameworks work. Ensure that you are learning different programming languages from the different programming family trees. Compare and contrast the syntax and functionality of the different programming languages to better understand what the language creators were sick and tired of doing in one language in comparison to the other and how they thought a problem could be more elegantly solved.</p><p>The most important aspect to have related to lifelong learning is a group of friends who are also interested in learning more in the area you are interested in. Before the Internet Era (BIE), you had to learn programming by buying a bunch of books and reading them cover to cover while trying out the examples. Sometimes the examples didn’t work and other times an author would explain an area of the language poorly. It was difficult finding help and other people to connect with. Today is different. Meetups, employee interest clubs, message boards, stack overflow, YouTube, etc. are all resources that you can use to quickly improve your skills. But the most important of these is having good friends who are smarter than you. In my journey of acquiring machine learning, I was fortunate to have friends (Kunal Patel, Alireza Dirafzoon, Laurent Simon, Rafay, Ahmir, Mohammad, Yin Kang, Mason Bretan, etc.) who were outstandingly knowledgeable in machine learning, math, probability and statistics as well as robotics. Because they were my friends, they were extremely patient as I sat with them for an hour or more going through my questions. I wouldn’t have been able to get as deep an understanding of machine learning, deep neural networks, and robotics in the short time frame that I did (5 months) without their help. Employers are looking for passion and a love of programming/technology. Lifelong learning is one way to show this.</p><h3>Be Vigilant About Writing Clear, Secure, Performant, and Maintainable Code</h3><p>They say the best writers read a lot of good writing. This makes sense. When you read good writing, you pick up exceptional literary constructs and oral visualization techniques. In the same vein, when you look at good code you quickly find patterns that are reused across different solutions. These patterns that you learn can be quickly applied to your projects to solve common problems related to security, scalability, and adaptability.</p><h3>How Do You Find These Code Patterns?</h3><p>Most of these patterns are already around you. In the company’s code base as well as popular and battle tested open source solutions such as: Google AOSP, Facebook opensource, Apache Server, React, many of the machine learning libraries and platforms, etc. You can also read books and articles related to software design, patterns (Gang of Four), building maintainable code, and understanding security vulnerabilities in code. Don’t have the attitude that you know enough because you will never know enough.</p><h3>Learning from Others is Great But You Also Need to Have an Internal Drive to Continually Improve</h3><p>Looking at code will give you patterns but what you learn is kind of random depending on where you are looking. You will need to direct your efforts in a more concentrated fashion on how to write more performant and secure code. Google searches will be helpful here. Understand how systems scale and how code can create bottlenecks. Learn about and understand how security vulnerabilities manifest themselves in code. Understand how to logically separate the parts of your code that change often from the parts that are more stable. Once you have good coding practices in mind you need to ensure that you keep your mind open.</p><h3>Being Open Minded</h3><p>Working in software development is a field that is constantly changing. You may gain mastery in a field (Distributed COM, CORBA, EJBs for example) which becomes obsolete very quickly. You need to have an open mind to see what is coming down the pike and be willing to adapt, change, and acquire. This requires constantly being uncomfortable. Sometimes you will feel really dumb as you ask questions to engineers who are 10–15 years younger than you and they give you the answer within minutes. The thing is those minutes saved you hours or in the worst-case weeks. And saving you weeks allows you to learn more and save more weeks. Your knowledgeable friends will have different backgrounds, sexual orientations, race, religions, beliefs, or values from you. That is ok. Don’t just learn technical stuff from them but learn to understand their values and beliefs. In addition, make sure that you help them out as much as possible. You will need to be on the lookout to see when your friends need help. Listen to them, learn to pick up the subtle ques from their facial expressions, voice or posture hinting that they may be struggling or facing a problem in an area that you can help. Realize that you have things that you have learned through life that you can help them with as well. Don’t be afraid to show love and empathy to those friends around you. Don’t be selfish and just talk about your agenda or needs. Learn about those around you and give all in your heart to them. This will help you build a lasting network which you can rely on for help, strengthen, or grow.</p><h3>Closing Statement</h3><p>I hope I haven’t scared you away from considering a career in software. It is one of the best. The people (unless you run across the rare arrogant asshole) are really nice and some of the best people I have had the fortune to meet. If you can realize what I told you above, everything in your career will be fun and challenging. One final thing, once you become an expert, share your knowledge with the world, by publishing your knowledge on blogs, YouTube or speaking at conferences. You can do it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1533231caf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exponential X: Forget Every Second…Are You Taking Advantage of Every 1/3 of a Second of Your Day]]></title>
            <link>https://medium.com/@abraham.kang/exponential-x-forget-every-second-are-you-taking-advantage-of-every-1-3-of-a-second-of-your-day-1b05f2433864?source=rss-cbc32bf7cff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b05f2433864</guid>
            <category><![CDATA[friendship]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Abraham Kang]]></dc:creator>
            <pubDate>Mon, 28 May 2018 00:20:50 GMT</pubDate>
            <atom:updated>2018-05-28T00:30:22.810Z</atom:updated>
            <content:encoded><![CDATA[<p>I had a discussion with a new mentee. He/she felt like they were still not making much progress in life despite feeling like they were dedicating every second of the day to their goals. I listened and came to realize that most of us think we are doing the best we can to be successful. However, in today’s hyper competitive environment, taking advantage of every second is not enough.</p><p>Now I know what you are thinking, “Abe, your crazy, how can I do more than take advantage of every second of every day?!!” Well there is a way to squeeze what normal people do in a second into less than a second of real time. This process is what I call “Exponential X”.</p><h3>Exponential X</h3><p>Exponential X is the process of analyzing what you are doing and seeing if there are creative ways of doing them better, faster, and more efficiently. You see this applied to speed reading, automation, and business process improvement. Ask yourself why people have gotten used to doing something a certain way and think of a better way to do that something given advancements in technology, psychology, or the state of the art. One example of this is “Exponential Learning.”</p><h3>Exponential Learning</h3><p>Exponential learning allows you to learn more than twice as fast as the normal person. Doing this requires creativity and a belief that you can. Creativity because you have to find ways to learn faster and belief because some of the techniques I am giving you will require some getting acclimated to. So far, I have found three ways to learn exponentially: watch online educational videos at 3x, multi-task intelligently, and learn from experts.</p><h4>Watching Lectures at 3 Times the Normal Speed</h4><p>The people that I mentor are driven to succeed. Most of them are taking classes online, implementing what they learned and keeping healthy. However, most people don’t think of how they can learn faster.</p><p>Necessity is the mother of invention. I believe this statement is true because I am continually applying it to hack every aspect of my life. I remember listening to an online video lecture thinking, “This guy speaks too slow.” That is when I explored the video settings and found the playback speed settings. I tried to crank it up to 2x right away and it sounded weird so I went down to 1.5x. Eventually, it sounded slow again so I cranked it up to 2x. Eventually this became slow, so I found a way to play videos at 4x in VLC. I am currently at 3.4x but my goal is to get to 4x. By watching at over 3x I am able to learn what a normal person learns in 1 second in less than 1/3 of a second (in other words what takes 3 hours for a normal person to go through takes me 1 hour if playing on 3x speed). When you first start cranking up the speed, you may think it is harder to understand. Just reduce the speed and focus. What you will find is your mind is incredibly adaptable. Eventually, the increased speed will sound normal. This is when you crank it up again. Believe you can do it and stick with it. Eventually you will find yourself above 3x.</p><h4>Multi-tasking Intelligently</h4><p>Most people say multi-tasking is bad. In some cases, you have a situation or task which requires you to focus on it exclusively. This is not where you may want to multi-task. However, we all need to exercise and stay healthy. When you look at the exercise machines they have video screens where people are watching TV. You have a choice. You can get on an elliptical (which has both moving arms and moving legs) or you can get on a seated bike. The seated bike has the advantage of being more stable/stationary if you are reading. So, which one would you pick to learn while exercising?</p><p>But you can still go further. I am training myself to read machine learning papers (actively marking important sections with a pen — making notes in the margins) while listening to law lectures; all while peddling like a mad man on the seated bike (I eventually crank it up to 25 — the max). At first, it will be difficult to focus while peddling hard and you will feel tempted to quit — but you have to believe. I would just start with reading while vigorously peddling. Once you are able to focus and retain what you read (while sweating like a maniac) then add the additional auditory learning. It also may help to read a paper and listen to something related to the paper at first. As your brain accommodates, you will be able to train your subconscious to learn unrelated things to what you are reading (learning one thing with your eyes while you learn another thing with your ears). Getting the most out of self-learning is great but experts will be able to usually answer your targeted questions faster than Google.</p><h4>Learning From Others</h4><p>There are always people who are smarter than you in different ways. Be grateful when you find these people because they will be ones who help you have richer lives. Yes, you will feel dumb when a person 15 years your junior is telling you that you are wrong or helps you understand a mathematical concept that you haven’t seen for the same amount of time. It is difficult to be out of your comfort zone but you will find that having these friends helps you pick up machine learning, AI, robotics, partial derivatives, etc. much quicker than trying to figure everything out yourself. Also, you have an opportunity to develop the next generation of leaders. Help those that help you with other things like leadership, career development, public speaking, etc. You will build great friendships that are symbiotic.</p><h3>Call To Action</h3><p>If you want to be “exponential” try some of the things outlined above. Change your thinking to be limitless. Do whatever it takes (as long as it is ethical) to be “exponential” and share what ways you have learned to be exponential with the world so they can learn from you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b05f2433864" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the Differences Between Alexa, API.ai, WIT.ai, and LUIS/Cortana]]></title>
            <link>https://medium.com/@abraham.kang/understanding-the-differences-between-alexa-api-ai-wit-ai-and-luis-cortana-2404ece0977c?source=rss-cbc32bf7cff7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2404ece0977c</guid>
            <category><![CDATA[assistant]]></category>
            <category><![CDATA[virtual-assistant]]></category>
            <category><![CDATA[alexa]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-assistant]]></category>
            <dc:creator><![CDATA[Abraham Kang]]></dc:creator>
            <pubDate>Mon, 24 Apr 2017 13:11:55 GMT</pubDate>
            <atom:updated>2017-04-24T13:11:55.947Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been teaching myself about AI application development to understand the security vulnerabilities present in these types of applications. It has been an interesting journey through Alexa Skills Development, API.ai, Wit.ai, and Microsoft LUIS (Language Understanding Intelligent Service)/Cortana. This first article is a general overview of developing applications utilizing these platforms. My next blog on AI Assistants will go through the security issues that I discovered with each platform. You cannot understand the weaknesses that are in application code until you start developing with it.</p><h3>Overall Architecture of AI Assistant Based Applications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/0*Ms9HNob9HyWcWkbk.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/0*HBp13IJewSkrPZhb.png" /></figure><p>If you look at all of the AI platforms, you will see that they are very similar. You have a user who speaks commands/questions to a device. This device will record the audio and stream it to an intermediate service. The intermediary will recognize this as an initial request and send the audio to the speech-to-text service. The speech-to-text service converts the audio to text and returns text to the intermediary service. The intermediary then sends the text to the text-to-Intent/Action component. This component is responsible for figuring out what the user wants to do. Usually AI Assistants will have phrases which trigger named intents. For example, an application can look for the phrase “What’s the weather in {Boston} {Massachusetts}” to trigger a get_weather intent. The part in {} braces are called slots. Think of them as variables for voice commands. Once the intent/action name is figured out then depending on the platform, more interactions can take place gathering needed information by the platform or a webhook is invoked. Some platforms require you to make a web call for every intent. Others, allow you to gather all of the data in their platform before invoking your webhook (business logic).</p><p>When your webhook is invoked the intent name, slot names, and slot values are passed to your business logic. This business logic could be housed in an AWS Lambda function or Heroku server. Your business logic identifies which internal function needs to be called based on the intent name and then reads the required values from slot values using the slot names. Your business logic can then invoke REST APIs on the internet to gather information which will be returned to the device and spoken to the end user.</p><p>Although, the AI assistant platforms are architecturally the same there are important differences you need to be aware of if you are developing for each platform. Each platform is special and provides unique advantages and disadvantages.</p><h3>Alexa</h3><p>Alexa is currently the most popular AI assistant on the market. Alexa is developed by Amazon. The code for Alexa is open sourced. Alexa is good for simple apps where the command phrases are limited and distinct.</p><h3>Advantages</h3><p>Alexa is pretty straight forward to program and develop AI assistant applications with. Applications can run on any platform. You have full control because you have to manage all of the interactions in code (context, session, required parameters, etc.)</p><h3>Disadvantages</h3><p>Every triggered intent requires a webhook call. No development UI — you have to input your intent schema, utterances, slots and manage all of the relationships manually. Relatively weak in terms of machine learning. Harder to develop with in comparison to API.ai and Wit.ai. Limited diagnostic tools. Have to input exact phrases which trigger intents. Limited predefined reusable domains of global skills. You have to manage the retrieval of missing required parameters in your business logic. Both API.ai and LUIS provide automated prompting for missing required parameters once configured in their development UI.</p><h3>API.ai</h3><p>Recently acquired by Google. One of the more feature rich solutions with machine learning. Can be used in cases where the platforms learn new commands semantically similar to those input by the developer as triggers for intents. Has the concept of entities to learn about the things you are talking about. Also provides a UI to help developers with creating intents, entities, and agents.</p><h3>Advantages</h3><p>Smarter and can learn alternative phrases which can trigger intents and understand alternative entities. Allows you to manage context parameters through the UI. Easily add entities by highlighting them in the sample utterances through the UI. Allows you to mark entities/parameters as required so the platform manages retrieving the entity/parameter values from the user without having to go to your business logic. Alexa requires you to manage this yourself in the business logic code. Rich set of domains for building chat bots with out of the box functionality (small talk, weather, flight, news, etc.).</p><h3>Disadvantages</h3><p>Lack of diagnostic tools to measure the true positives, true negatives, false positives and false negatives related to intent and entity matching. Microsoft LUIS provides detailed metrics on how your intents and entities are being resolved. Lack of visualization of conversation flows. Wit.ai has a nice “Stories” feature which allows you to visually represent the conversation flows, business logic invocations, context variables, and branching logic.</p><h3>Wit.ai</h3><p>Recently acquired by Facebook. One of the better feature complete solutions with machine learning. As in the case of API.ai, Wit.ai can be used in cases where the platforms learn new commands semantically similar to those input by the developer as triggers for intents. Has the concept of entities to learn about the “things” you are talking about. Wit.ai also provides a UI to help developers with creating intents, entities, and agents. The major difference is that Wit.ai also provides a developer GUI which includes a visual representation of the conversation flows, business logic invocations, context variables, jumps, and branching logic.</p><h3>Advantages</h3><p>Easier to develop applications using the developer UI. Smarter and can learn alternative phrases which can trigger intents and alternative entities. Allows you to manage context parameters through the UI. Easily add entities by highlighting them in the sample utterances through the UI. Visually see and edit the conversation flow tree. Wit.ai also supports the idea of roles for entities. When you say “from LA to New York” both LA and New York are location entities but you can further distinguish between a fromLocation (LA) and toLocation (New York). The only other framework to support this feature is LUIS (with hierarchical entities).</p><h3>Disadvantages</h3><p>Does NOT have the required slot/parameter feature so you have to invoke business logic after every interaction which gathers slot/parameter information from the user to gather any missing information which was not spoken by the user. Limited predefined reusable domains of global skills. Some diagnostics but very limited in comparison to MS LUIS. Webhook integration is unclear. All of the documented examples only invoke logic in interactive mode locally or only work with Facebook messenger apps. Although, you can specify context variables for missing required parameters, you have to manage the retrieval of missing required parameters by using “Bot Executes” logic, context variables, and jumps. Both API.ai and LUIS handle the prompting for missing required parameters by just configuring them as “required” in their development UI.</p><h3>MS LUIS (Language Understanding Intelligent Service)/Cortana</h3><p>Very similar to API.ai. One of the better feature complete solutions with machine learning. Can be used in cases where the platforms learn new commands semantically similar to those input by the developer as triggers for intents. Has the concept of entities to learn about the “things” you are talking about. Also provides a UI to help developers with creating intents, entities, and agents but does not provide a visual representation of the conversation flows as Wit.ai does. To its credit, Microsoft does also include other language, intelligence, and assistant based services that look to be better than all of the other competing solutions. You will have to assess whether being tied to the windows platform is workable.</p><h3>Advantages</h3><p>Smarter and can learn alternative phrases which can trigger intents and alternative entities. Easily add entities by highlighting then in the sample utterances through the UI. Allows you to mark entities/parameters as required so the platform manages retrieving the entity/parameter values from the user without having to go to your business logic. LUIS provides richer metrics to understand how well your AI assistant app is working. LUIS also supports something called composite entities. Think of composite entities as a grouping of entities into a single predefined entity. For example, in “<strong>2 adult first class</strong> tickets from LA to NY” — 2 is the number of tickets, adult is the ticket type, and first is the ticket class but all of the entities together constitute a ticket order composite entity. None of the other AI frameworks support composite entities.</p><h3>Disadvantages</h3><p>Does not allow you to manage context parameters through the UI or filter intents based on context parameters set in previous intents as API.ai does. You have to manage these yourself similar to Alexa. Does not include a rich set of domains for building chat bots like API.ai. Building apps with Cortana and LUIS requires you to build UWP (Universal Windows Platform) apps (ultimately tying you to the windows platform).</p><h3>Conclusion</h3><p>The information in this article is in flux. WIT.ai has just introduced the visual conversation flows through its “Stories” feature. Alexa looks like it is trying to integrate more machine learning into its solution. Expect, the competition to be fierce and players to leap frog over each other in the coming year. It is going to be exciting to see what new features and services are provided by the stakeholders above. Now that you have a foundational understanding of AI assistant based applications. The next article will focus on how to access risk in AI assistant applications and the security issues related to them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2404ece0977c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>