<?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 Josef Bajada on Medium]]></title>
        <description><![CDATA[Stories by Josef Bajada on Medium]]></description>
        <link>https://medium.com/@josefbajada?source=rss-f6eec6b1f814------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NlhI1pzvPM2crkgfo2UWwQ.jpeg</url>
            <title>Stories by Josef Bajada on Medium</title>
            <link>https://medium.com/@josefbajada?source=rss-f6eec6b1f814------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:02:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@josefbajada/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[8 Reasons why Azure Container Instances Suck]]></title>
            <link>https://josefbajada.medium.com/8-reasons-why-azure-container-instances-suck-a8a81fa91f92?source=rss-f6eec6b1f814------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8a81fa91f92</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-container-instances]]></category>
            <category><![CDATA[azure-container-service]]></category>
            <category><![CDATA[azure-container-registry]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Josef Bajada]]></dc:creator>
            <pubDate>Thu, 11 Mar 2021 15:31:53 GMT</pubDate>
            <atom:updated>2021-03-11T15:31:53.031Z</atom:updated>
            <content:encoded><![CDATA[<p><em>tl;dr: ACI is a very immature and unstable product, and I doubt that many customers are using it in production. Just stay away from it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*NTiAvaXNDxkzNV49QOXd3w.png" /><figcaption>Azure Container Instances</figcaption></figure><p>Microsoft Azure is one of the three major global cloud providers, competing against AWS and Google Cloud. It is often convenient to use Azure for companies that are already in the Microsoft eco-system, maybe using Office 365, Active Directory, Dynamics CRM, Navision, or Power BI. Needless to say, Microsoft products work well with each other, and in that case the path of least resistance would be to stick with Azure, and use their products.</p><p>For anything else, Azure has always somehow managed to disappoint. It seems they invest much more in advertising their half-baked products then maintaining them. Case in point, to this date, the out-of-the-box Ubuntu image available to install on a basic vanilla VM on Azure is still 18.04LTS, when Ubuntu 20.04LTS has been out for almost a year, and has been available on AWS, <a href="https://cloud.google.com/compute/docs/quickstart-linux">Google Cloud</a>, and also on the cheaper cloud providers like <a href="https://cloud.google.com/compute/docs/quickstart-linux">Digital Ocean</a> and <a href="https://www.reddit.com/r/hetzner/comments/g7484x/ubuntu_focal_fossa_2004_is_now_on_hetzner_cloud/">Hetzner Cloud</a> for a long while how. Even worse, while they falsely advertise Azure as the <a href="https://www.youtube.com/watch?v=e9JlLCZTgao&amp;ab_channel=MicrosoftAzure">“best destination to run PostgreSQL”</a>, they are still running on PostgreSQL 11, while <a href="https://aws.amazon.com/about-aws/whats-new/2020/11/postgresql-13-now-available-in-amazon-rds-database-preview-environment/">AWS RDS</a> and <a href="https://cloud.google.com/blog/products/databases/cloud-sql-database-service-adds-postgresql-13">Google Cloud</a> are both on PostgreSQL 13. Azure does offer a newer “Flexible Server” option still in preview, which offers PostgreSQL 12. However, it doesn’t have all the features available, including missing extensions such as TimescaleDB. This is ironic, considering how they supposedly <a href="https://blog.timescale.com/blog/timescale-microsoft-azure-team-up-to-power-iot-and-time-series-workloads/">partnerned with Timescale</a> and made a whole fuss about it, but then left it stuck on version 1.3.2 (there were 12 updates on the 1.x release up to 1.7.5 since then, and a newer 2.x version released in December 2020).</p><p>But I digress (although I included the above for a reason which will become clearer below), and you are here because you are probably interested in Azure Container Instances (ACI). Maybe you are considering to use them in development or even in production, or maybe you are already facing the same issues and Google pointed you to this article.</p><h3>What are Azure Container Instances?</h3><p>Azure Container Instances (ACI) are Microsoft Azure’s solution to run a docker container without having to provision a Virtual Machine to host it. It is simpler and cheaper than Azure Kubernetes Service (AKS) to operate, which makes it attractive if you want to start small and simple.</p><p>Once you create your docker image and push it to your Azure Container Registry (ACR), you can deploy a container instance with a CLI command like:</p><pre>az container create --resource-group $AZURE_RESOURCE_GROUP --name $ACI_CONTAINER_NAME --image $IMAGE_NAME --registry-username $ACR_USERNAME --registry-password $ACR_PASSWORD --restart-policy Never --environment-variables $ENV_VARS --secure-environment-variables $SECURE_ENV_VARS</pre><p>This command creates a new Container Instance of the docker image $IMAGE_NAMEand provisions it in the specified AZURE_RESOURCE_GROUPwith the specified ACR_CONTAINER_NAME. You can also pass runtime environment variables with --environment-variables and --secure-environment-variables (the latter do not get logged or shown anywhere, so ideal for passwords and other secrets you want the container instance to use).</p><p>This is all fine and dandy, and relatively easy to integrate with modern CI/CD tools like <a href="https://support.atlassian.com/bitbucket-cloud/docs/deploy-to-microsoft-azure/">Bitbucket</a> or Gitlab. The simplicity of it all is very attractive, and it makes it really easy to deploy a cloud native application. But this is where the fun stops.</p><h3>ACIs can be publicly accessible, private inside a VNET, but not both.</h3><p>For obvious security reasons, private resources should not be accessible publicly over the internet. The common approach to do this on Azure is to create a vnet. If you decide to install your own PostgreSQL database on a VM with a <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview">managed disk</a> attached (maybe because you want to use the latest PostgreSQL 13 instead of the outdated one offered as a managed database by Azure), the portal itself will suggest to put it inside a VNET so that you do not expose its port publicly. There could be various other services you would want to run privately, so a VNET makes sense.</p><p>At some point, one of the services inside the VNET needs to be exposed publicly. Maybe it is the web application exposing the front-end user interface, or maybe it is a REST API. If it is running on a normal VM, you just add a public IP to the VM. It even gets a Fully Qualified Domain Name (FQDN) on one of Azure’s domains, so you can avoid dealing with IP addresses directly.</p><p>Of course you would assume that such basic functionality is available for ACI. Well it is… sort of… because you can have an ACI with a public IP and FQDN. But the moment the ACI is public, it can’t be inside a vnet. The moment it is inside a vnet, you can’t give it a DNS name to expose it publicly. <a href="https://feedback.azure.com/forums/602224-azure-container-instances/suggestions/37163587-enable-containers-in-vnets-to-have-a-public-ip">There has been a request to remove this restriction for over 2 years</a>.</p><p>One possible solution is to use an Application Gateway, but as you will see below, it comes with its own issues.</p><h3>ACI Resource IDs are not available to Backend Pools</h3><p>In order for the Application Gateway, exposing the public IP address, to route requests to an ACI inside a VNET, you need to specify a Backend Pool that specifies the private resources that should serve any requests hitting the gateway. If you were running a normal VM, you could just specify its resource ID and that’s about it.</p><p>When using container instances, their resource ID is not available to Backend Pools. You can only use the IP address directly. So what you have to do is find the IP address of your container and add it to the Application Gateway’s backend pool. This works fine, as long as the IP address of the container instance does not change. Again, this issue has been <a href="https://feedback.azure.com/forums/217313-networking/suggestions/37196215-add-aci-containers-to-application-gateway-backend">logged and waiting for a resolution for 2 years</a> without any response.</p><p>Even the <a href="https://docs.microsoft.com/en-us/azure/container-instances/container-instances-application-gateway">Azure documentation acknowledges this limitation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*abi8z_VbahTbo_l8FciX5w.png" /></figure><h3>The IP address of an ACI cannot be fixed</h3><p>A workaround to this would have been possible if only there was an option to specify the IP address of an ACI inside the VNET. After all the IP addresses are your own private range, typically in the 10.0.x.x range. As an experiment I put my ACI in its own subnet of the smallest range possible (3 IP addresses), hoping that it sticks to the same IP address, but it didn’t.</p><p>So when your ACI gets restarted for some reason (more on this below), you are bound to get your Application Gateway configuration outdated and invalid and you need to manually update this.</p><p>The only solution I found so far is to somehow use <a href="https://docs.microsoft.com/en-us/azure/container-instances/container-instances-init-container">Azure Init containers</a>. Admittedly I have not explored this in enough depth yet, because it has already been a painful few weeks to find and try to get around the limitations listed here, and adding more complexity is starting to defeat the whole purpose of using simple ACIs and not going for a more sophisticated AKS setup.</p><h3><strong>ACI does not work well with Private DNS Zones</strong></h3><p>When deploying your ACI inside a VNET you probably want it to use the resources inside the VNET (that’s the whole point). Of course, you wouldn’t want to talk to the other resources directly through their IP address, because their IP address might change, especially if they are ACIs themselves (see above). When deploying normal VMs, these automatically get registered to your Private DNS zone, and you can communicate with the other resources using their name. Again, you would think that such basic functionality would work seamlessly with a container instance, but it does not.</p><p>ACIs do not register themselves with their resource ID to the Private DNS Zone. They will not be reachable by name. I found mixed information about this online, but from my experience this does not work consistently. This either does not work at all, or what comes up is some auto generated name like vm000001 which of course has nothing to do with the real resource name.</p><p>The even more frustrating part is that even the resources inside the VNET, which are properly auto-registered with the Private DNS Zone, like a normal VM, are not reachable from the ACI. So two normal VMs inside the VNET can reach each other by their resource name, but a container instance inside the same VNET can’t. This is probably somehow solvable with a more advanced DNS configuration, probably involving operating your own DNS server instead of the Azure one, but the <a href="https://stackoverflow.com/questions/64700687/how-to-get-azure-container-instances-using-my-dns-server">prospects of a clean solution for this are not too promising</a> either.</p><h3>Inconsistent ACI Deployment Behaviour</h3><p>The usual practice of updating docker images is to set the :latest tag to the image you want your containers to use. This way, when the container pulls the :latest image, it will get the updated code.</p><p>According to the <a href="https://docs.microsoft.com/en-us/azure/container-instances/container-instances-update#">documentation</a> and <a href="https://stackoverflow.com/a/49929564/340088">other online sources</a> running ther CLI commandaz container create is enough to make the container instance that is already running to pull the :latest image again from the Azure Container Registry and restart. This usually works fine, however I noticed several instances where the container was not restarted at all, and I had to manually restart it. The result from az container create (running from a Bitbucket pipeline) was clearly successful:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*T3mT7eG_ZAbGXA0G_ZUacA.png" /><figcaption>Successful result of `az container create`</figcaption></figure><p>But the container instance was not restarted. So, to use this in a proper CI/CD setup, one will probably need to restart the container to make sure it picks up the new version of the image.</p><h3>Missing ACI Events</h3><p>This has more to do with managing your ACIs once you get them up and running. Azure Portal provides you information about your container, such as the memory usage, CPU usage, bandwidth etc., together with the stdout logs from your container and the events related to your container (when it was started, killed, etc.)</p><p>However, these events often are not in sync with the container’s real status. Whenever the container is terminated you should see a Killed event, while when the container is started you should see a Started event.</p><p>In this case, the container was terminated at 11th March at around 1am:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*QlQAxhTg-QyFjWtzchwEXA.png" /><figcaption>Container Instance Terminated on Thursday 11th March 2021 at around 1am</figcaption></figure><p>But the Events show no information about this (and as you can imagine no reason why it was terminated).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BO5vISa5cGGFZoONtzmi4w.png" /><figcaption>Container Events in descending timestamp order (latest first)</figcaption></figure><p>When the container gets restarted, the logs of the previous instance disappear so you have no idea about what was the reason why your application died. For this reason, I set the --restart-policy to Never temporarily, until I understand what is going on. In the meantime Azure Support suggested to add an Azure Log Analytics service (adding more costs) so that logs of previous instances are still visible.</p><h3>ACIs lack proper logging.</h3><p>The only logs you have available are those of the application inside in the container. There is nothing that tells you anything about the container itself. This information is not even available to support. When investigating why my container was getting killed for no reason (more on this below) Azure Support had very little more information than what I had.</p><p>After following their suggestion and adding Log Analytics, I was hoping to get more information, but still, I only saw my application’s logs. It was just happily waiting for connections (it is a dummy REST API doing nothing) until it was just obliterated from existence without giving any reason.</p><h3>ACIs are unstable in some regions.</h3><p>There are various reasons why choosing the right region is important, not just for latency and proximity to your users, but also because of data residency requirements, especially regarding Data Privacy regulations like GDPR.</p><p>When I deployed my ACI on West EU I was observing some weird behaviour. My container would run happily for a few hours, and then get killed. Sometimes this killed event would appear in the Container Events, and sometimes (like in the above case) it would not, and I would only determine when it happened from the performance metrics graphs. I couldn’t know why it happened, and of course the first response from support was that most probably my application was the culprit.</p><p>So I created a dummy application, a simple REST API, and the instance still got terminated, sometimes after a few hours, sometimes after a couple of days. Support suggested that I deploy on the East US region, and lo and behold, the instance has been running without fail for over 15 days. In the meantime Support have been chasing the Product team for weeks, trying to understand what is going on. It seems that <a href="https://docs.microsoft.com/en-us/answers/questions/281794/azure-container-instance-killed-for-no-reason-afte.html">other people are experiencing the same problem too</a>. It seems that it doesn’t make a difference what the application actually is either. In <a href="https://docs.microsoft.com/en-us/answers/questions/269320/azure-container-instance-randomly-failing-how-to-t.html">this case it was a .net application </a>that experienced the same problem.</p><p>The last information I have from Azure Support is that there is some problem on their side in that region, and the reason is “pod shim crashing”, which seems to point to some underlying Kubernetes issue. The fact that this has been going for so long without resolution, and that other customers were affected too, doesn’t give me much confidence that ACI is actually production ready.</p><h3>Conclusion</h3><p>It comes to no surprise that in my opinion, ACI is not ready for production use. Your experience might be different, but in my case the experience has been just horrible. I wasted so much time searching documentation and chasing Support for answers, and I still have not resolved all the issues.</p><p>If you need to stick with Azure, and want to have a cloud native solution for your docker containers that is production-ready, you will probably have to look into a more complex setup with AKS. If you don’t, you’re probably better off using AWS Fargate or Google Container Engine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8a81fa91f92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Symbolic vs Connectionist A.I.]]></title>
            <link>https://medium.com/data-science/symbolic-vs-connectionist-a-i-8cf6b656927?source=rss-f6eec6b1f814------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cf6b656927</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[towards-data-science]]></category>
            <dc:creator><![CDATA[Josef Bajada]]></dc:creator>
            <pubDate>Mon, 08 Apr 2019 14:01:33 GMT</pubDate>
            <atom:updated>2019-04-09T13:32:32.189Z</atom:updated>
            <content:encoded><![CDATA[<p><em>As Connectionist techniques such as Neural Networks are enjoying a wave of popularity, arch-rival Symbolic A.I. is proving to be the right strategic complement for mission critical applications that require dynamic adaptation, verifiability, and explainability.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3eTdq5gO0HF0TRhP" /><figcaption>Photo by <a href="https://unsplash.com/@prvelasco89?utm_source=medium&amp;utm_medium=referral">Pablo Rebolledo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It seems that wherever there are two categories of some sort, people are very quick to take one side or the other, to then pit both against each other. <em>Artificial Intelligence</em> techniques have traditionally been divided into two categories; Symbolic A.I. and Connectionist A.I. The latter kind have gained significant popularity with <a href="https://www.forbes.com/sites/bernardmarr/2017/08/08/the-amazing-ways-how-google-uses-deep-learning-ai/#7e23d5b83204">recent success stories</a> and media hype, and no one could be blamed for thinking that they are what A.I. is all about. There have even been cases of people <a href="https://twitter.com/jackclarkSF/status/1070732718357528577">spreading false information</a> to diverge attention and funding from more classic A.I. research and development.</p><p>The truth of the matter is that each set of techniques has its place. There is no silver bullet A.I. algorithm yet, and trying to use the same algorithm for all problems is just plain stupid. Each has its own strengths and weaknesses, and choosing the right tools for the job is key.</p><h3>What is Symbolic A.I.?</h3><p>This category of techniques is sometimes referred to as GOFAI (Good Old Fashioned A.I.) This does not, by any means, imply that the techniques are old or stagnant. It is the more classical approach of <strong>encoding a model</strong> of the problem and expecting the system to process the input data according to this model to provide a solution.</p><p>The need for <em>symbolic </em>techniques is getting a fresh wave of interest of late, with the recognition that for A.I. based systems to be accepted in certain high-risk domains, their behaviour needs to be verifiable and <a href="https://en.wikipedia.org/wiki/Explainable_Artificial_Intelligence">explainable</a>. This is often very difficult to achieve by <em>connectionist </em>algorithms.</p><p>The systems that fall into this category often involve deductive reasoning, logical inference, and some flavour of search algorithm that finds a solution within the constraints of the specified model. These include <em>expert systems</em>, which use rules and <a href="https://en.wikipedia.org/wiki/Decision_tree">decision trees</a> to deduce conclusions from the input data, <em>constraint solvers</em>, which search for a solution within a space of possibilities, and <em>planning systems</em>, which try to find a sequence of actions to achieve a well defined goal from some initial state. They often also have variants that are capable of handling <a href="https://www.cs.bgu.ac.il/~pdm122/wiki.files/Conformant.pdf">uncertainty</a> and risk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*oeMEUAn7chzlXVzG.png" /><figcaption>A MiniMax Game Tree for Tic-Tac-Toe. (<a href="https://www.researchgate.net/figure/Game-tree-for-Tic-Tac-Toe-game-using-MiniMax-algorithm_fig1_262672371">Image Source</a>)</figcaption></figure><p>Such algorithms typically have an algorithmic complexity which is <a href="https://en.wikipedia.org/wiki/NP-hardness"><strong>NP-hard</strong></a><strong> or </strong><a href="https://en.wikipedia.org/wiki/List_of_PSPACE-complete_problems"><strong>worse</strong></a><strong>, </strong>facing super-massive search spaces when trying to solve real-world problems. This means that classical exhaustive blind search algorithms will not work, apart from small artificially restricted cases. Instead, the paths that are least likely to lead to a solution are pruned out of the search space or left unexplored for as long as possible.</p><p>There is a plethora of techniques in this category. <a href="https://web.stanford.edu/class/ee364b/lectures/bb_slides.pdf">Branch and bound</a> algorithms work on optimisation or constraint satisfaction problems where a heuristic is not available, partitioning the solution space by an upper and lower bound, and searching for a solution within that partition. <a href="https://en.wikipedia.org/wiki/Local_search_(optimization)">Local search</a> looks at close variants of a solution and tries to improve it incrementally, occasionally performing <a href="https://en.wikipedia.org/wiki/Simulated_annealing">random jumps in an attempt to escape local optima</a>. <a href="https://en.wikipedia.org/wiki/Metaheuristic">Meta-heuristics</a> encompass the broader landscape of such techniques, with <a href="https://en.wikipedia.org/wiki/Evolutionary_algorithm">evolutionary algorithms</a> imitating distributed or collaborative mechanisms found in nature, such as <a href="https://en.wikipedia.org/wiki/Genetic_algorithm">natural selection</a> and <a href="https://en.wikipedia.org/wiki/Swarm_intelligence">swarm-inspired behaviour</a>.</p><p><a href="https://en.wikipedia.org/wiki/Heuristic_(computer_science)">Heuristic search</a> uses an evaluation function to determine the <em>closeness</em> of a state to the goal, using estimates that are cheaper to compute than trying to find the full solution. One noteworthy domain-independent heuristic is <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.686.9250&amp;rep=rep1&amp;type=pdf"><em>relaxation</em></a><em>, </em>where the algorithm ignores some of the constraints or possible real-world <em>setbacks</em> to find a faster solution in a more <em>relaxed</em> world. This is used as guidance to make more informed choices at each decision point of the search. A good heuristic which is both <a href="https://en.wikipedia.org/wiki/Admissible_heuristic"><em>admissible</em></a> (never overestimates the cost) and <em>informative </em>can lead to algorithms such as <a href="https://en.wikipedia.org/wiki/A*_search_algorithm">A*</a> to find optimal solutions, but unfortunately such heuristics are often not available easily. For complex problems, finding a <em>feasible </em>solution that satisfies all constraints, albeit not optimal, is already a big feat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*HppvOLfDxXqQRFn0Cv2dHQ.gif" /><figcaption>A* Heuristic Search for finding Shortest Path (Image Source: <a href="https://en.wikipedia.org/wiki/A*_search_algorithm">Wikipedia</a>)</figcaption></figure><p>While some techniques can also handle <a href="https://en.wikipedia.org/wiki/Partially_observable_Markov_decision_process">partial observability and probabilistic models</a>, they are typically not appropriate for noisy input data, or scenarios where the model is not well defined. They are more effective in scenarios where it is well-established that taking specific actions in certain situations could be beneficial or disastrous, and the system needs to provide the right mechanism to <em>explictly encode</em> and <em>enforce </em>such rules.</p><p>Symbolic algorithms eliminate options that violate the specified model, and can be <em>verified </em>to always produce a solution that satisfies all the constraints much more easily than their connectionist counterparts. Since typically there is barely or no algorithmic <em>training </em>involved, the model can be dynamic, and change as rapidly as needed.</p><h3><strong>What is Connectionist A.I.?</strong></h3><p>Connectionist A.I. gets its name from the typical network topology that most of the algorithms in this class employ. The most popular technique in this category is the Artificial Neural Network (ANN). This consists of multiple layers of nodes, called <em>neurons</em>, that process some input signals, combine them together with some weight coefficients, and <a href="https://en.wikipedia.org/wiki/Sigmoid_function">squash them</a> to be fed to the next layer. Support Vector Machines (SVMs) also fall under the Connectionist category.</p><p>ANNs come in various shapes and sizes, including Convolution Neural Networks (successful for image recognition and bitmap classification), and Long Short-term Memory Networks (typically applied for time series analysis or problems where time is an important feature). <a href="https://en.wikipedia.org/wiki/Deep_learning">Deep learning</a> is also essentially synonymous with Artificial Neural Networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*r-d1t5izwgAmNcFz.png" /><figcaption>A neuron of an Artificial Neural Network. (Image source: <a href="https://en.wikipedia.org/wiki/Backpropagation">Wikipedia</a>)</figcaption></figure><p>The key aspect of this category of techniques is that the user does not specify the rules of the domain being modelled. The network <em>discovers </em>the rules from training data. The user provides input data and sample output data (the larger and more diverse the data set, the better). Connectionist algorithms then apply statistical regression models to adjust the weight coefficients of their intermediate variables, until the best fitting model is found. The weights are adjusted in the direction that minimises the cumulative error from all the training data points, using techniques such as <a href="https://en.wikipedia.org/wiki/Gradient_descent">gradient descent</a>.</p><p>Since these techniques are effectively error minimisation algorithms, they are inherently resilient to noise. They will smoothen out outliers and converge to a solution that classifies the data within some margin of error.</p><p>These algorithms <em>do not need a model of the world</em>. They just need enough sample data from which the model of the world can be <em>inferred statistically</em>. This is a very powerful characteristic, but also a weakness. The input features have to be very carefully selected. They also have to be normalised or <a href="https://en.wikipedia.org/wiki/Feature_scaling">scaled</a>, to avoid that one feature overpowers the others, and pre-processed to be more meaningful for classification.</p><p><em>Feature engineering</em> is an occult craft in its own right, and can often be the key determining success factor of a machine learning project. Having too many features, or not having a representative data set that covers most of the permutations of those features, can lead to <a href="https://machinelearningmastery.com/overfitting-and-underfitting-with-machine-learning-algorithms/">overfitting or underfitting</a>. Even with the help of the most skilled data scientist, you are still at the mercy of the quality of the data you have available. These techniques are not immune to the <a href="https://towardsdatascience.com/curse-of-dimensionality-2092410f3d27">curse of dimensionality</a> either, and as the number of input features increases, the higher the risk of an invalid solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3DtFG59Nuenx140V" /><figcaption>A Data Scientist sifting for Features — Photo by <a href="https://unsplash.com/@art_maltsev?utm_source=medium&amp;utm_medium=referral">Artem Maltsev</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Data driven algorithms implicitly assume that the model of the world they are capturing is relatively stable. This makes them very effective for problems where the rules of the game are not changing significantly, or changing at a rate that is slow enough to allow sufficient new data samples to be collected for retraining and adaptation to the new reality. Image recognition is the textbook success story, because <a href="https://itunes.apple.com/us/app/not-hotdog/id1212457521?mt=8">hot dogs will most likely still look the same</a> a year from now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2dH1TyTs8_YLnoha.png" /><figcaption>Photo by HBO / Twitter.com/TechatBloomberg</figcaption></figure><h3>So what should you choose?</h3><p>Choosing the right algorithm is very dependent on the problem you are trying to solve. It is becoming very commonplace that a technique is chosen for the wrong reasons, often due to hype surrounding that technique, or the lack of awareness of the broader landscape of A.I. algorithms. <em>When the tool you have is a hammer, everything starts to look like a nail.</em></p><p>As A.I. proliferates into every aspect of our lives, and requirements become more sophisticated, it is also highly probable that an application will need more than one of these techniques. Noisy data that is gathered through sensors might be processed through an ANN to infer the discrete information about the environment, while a symbolic algorithm uses that information to search the space of possible actions that can lead to some goal at a more abstract logical level.</p><p>A machine learning algorithm could be very effective at inferring the surroundings of an autonomous vehicle within a certain level of probability, but that chance of error is not acceptable if it could make it drive off a cliff, just because that scenario was never captured properly in the sample training data. Furthermore, bringing deep learning to mission critical applications is proving to be challenging, especially when <a href="https://arxiv.org/pdf/1811.11553.pdf">a motor scooter gets confused for a parachute</a> just because it was toppled over.</p><p>Overlaying a symbolic constraint system ensures that what is logically obvious is still enforced, even if the underlying deep learning layer says otherwise due to some statistical bias or <a href="https://www.heraldnet.com/nation-world/not-just-the-737-angle-of-attack-sensors-have-had-problems/">noisy sensor readings</a>. This is becoming increasingly important for high risk applications, like managing power stations, dispatching trains, autopilot systems, and space applications. The implications of misclassification in such systems are much more serious than <a href="https://medium.com/@Hector_27685/netflix-recommendations-are-broken-theres-an-alternative-58d2ab435488">recommending the wrong movie</a>.</p><p>A hybrid system that makes use of both <em>connectionist</em> and <em>symbolic</em> algorithms will capitalise on the strengths of both while counteracting the weaknesses of each other. The limits of using one technique in isolation <a href="https://arxiv.org/abs/1801.00631">are already being identified</a>, and latest research has started to show that <a href="https://www.technologyreview.com/s/613270/two-rival-ai-approaches-combine-to-let-machines-learn-about-the-world-like-a-child/">combining both approaches can lead to a more <em>intelligent </em>solution</a>.</p><p><a href="https://www.linkedin.com/in/josefbajada/"><em>Josef Bajada</em></a><em> has a Ph.D. in Computer Science specialising in A.I. techniques for planning and scheduling. He works as a technology consultant developing A.I. solutions for logistics and oilfield technology applications. Any opinions expressed in the above article are purely his own, and are not necessarily the view of any of the affiliated organisations.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cf6b656927" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/symbolic-vs-connectionist-a-i-8cf6b656927">Symbolic vs Connectionist A.I.</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[A.I. Demilitarisation Won’t Happen]]></title>
            <link>https://medium.com/data-science/a-i-demilitarisation-wont-happen-92bcf6d4bc7d?source=rss-f6eec6b1f814------2</link>
            <guid isPermaLink="false">https://medium.com/p/92bcf6d4bc7d</guid>
            <category><![CDATA[military]]></category>
            <category><![CDATA[autonomous-weapons]]></category>
            <category><![CDATA[game-theory]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Josef Bajada]]></dc:creator>
            <pubDate>Mon, 21 Jan 2019 10:35:58 GMT</pubDate>
            <atom:updated>2019-01-23T21:55:39.301Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Artificial Intelligence is already being integrated in next-generation defence systems, and its demilitarisation is highly unlikely. Restricting it from military use is probably anyway not the smartest strategy to pursue.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c4Mx2_GEVEXjnU3g.jpg" /><figcaption>Photo by <a href="http://www.photokralik.cz/">Rostislav Kralik</a> on <a href="https://www.publicdomainpictures.net/en/view-image.php?image=107453&amp;picture=terminator">Public Domain Pictures</a></figcaption></figure><p>This year’s World Economic Forum’s annual meeting is about to start. While browsing through this year’s agenda, I couldn’t help but recall last year’s interview with Google’s CEO, Sundai Pichai, who was quite forthcoming and optimistic about how he envisages A.I. to <a href="https://www.weforum.org/agenda/2018/01/google-ceo-ai-will-be-bigger-than-electricity-or-fire/">change the fundamental ways of how humanity operates</a>.</p><p>Indeed, the automation of thinking processes, combined with high speed communication networks, instant availability of data, and powerful computation resources, has the potential to affect all mechanisms of society. A.I. will play a key role in the decision making, day-to-day running and automation of health, education, energy provision, law enforcement, economics, and governance, to name just a few.</p><p>Like most other innovations, each technology advancement can be misused for evil purposes, and A.I. is no different. What scares most people is its elusive nature, being such a broad field, and playing a central role in so many science fiction plots that <a href="https://mashable.com/2018/01/12/black-mirror-ai-ethics-opinion/">don’t end quite well</a>.</p><p>In his interview, Sundai tried to quell such concerns by proposing that countries should <em>demilitarise</em><strong> </strong>A.I. Of course, one should take such comments in context. But expecting such a thing from <em>all </em>countries is like expecting mankind to stop doing war altogether.</p><p>The reason I emphasise <em>all</em>, is because it just takes one country to create an imbalance. What if North Korea decides to integrate A.I. in its ICBMs for high precision autonomous guidance? Is it realistic to expect the U.S. to refrain from doing the same to counteract such threats? It is <a href="https://en.wikipedia.org/wiki/Mutual_assured_destruction">Mutual Assured Destruction</a> all over again.</p><p>In such a situation you can only achieve a <a href="https://en.wikipedia.org/wiki/Nash_equilibrium">nash equilibrium</a> if both parties <em>have more to lose</em> when they adopt a more aggressive <em>dominant </em>strategy and the opponent retaliates. One would expect the CEO of one of the world’s largest A.I. focused companies to be at least aware of such a fundamental concept of Game Theory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/0*K4dlTt4HMapgFtUB.jpg" /><figcaption>Photo Credits <a href="https://commons.wikimedia.org/wiki/File:Cold-war-2-investwithalex.jpg">Wikimedia Commons</a></figcaption></figure><p>But of course Sundai is fully aware of this. His utopic vision of a harmonious inter-country peaceful collaboration for the application of A.I. is just playing to the tune of his employer’s agenda. Ironically, this took place at the start of the same year when its <a href="https://gizmodo.com/google-removes-nearly-all-mentions-of-dont-be-evil-from-1826153393">“don’t do evil” motto was removed</a>, its own <a href="https://gizmodo.com/google-employees-resign-in-protest-against-pentagon-con-1825729300">employees walked out in protest over its participation in military projects</a>, and people started to get seriously concerned about the availability and misuse of their private information such as <a href="https://www.theverge.com/2018/7/3/17533108/google-gmail-privacy-read-email-messages-response">emails</a> and <a href="https://www.cnet.com/news/google-sued-over-keeping-location-data-amid-privacy-concerns/">mobile phone data</a>.</p><p>Maintaining a balance of power on opposing sides is already a good enough reason not to impose restraints on one side, without any concrete guarantees that the other side is actually doing the same. But here are some more reasons why A.I. demilitarisation will not happen, and why we probably do not really want it to happen in the first place.</p><h3><strong>Funding</strong></h3><p>Defence budgets drive a lot of research and innovation in western countries where having a strong military capability is considered critical. They don’t just fund the construction of missiles and stealth fighters. They support the development of ideas that often do not yet have any commercial business model yet, but are still worth having before <em>competing</em> nations do. Of course it is more likely that ideas with clear military application get funded from defence budgets. But technologies such as the Internet (originally <a href="https://en.wikipedia.org/wiki/ARPANET">ARPANET</a>) and the <a href="https://en.wikipedia.org/wiki/Global_Positioning_System">Global Positioning System</a> started as defence projects and eventually got released to the public.</p><p>Autonomous vehicles may have become more popular due to Google’s self-driving car project (now <a href="https://waymo.com/">Waymo</a>), but in actual fact this was the result of a <a href="https://www.darpa.mil/about-us/timeline/-grand-challenge-for-autonomous-vehicles">grand challenge</a> by the US Defense Advance Research Projects Agency (DARPA). Google then recruited people from the team that won the 2005 challenge. DARPA also held a <a href="https://www.darpa.mil/program/darpa-robotics-challenge">robotics challenge</a>, with the objective of developing humanoid robots that are capable of performing dangerous tasks in environments that are too harmful for humans. One only needs to recall the Chernobyl and Fukushima disasters, and the consequences of <a href="http://edition.cnn.com/2011/WORLD/asiapcf/05/31/japan.nuclear.suicide/index.html">people working in radioactive environments</a> to deal with their aftermath, to realise how useful such a technology could be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*udFAvjxl3teBkxPV.jpg" /><figcaption>JPL’s RoboSimian at the DARPA Robotics Challenge</figcaption></figure><p><a href="https://www.darpa.mil/news-events/artificial-intelligence-colloquium">DARPA takes A.I. very seriously</a>, and similarly other defence organisations such as <a href="https://www.baesystems.com/en/cybersecurity/about-us/ai-labs">BAE Systems</a> and <a href="https://www.thalesgroup.com/en/group/press-release/thales-demonstrates-critical-role-artificial-intelligence-decisive-moments">Thales</a>. Expecting the military to fold its hand and distance itself from A.I. is plain unrealistic.</p><h3>A.I. Can Reduce Casualties (on both sides)</h3><p>One of the main concerns about the use of A.I. in the military is the development of <a href="https://www.stopkillerrobots.org/">killer robots</a>. This is a legitimate concern that needs to be addressed through the right policies and treaties, although I doubt that if the technology components were available, any country would publicly admit to having autonomous weapons (until it is constrained to bring them out and use them). Furthermore, if it <a href="https://www.abc.net.au/news/2018-11-09/china-recruits-talented-teens-to-help-develop-ai-weapons/10477098">becomes possible for one nation to obtain such a technology</a>, it is probably a very bad idea to leave the playing field unbalanced.</p><p>Given that <a href="https://www.theverge.com/2018/11/27/18114362/ai-artificial-general-intelligence-when-achieved-martin-ford-book">Artificial General Intelligence is still very far off</a>, and a “Terminator-style” killer robot is unlikely, maybe we should focus more on the immediate benefits of A.I., such as <a href="https://www.afcea.org/content/ai-will-reboot-armys-battlefield">Battlefield Intelligence</a>. What if a <a href="https://www.researchgate.net/publication/258716091_Soldier-worn_augmented_reality_system_for_tactical_icon_visualization">soldier’s visor was equipped with augmented reality</a> that uses A.I. to identify friend from foe, or civilian from threat, more accurately than an adrenaline pumped human fearing for his life? <a href="https://www.army-technology.com/features/driverless-vehicles-military/">Autonomous armoured vehicles</a> can be used for high risk missions, like delivering supplies through a hostile route, or extracting casualties from an active combat zone. Robots could accompany soldiers and <a href="https://www.marines.mil/News/News-Display/Article/617688/four-legged-robot-runs-toward-potential-future-with-marine-infantry/">assist them in investigating threats</a> or carrying heavy equipment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a9d0A34oNRiGDn1G.JPG" /><figcaption>Photo by<a href="https://www.marines.mil/Photos/igphoto/2001291268/"> Sgt. Eric Keenan</a></figcaption></figure><p>What if missile guidance systems were equipped with on-board algorithms that verified their targets before detonation? “Surgical strikes” would just hit their intended targets, instead of causing <a href="https://www.theguardian.com/us-news/2014/nov/24/-sp-us-drone-strikes-kill-1147">collateral damage and innocent civilian deaths</a>. What about smarter air defence systems that make use of A.I. to track and intercept incoming airborne threats, or even <a href="https://www.reuters.com/article/us-usa-pentagon-missiles-ai-insight/deep-in-the-pentagon-a-secret-ai-program-to-find-hidden-nuclear-missiles-idUSKCN1J114J">detect them before they are actually launched</a>?</p><h3>A.I. is not Well Defined</h3><p>Most A.I. techniques involve crunching data streams, applying mathematical techniques such as calculus, probability and statistics, and putting them together using a handful of algorithms to arrive to a solution. <a href="https://towardsdatascience.com/https-medium-com-josef-bajada-demystifying-artificial-intelligence-6f5f7a8dd1b0">There is nothing really cognitive, sentient or self-aware going on</a>.</p><p>Unlike nuclear weapons, where you can clearly determine whether a country has stockpiles or not (assuming you can find them), there is no clear way to classify the software technology that is integrated in the various defence systems. Furthermore, one can’t really expect the military to refrain from using the data and computing resources it has available to obtain faster, smarter, and machine-verified decision support, while the <a href="https://hackernoon.com/how-artificial-intelligence-ai-is-transforming-mobile-technology-9f810d734d35">general public has it at their finger tips</a>. A.I. demilitarisation is just not happening.</p><p><a href="https://www.linkedin.com/in/josefbajada/"><em>Josef Bajada</em></a><em> has a Ph.D. in Computer Science specialising in A.I. techniques for planning and scheduling. He works as a technology consultant developing A.I. solutions for logistics and oilfield technology applications. Any opinions expressed in the above article are purely his own, and are not necessarily the view of any of the affiliated organisations.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92bcf6d4bc7d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/a-i-demilitarisation-wont-happen-92bcf6d4bc7d">A.I. Demilitarisation Won’t Happen</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[Artificial Intelligence Demystified]]></title>
            <link>https://medium.com/data-science/https-medium-com-josef-bajada-demystifying-artificial-intelligence-6f5f7a8dd1b0?source=rss-f6eec6b1f814------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f5f7a8dd1b0</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Josef Bajada]]></dc:creator>
            <pubDate>Fri, 04 Jan 2019 15:40:54 GMT</pubDate>
            <atom:updated>2019-01-05T16:30:39.152Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A.I. is this year’s buzzword of choice across the Tech industry, and speculation about what this field can achieve is already running rife. Let’s separate fact from fiction and make some sense of all the hype.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dZdrF2WuBR956RFI" /><figcaption>Photo by <a href="https://unsplash.com/@rocknrollmonkey?utm_source=medium&amp;utm_medium=referral">Rock&#39;n Roll Monkey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As we start the new year, the Tech propaganda machine is already ramping up its next generation of buzzwords, promising paradigm shifts and silver bullets that will make whole industries obsolete, enable huge efficiency gains, and make the world a better place. Blockchain, which used to top keyword search trends and social media posts, suffered a significant <a href="https://trends.google.com/trends/explore?date=2018-01-01%202018-12-31&amp;q=blockchain">decline in interest</a>, partly due to the fact that its initial hype was residual from the Bitcoin bubble. It seems that this year’s buzzword of choice is going to be <em>Artificial Intelligence</em>.</p><p>It is the new gravy train, and everyone is jumping on the band wagon out of the usual fear of missing out. On the other hand, some very prominent people have been <a href="https://en.wikipedia.org/wiki/Open_Letter_on_Artificial_Intelligence">voicing out serious concerns</a> about the risks of mass proliferation of A.I. in society, leading to a lot of misconceptions, speculation, and also seriously plausible concerns.</p><p>The number of people asking me to help them make sense of all this has been on the increase. Here is a list of frequently asked questions, and my opinionated answer to them.</p><h3>Is A.I. some new technology?</h3><p>No. Artificial Intelligence has been around for decades. Ever since the first computers were built, researchers have speculated on how the fast computational abilities of these machines could be used to automate the various <em>intelligent</em> traits of the human mind. A.I. is not even a technology per se, it is an academic sub-field of Computer Science that brings in various numerical techniques, such as calculus, probability, statistics and linear programming.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ah9gBiXstI85PIsz" /><figcaption>Photo by <a href="https://unsplash.com/@antoine1003?utm_source=medium&amp;utm_medium=referral">Antoine Dautry</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A.I. actually went through long periods of unpopularity, often referred to as the <a href="https://en.wikipedia.org/wiki/AI_winter">A.I. Winter</a>, due to over ambitious promises. The current hype could indeed lead to a similar situation.</p><p>It regained popularity in recent years with successes that made it to mainstream media, such as <a href="https://en.wikipedia.org/wiki/Self-driving_car">autonomous vehicles</a> and Deep Mind’s <a href="https://deepmind.com/research/alphago/">AlphaGo beating a human champion player at the game of Go</a>. A.I. had made similar media hits in 1997, when IBM’s <a href="https://en.wikipedia.org/wiki/Deep_Blue_(chess_computer)">Deep Blue beat chess champion Garry Kasparov</a> (even though <a href="https://en.chessbase.com/post/deep-blue-s-cheating-move">he accused IBM of cheating</a>), and in 2011, when <a href="https://www.techrepublic.com/article/ibm-watson-the-inside-story-of-how-the-jeopardy-winning-supercomputer-was-born-and-what-it-wants-to-do-next/">Watson won against two champions in Jeopardy</a>.</p><h3>But isn’t A.I. advancing at an exponential rate?</h3><p>Well, yes and no. The core A.I. techniques are not. All you have to do is look at serious journals and research conferences. Algorithmic advances have been steady but slow over the past few decades. The algorithms that are making most noise in the media are just fine-tuned flavours of techniques developed back in the 50s and 60s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*JmnFJnWWglYufBPG.jpg" /><figcaption>EDSAC, one of the first general purpose computers.</figcaption></figure><p>What did change, however, is the technological environment within which these algorithms are now operating. For example, <a href="https://en.wikipedia.org/wiki/Artificial_neural_network"><em>Artificial Neural Networks</em></a><em> </em>were ahead of their time when they were initially conceived, and were limited in their scope of application due to lack of data availability. Nowadays, an SSD memory chip, measuring less than half the size of a credit card, can hold terabytes of data. Processors are much faster and can be found virtually in everyone’s pocket. Massive data sets are available online and cloud-based infrastructure provides on-demand computational resources. Sensors are cheap and embedded in almost every mobile device or smart watch, and high speed wireless broadband networks cover most developed or developing countries enabling real-time data transfer. This has made hundreds of applications possible, from <a href="https://www.igismap.com/know-live-congestion-or-future-traffic-on-google-map-desktop-and-mobile/">forecasting road traffic</a> to <a href="https://datafloq.com/read/how-analytics-can-take-wearables-to-the-next-level/2037">predictive health analytics</a>.</p><p>As more data sets and real-time data streams become available, and algorithms are fine-tuned to process this data, we are bound to see numerous new applications in a variety of fields over the next few years.</p><h3>Why is it called Artificial Intelligence?</h3><p>It is believed that the term <em>Artificial Intelligence</em> was coined way back in 1955, when a <a href="https://en.wikipedia.org/wiki/Dartmouth_workshop">cross-disciplinary workshop</a> was proposed, which took place the following year. Its purpose was to bring various experts from different fields together and propose different ways to simulate human thinking.</p><p>Where A.I. stands out from the broader field of Computer Science is that it tries to tackle problems which are known to be very hard to solve computationally, or sometimes even to model in a traditional way. This could be either due to sheer <a href="https://en.wikipedia.org/wiki/Combinatorial_explosion">combinatorial explosion</a>, <a href="https://en.wikipedia.org/wiki/Partially_observable_system">missing information</a>, or ambiguity in the input signals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G0eSnXURj__YnRdG" /><figcaption>Photo by <a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;utm_medium=referral">Olav Ahrens Røtne</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Humans (and also animals) seem to have a natural disposition to solve such problems, which we attribute to <em>intelligence. </em>It is in fact the result of a combination of genetic pre-programming, acquired skills, knowledge, experience, contextual information, out-of-band clues, reasoning abilities, and sometimes mere <em>intuition</em>. For instance, we seem to have a natural ability to recognise faces, and we understand language, despite its ambiguities, much more effectively than computers.</p><h3>Is A.I. and Machine Learning the same?</h3><p>No! It is actually frustrating when supposedly field experts use both terms interchangeably. Machine Learning is just a subset of algorithms from a very broad field of A.I. techniques.</p><p>You only need to look at the de facto standard textbook, <a href="http://aima.cs.berkeley.edu/contents.html">Artificial Intelligence: A Modern Approach</a>, to see that it covers numerous other topics, such as search-based problem solving and constraint satisfaction, knowledge-based reasoning, planning, probabilistic reasoning, and natural language processing. Each set of techniques is effective for certain kinds of problems and ineffective for others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*mfj0wE-FgJ87sEuL" /><figcaption>The de-facto standard A.I. textbook.</figcaption></figure><p>Techniques that take some domain model as input and make use of search and logical reasoning are categorised as <em>Symbolic A.I</em>. On the other hand, techniques that make use of input and sample output data to infer the world model are categorised as <em>Connectionist A.I., </em>derived from the fact that such algorithms depend on networks of connected nodes, such as the neurons of an Artificial Neural Network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*GzymXN8RnGHb_KNd.png" /><figcaption>An Artificial Neural Network.</figcaption></figure><p>While Connectionist A.I. seems to be getting all the media hype, the truth is that real-world applications often need a hybrid solution. Even AlphaGo Zero, which is a primary example of <em>deep learning</em> success, <a href="https://medium.com/@jonathan_hui/monte-carlo-tree-search-mcts-in-alphago-zero-8a403588276a">makes use of search</a> (Monte-Carlo Tree Search) and <a href="https://deepmind.com/blog/alphago-zero-learning-scratch/">reinforcement learning</a> to find the best move out of thousands of possible ones.</p><h3>What is Deep Learning?</h3><p>A.I. seems to have a fond affection for the term <em>deep</em>. IBM’s chess playing computer was called Deep Blue. It’s original name was actually Deep Thought, probably paying homage to the <a href="https://en.wikipedia.org/wiki/List_of_minor_The_Hitchhiker%27s_Guide_to_the_Galaxy_characters#Deep_Thought">fictional computer in “The Hitchiker’s Guide to the Galaxy”</a>. The software used by Watson to win at Jeopardy was called <a href="https://researcher.watson.ibm.com/researcher/view_group.php?id=2099">DeepQA</a>, and the company behind AlphaGo is called Deep Mind (acquired by Google in 2014). So no wonder that the term <em>deep learning</em> carries more marketing connotations than any strong technical significance.</p><p>Deep learning is mostly associated with a specific flavour of configurations of Artificial Neural Networks, consisting of hidden processing layers that capture multiple levels of feature abstraction, and enable richer non-linear classification capabilities. Deep neural networks have been particularly successful in image recognition and problems where the inputs are <em>bitmaps</em>.</p><h3>So can machines really learn?</h3><p><strong>Machine Learning is very different from human learning.</strong> Supervised machine learning often involves some kind of <a href="https://en.wikipedia.org/wiki/Regression_analysis">regression</a> mechanism, which adjusts the parameters of a mathematical model to fit a training data set. A more accurate name for it would have been <em>automated model fitting, </em>but it wouldn’t have sounded cool enough to attract the same level of investment and innovation interest.</p><p>What the machine is actually <em>learning </em>is the best mathematical model that fits the data with the least amount of error across the training data points. It is not assimilating any knowledge, not understanding concepts, and not acquiring any skills in the sense that humans do. Computers are still the same dumb machines that do exactly as told, and in this respect <a href="https://www.cnet.com/g00/news/ai-is-very-stupid-says-google-ai-leader-compared-to-humans/?i10c.ua=1&amp;i10c.encReferrer=&amp;i10c.dv=11">“A.I. is currently very, very stupid”</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*idfSlfMilI57Lc3f" /><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><p><em>Reinforcement learning</em> works by rewarding good actions and penalising bad ones. In a certain sense it is somewhat similar to how humans acquire certain motor skills, or adjust their behaviour to be more socially acceptable, by trial and error. This kind of machine learning had some interesting success stories, such as Stanford’s <a href="http://heli.stanford.edu/">autonomous helicopter control</a>. But it is still a process that finds the best fitting solution for the scenarios it encounters.</p><h3>Is A.I. really everywhere?</h3><p>Yes, but it depends on what you consider to be <em>intelligent</em>. When you switch on Netflix or browse Amazon’s products, a recommender system uses a machine learning algorithm to analyse your profile, match it with other users, and suggest items that have a high probability of being relevant to you. Search engines like Google have been applying natural language processing techniques for years, and personal assistants like Siri, Cortana and Alexa take that to another level with speech recognition. Facebook uses face recognition to help you tag people in pictures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0pxGFSMUO9rbTrRD" /><figcaption>Photo by <a href="https://unsplash.com/@ptrc?utm_source=medium&amp;utm_medium=referral">Piotr Cichosz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When you enable location services on your smart phone, Google will collect all the information around you, such as GPS coordinates, cellular information and WiFi hotspots, to train its own models and not only improve the positioning accuracy for other users, but also predict how busy that place will be at different times of the day.</p><p>Probably you have been using simpler A.I. components for longer than you think. Appliances like air conditioners, washing machines and cameras have been using <a href="https://en.wikipedia.org/wiki/Fuzzy_logic">fuzzy logic</a> controllers for ages.</p><h3>Is an A.I. revolution inevitable?</h3><p>Yes. It is already happening, and it will go as fast as research and technological innovation allows it to. It is not only inevitable, but in my opinion, our only hope to progress further as a species without going to war, if we want to maintain and improve our standard of living.</p><p>A.I. is another level of automation just like the various industrial revolutions before it. We cannot keep moving factories to cheaper manufacturing countries to keep the cost of production down. Eventually those countries will develop their economy, improve their infrastructure and standard of living, and become costlier. If we want this modern day slavery to end while still satisfying our needs for consumer products at affordable prices, we need to think of smarter ways to automate our manufacturing processes. China is <a href="https://www.scmp.com/tech/article/2166177/made-china-2025-china-has-competitive-ai-game-plan-success-will-need">already leading the race</a>.</p><p>Hazardous jobs also need to be heavily automated. Activities such as mining and drilling for oil and gas are high risk operations that cost lives and have a huge environmental impact when things go wrong. A machine not only performs things more consistently without human error, but can be simply abandoned if the site needs to be sealed off. As we speak, <a href="https://www.bbc.com/news/world-asia-india-46734451">15 men have been trapped in a coal mine in India for the past 3 weeks</a>. A.I. will also make deep space exploration and satellite maintenance easier, and in the more distant future, help in commercial space activities such as lunar and asteroid mining.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V9JemlQYUljN3DUf" /><figcaption>Photo by <a href="https://unsplash.com/@nasa?utm_source=medium&amp;utm_medium=referral">NASA</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A.I. will also have a direct positive impact on the way we live. Autonomous vehicles could revolutionise the way we currently do personal transport. You would not need to own a car, because you would be able to book the one you need and have it pick you up from your front door within a few minutes. <a href="https://www.forbes.com/sites/davidsilver/2018/11/03/uber-will-resume-self-driving-car-testing-in-pennsylvania/#71096e433d7e">Once the technology is mature enough</a>, the number of traffic accidents should reduce drastically, eliminating drunk driving casualties and fatalities caused by human error. The time wasted looking for a parking space during busy hours would also be saved.</p><p>A <a href="https://tricorder.xprize.org/prizes/tricorder">personal healthcare assistant</a> device could be available at your home, ready to check all the vital indicators, analyse symptoms, and deduce the most probable cause. You won’t need to wake up your GP in the middle of the night because your child fell sick, or wait till morning to diagnose the illness, get a prescription, and queue at the pharmacy to get some badly needed medicine. Such a device would have access to a wider central database of symptoms and causes, and could even analyse recent trends and identify outbreaks of infections in specific geographic areas. It could generate the prescription for you, with a unique QR code that could be used to redeem medicine from a 24/7 automated dispenser, or even get it delivered to you by the pharmacy’s drone. The patient’s vitals, ailments and treatment history are then recorded automatically for future reference (on a blockchain of course).</p><h3>Are we going to face a robot uprising?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9bJGFGH42K3Dy4ZG" /><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><p>You can’t blame anyone for asking this question, especially after the charades some governments and sham technology conferences are trying to pull off with <a href="https://www.theverge.com/2017/10/30/16552006/robot-rights-citizenship-saudi-arabia-sophia">a puppet called Sophia</a>. However, the answer to this is <strong>not any time soon</strong>.</p><p>While all the recent advancements would make one think that progress is so fast, that some dystopian future where robots will control our lives and turn against us is imminent, this couldn’t be further from the truth.</p><p>The A.I. algorithms we have so far are very simplistic and are just focused on the one task they are designed or <em>trained</em> to do. An autonomous vehicle just knows how to drive from point <em>a</em> to point <em>b</em> with the kinds of roads, obstacles and surrounding environment it was designed to handle. Change a couple of rules of Go, or simply change the <a href="https://en.wikipedia.org/wiki/Go_equipment#Board">board’s grid size</a>, and you will probably need to retrain AlphaGo for the new configuration (which takes hours).</p><p>We are very far from <a href="https://en.wikipedia.org/wiki/Artificial_general_intelligence">Artificial General Intelligence</a>, where robots reason, adapt, and behave in an autonomous self-fulfilling way as humans or animals do. For robots to even ponder taking over society, they not only need to have the problem solving skills, but they also need to have <em>initiative</em>. They need to have some sort of central consciousness, self-awareness, and free will to “wake up” one day and decide to take matters in their own robotic hands. We have very little understanding about how these processes work in our own mind, and while not impossible to solve (nature managed to achieve it through millions of years of evolution), it has been <a href="https://www.psychologytoday.com/us/blog/the-superhuman-mind/201303/what-is-consciousness">one of the most challenging questions of cognitive science</a>. As Prof. Andrew Ng puts it, worrying about this is like <a href="https://www.theregister.co.uk/2015/03/19/andrew_ng_baidu_ai/">“worrying about overpopulation on Mars”</a>.</p><p><strong>This does not mean that A.I. proliferation does not bring any threats.</strong></p><p>The availability of so much data about each individual could fall in the wrong hands, <a href="https://www.cnbc.com/2018/12/19/facebook-gave-amazon-microsoft-netflix-special-access-to-data-nyt.html">intentionally</a> or <a href="https://www.nytimes.com/2018/09/28/technology/facebook-hack-data-breach.html">unintentionally</a>. In the best case it would be used for commercial reasons like targeted advertising. But in the worst case it could heavily impinge on the privacy and freedom of an individual. We could end up in a situation where companies and governments know literally everything about each individual, from who they talk to on social media to where they like to have lunch every day. <a href="https://en.wikipedia.org/wiki/Social_Credit_System">Citizens could be profiled</a> and preemptively classified as potential criminals before they even do anything wrong. Your data could end up on the black market, due to a <a href="https://www.dw.com/en/angela-merkel-and-hundreds-of-german-politicians-hacked/a-46955419">security breach</a>, and used to impersonate you, taint your reputation, or for blackmail.</p><p>Some jobs will obviously be displaced or become redundant. This is nothing new, and comes with all forms of automation that mankind managed to achieve. Horse-drawn coaches were replaced by cars, and people working on assembly lines were replaced by robotic arms. What makes A.I. different is its broad impact on a wide range of jobs at all levels of society.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*g_uE0Pd0kWagqIRR" /><figcaption>Photo by <a href="https://unsplash.com/@franki?utm_source=medium&amp;utm_medium=referral">Franki Chamaki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Wherever the job depends on data or prior knowledge, there is a good probability that A.I. can do better, because it will have access to larger more comprehensive databases, can process data faster, and is not subject to human error. Wherever the job requires repetition, control, or constant attention, like driving a car, train dispatching, or air traffic control, A.I. will be much more efficient and orders of magnitude less accident prone. New jobs will be created, the education system will adapt to create less of the redundant jobs, and society will ultimately adjust, but the transition will be painful.</p><p>There are also ethical issues that come with uncovering humanity’s darkest innate secrets. Powerful data analysis techniques can be used to analyse DNA patterns and relationships between genes. An individual’s traits, strengths and weaknesses can be predicted. Techniques like <a href="https://en.wikipedia.org/wiki/Polygenic_score">polygenic scoring</a>, could lead to a society where individuals are pre-assigned their role at birth, or even worse, reopen arguments about race superiority. When combined with other advances in <a href="https://en.wikipedia.org/wiki/CRISPR">DNA sequencing and editing technologies</a>, it could help eliminate genetic disorders, but could also lead to a world where an <a href="https://www.newscientist.com/article/mg24032041-800-new-techniques-may-soon-make-designer-babies-a-reality-are-we-ready/">offspring is designed according to the preferences of the parents</a>, or even worse, according to what the government deems most “necessary” for society.</p><p><a href="https://www.linkedin.com/in/josefbajada/"><em>Josef Bajada</em></a><em> has a Ph.D. in Computer Science specialising in A.I. techniques for planning and scheduling. He works as a technology consultant developing A.I. solutions for logistics and oilfield technology applications. Any opinions expressed in the above article are purely his own, and are not necessarily the view of any of the affiliated organisations.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f5f7a8dd1b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/https-medium-com-josef-bajada-demystifying-artificial-intelligence-6f5f7a8dd1b0">Artificial Intelligence Demystified</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>
    </channel>
</rss>