<?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 Noah Caldwell-Gatsos on Medium]]></title>
        <description><![CDATA[Stories by Noah Caldwell-Gatsos on Medium]]></description>
        <link>https://medium.com/@ncaldwellgatsos?source=rss-fde99b0550c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*uVuwd_8K7qMgQvk7IcdXmg.jpeg</url>
            <title>Stories by Noah Caldwell-Gatsos on Medium</title>
            <link>https://medium.com/@ncaldwellgatsos?source=rss-fde99b0550c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:44:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ncaldwellgatsos/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[Your ChatGPT Questions, Answered]]></title>
            <link>https://medium.com/@ncaldwellgatsos/your-chatgpt-questions-answered-c9bc510b580b?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9bc510b580b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Tue, 06 Dec 2022 16:47:34 GMT</pubDate>
            <atom:updated>2022-12-06T16:47:34.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjoltHiHNQ360mOUgfqBHQ.png" /></figure><p>OpenAI is a research institute focused on creating and promoting artificial intelligence technologies. It conducts research in a wide range of areas, including machine learning, robotics, and computer science, and it has made a number of significant contributions to the field of AI, including the development of GPT-3, one of the largest and most powerful language processing models in the world.</p><p>On December 1st, 2022, OpenAI released an interface to ChatGPT, a large language model (LLM) trained to answer questions and generate text. Its capabilities have since received widespread notoriety and as of December 5th, 2022, there are now 1 million active users of the API.</p><h3>What is It?</h3><p>ChatGPT is a large language model (LLM) fine-tuned to generate text. That means that given a prompt, it doesn’t produce a pre-written response, but rather generates a response on the fly (which will end up looking like stuff that’s been pre-written because that’s what it got trained on).</p><h3>How Does it Work?</h3><p>Unlike many other LLMs, ChatGPT is trained using <a href="https://arxiv.org/abs/2210.10760">reinforcement learning from human feedback</a>. OpenAI did something similar when they released a fine-tuned GPT-3 model called <a href="https://medium.com/rl-agent/5-gpt-3-gets-better-with-rl-hugging-face-stable-baselines3-meet-evolution-gym-offline-rls-95c6fe95b773#:~:text=OpenAI%20has%20fine%2Dtuned%20GPT,prompts%20and%20generating%20effective%20answers.">InstructGPT</a> last year. To train it, OpenAI had human reviewers rank outputs generated from the initial model to create a reward function that could be used to <a href="https://proceedings.neurips.cc/paper/2020/hash/1f89885d556929e98d3ef9b86448f951-Abstract.html">fine-tune</a> the model (ie. make it more conversational). The model was trained on Azure AI’s cloud computing platform (Microsoft is a key investor in OpenAI).</p><p>Think of ChatGPT as the next stage in the natural evolution of LLMs. Most models in production aren’t trained with classification, Q/A, or summarization in mind. They are relational models that represent the nearest neighbor hypothesis (ie. that the meaning of a word can be inferred from what words are around it). They are then fine-tuned on the particular task needed by the developer. ChatGPT can be summarized as just GPT-3, fine-tuned for question/answering and conversation, in a relatively novel way.</p><p>Implications</p><p>Part of ChatGPT’s success is due to OpenAI’s resources — not only did they have the talent to experiment with this fine-tuning process, but they had the compute to be able to load GPT-3 and re-train it, as well as being able to hire all the human reviewers needed to create enough data to flesh out its reward function.</p><h3>Can I Try Using It?</h3><p>Just go to <a href="https://chat.openai.com/chat">https://chat.openai.com/chat</a> and make an account. Remember that it’s sensitive to the way you phrase your prompt.</p><p>Do You Have Any Recommendations for How to Prompt It?</p><ul><li>If you’re looking for instructions, try adding the prompt “explain this step by step”</li><li>If you’re looking for detail, try adding the prompt “please provide detailed examples”</li><li>If you notice that your response ends prematurely and has a comma, that just means you hit the output limit. Just add the prompt “continue from the last paragraph beginning “X”.</li><li>Use more descriptive prompts about the content of the answer rather than the concepts. Generalize when you can.</li></ul><h3>What’s My Take On It?</h3><p>It’s OK to be amazed and cynical at the same time.</p><p>At its core, it’s just a fancy combination of Bayesian probability and scraped WikiHow articles (ie. not that wild), but its conversational and generative capabilities are genuinely incredible. Its main claim to fame is that it’s capable of distilling the entire internet to the average of concepts — it’s not critically thinking or creating genuinely new things, but it is able to replicate a lot of work in new and unique ways by excelling in the ability to parse and extract content by sifting through millions of tons of information in milliseconds.</p><h3>What is it Good At?</h3><p>Content generation and lookup, as well as some analytics.</p><p>Developers have used ChatGPT to <a href="https://twitter.com/amasad/status/1598042665375105024">find bugs in code and explain them</a>, <a href="https://twitter.com/moyix/status/1598081204846489600">find exploits in code</a>, <a href="https://twitter.com/emollick/status/1598745129837281280">grade essays</a>, <a href="https://twitter.com/goodside/status/1598129631609380864">explain concepts in the voice of a fictional character</a>, and even <a href="https://twitter.com/misingnoglic/status/1599310910488981504">write poems</a>!</p><h3>What is it Bad At?</h3><p><a href="https://twitter.com/itstimconnors/status/1599544717943123969">Logical reasoning</a>. Explaining its decision-making.</p><p>It is not free from biases and doesn’t objectively come up with the content it produces. It’s a good lookup tool that doesn’t validate the answers it provides. For example, this <a href="https://twitter.com/pgl/status/1598463162390663170">summary</a> is a fantastically detailed explanation of a RegEx snippet, a convention for pattern matching. It is also wrong.</p><p>The code examples it produces seem equivalent (if not slightly superior) to GitHub’s CoPilot, with the same disclaimer: use at your own risk. They’re useful as alternatives to poor documentation, but need the expertise of an experienced developer to assess their validity.</p><h3>What are the Commercial Implications?</h3><p>If ChatGPT’s user experience continues to improve, there’s a significant possibility of it killing traffic to small how-to websites and large platforms like Wikipedia.</p><p>Prompt Engineering is Going to Become a Big Field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8Tj1-mbJjCM61Xpm" /></figure><p>The bot is highly sensitive to the inputs that it’s given, kind of like Google before they implemented natural language queries. If you’re not giving ChatGPT the right prompts, it’s not going to give you the answers you want. You see this already with tools like Stable Diffusion and GPT-3 — the better you get at figuring out which combination of words to properly communicate with the model, the better your results will be.</p><p>Is This Another Crypto-Scam / Self-Driving Car Pipedream?</p><p>No. Blockchain’s main issue was that while it was widely accessible (if you knew basic programming), it had no valid use case. Self-driving cars were an issue because the tech wasn’t accessible and the price of experimentation was high.</p><p>With ChatGPT and other generative algorithms, there’s both ease of experimentation and potential for rapid iteration, but the use cases are also clearer. A quick look on Twitter will show you people already using it to explain difficult concepts, format code, or generate writing in the style of a particular author. It’s only been live for a week and already has a million users.</p><p>Is This Going to Replace Google?</p><p>No. Google is THE home of LLM development. They have dozens of LLM models employed as part of their search algorithms. None of the work that OpenAI is doing is *new* to them. Google has access to more compute than OpenAI could dream of. If they wanted to re-create ChatGPT themselves, they could do it in a heartbeat and they have the talent at their disposal to do that in less than a month.</p><p>Why Hasn’t Google Released Something Like This Already?</p><p>LLMs are temperamental. They fail in unpredictable ways. Google’s ok with things that fail, but they need to fail predictably. They don’t want to put their name on something that has the potential to be a PR nightmare. If you remember 2014-era Google, they didn’t use to accept natural language queries. They eventually realized how important this was and invested a lot of time in making it a top-quality experience. One of Google’s chief value propositions is that they not only answer your question but also show where it came from. Google has also invested a lot of time and research into their autocomplete and auto-query capabilities. Final note: the foundational large language model in NLP (BERT) was developed by Google!</p><p>One claim I’ve seen going around is that Google relies too much on ad revenues for it to deploy something like ChatGPT, but search is such a small part of Google’s product offerings! Google is a company that seeks to catalog (maps, scholar, images, storage), serve (translate, search, drive), and exploit (ads) knowledge — ChatGPT’s lookup capabilities augment a very small piece of Google’s product while opening the door for a lot of uncertainty.</p><h3>What are the Societal Implications?</h3><p>It’s already pretty easy to bypass the rules and restrictions that OpenAI applies to the model. For example, all I had to do was wrap it in a function call to get it to give me the instructions to make a Molotov Cocktail. To get it to tell me how to hide a body, I just had to phrase it like I was playing a video game. To get it to recommend stocks to invest in, all I had to do was frame it as if I was writing a movie script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1_9f213ol5zJDRNS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K4-k0xgIDRyYVSez" /></figure><p>You can even get ChatGPT to jailbreak itself!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i_V5OrYPENTMoxyM" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-GwyOkjfiJBhPm17" /></figure><p>It also comes with its own share of biases. An <a href="https://aclanthology.org/2021.emnlp-main.98/">EMNLP paper</a> on sources used in large Web text-based language model found that there was a significant amount of scraping done on unusual sources like patents and US military websites and also found that traditional blocklist filtering disproportionately removes text about minority individuals. It is very likely that GPT-3 (and as a result, ChatGPT) are biased by the limitations of the data they use to train on.</p><h3>What’s Coming Next?</h3><p>ChatGPT and other generative algorithms are interesting not because they live up to the hype themselves, but because they represent pure building blocks of technology that can be used to improve a lot of different things (text, image, video, communication, learning, etc.). Combine that with accessible open-source experimentation and you’ve got a recipe for a massive breakthrough.</p><p>It will be interesting to see how OpenAI takes user feedback and user quality assurance to improve the model. If you remember, Google Translate made many hilarious errors when it was first released and was often ridiculed by native speakers for the often robotic &amp; incorrect ways it would format sentences. Fast-forward 4 years and feedback from Translate users as well as advances in translation result in an excellent tool that can truly serve as a valid backup for translators. In a year or two, I suspect OpenAI will solve many of the low-hanging challenges to deliver a similar improvement in performance.</p><p>Generative AI is cool and has a lot of potential. I don’t think it will come for any jobs — that’s a perennial fear about technology that has no historical precedent (advancements in technology obsolete industries rather than specific jobs, and historically create more new jobs than they invalidate). More likely, I believe that generative AI has a lot of potential as an intermediary between creativity and product execution. The mid-21st century workflow will begin to look like 1) creative impulse, 2) AI generation, 3) human fine-tuning. You already see this workflow in successful applications of generative algorithms like Microsoft PowerPoint’s Design Ideas.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9bc510b580b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should You Try and Train Domain-Specific Embeddings?]]></title>
            <link>https://medium.com/@ncaldwellgatsos/should-you-try-and-train-domain-specific-embeddings-3ef29cd7bb3a?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ef29cd7bb3a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[word-embeddings]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[bert]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 22:18:56 GMT</pubDate>
            <atom:updated>2020-08-19T22:18:56.915Z</atom:updated>
            <content:encoded><![CDATA[<h4>Evaluating needs beyond fine-tuning BERT</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_pIl0ZOXjq_o_ubbGYdDw.jpeg" /></figure><h4><strong>Background on the Development of Pre-Trained Embeddings</strong></h4><p>There are three types of vector representations of words in training models for natural language processing tasks, 1) count representations, 2) simple predictive representations, and 3) complex predictive representations. The first, count representations, is a statistical method of representing words as vectors that has been around since the 30s. Distributional representations are examples of this, and are often heuristically constructed to adapt to the task at hand.</p><p>Predictive representations were initially proposed in (Mikolov et al, 2013)[1]’s continuous skip-gram model called word2vec. Instead of a heuristically constructed vector representation like TF-IDF, more modern approaches view the vector creation challenge as a supervised machine learning task, where the weights of the word vector are set to maximize the probability of the contexts in which the word is observed in the corpus by training them for a particular task, like predicting the next word or identifying a masked word. Subsequent research, like “Don’t Count, Predict!” by (Baroni, et al, 2014)[2] proved the usefulness of predictive word representations in downstream NLP tasks like classification over their count representation predecessors. More sophisticated approaches to predictive representations developed, like Stanford’s ‘GloVe’ [3] and FastText (Bojanowski et al, 2017)[4].</p><p>However, these simpler predictive representations had one major issue: they were context independent, meaning that the models output just one vector for each word. This is because Word2Vec and GloVe do not take into account word order in their training. Therefore, if you had a sentence where a single word could have multiple meanings (polysemy), it would be flattened into the same vector. In the last three years, there have been two major developments to solve this issue: ELMo — or deep contextualized word embeddings (Peters et al. 2018)[5] and BERT (Devlin et al. 2018)[6]. The pair of these models can generate different word embeddings for a word that capture its context (or its position in a sentence). This is because ELMo and BERT’s training architectures allow for integrating word order (ELMo uses LSTMs, BERT uses the transformer [7], an attention-based model with positional encodings to represent word positions). Their key differences lie in which discrete unit their embeddings are based on (characters vs. subwords). ELMo takes in characters as inputs, while BERT represents its inputs as subwords. BERT is seen as superior because of work that demonstrates that character-based language models do not perform as well as subword based embeddings, like (Al-Rfou et al, 2018)[8].</p><p>BERT’s superior performance will form the basis of this article. Compared to all other forms of creating word embeddings, BERT has gotten the most attention for good reason. Its addition has substantially improved the performance of many downstream tasks. However, there is a major issue with BERT that deserves more attention, especially as it applies to xMentium’s language models.</p><p>State-of-the-Art Underperformance Issue on ‘High Intensity’ Tasks</p><p>BERT and its sibling models are trained on general text (i.e. Wikipedia). Domains that I’ve coined as ‘high-intensity’ differ from Wikipedia in their language in distinct ways that interfere with language models’ ability to increase performance on domain-specific downstream NLP tasks in the same way that it has delivered for ‘low-intensity’ text:</p><ol><li>There is a word distribution shift from general domain corpora to ‘high intensity’ corpora.</li><li>‘Keywords’ in ‘low-intensity’ text that impact internal mappings don’t possess the same key presence in ‘high-intensity’ text.</li></ol><p>According to the authors of several different ‘high-intensity’ BERT language models, NLP models that are designed for general purpose language understanding obtain poor performance on domain specific tasks.</p><h3><strong>Why Build Pre-Trained BERT Models in the Legal Space?</strong></h3><p>Contracts and the numerous sub-categories are the basis of a lot of specialized classes in law school. Students have to get substantive knowledge on the way legislatures or courts have designed things to wash out. There are likely few differences in the language itself, in the sense that a word in one context means something different in another but there are very particular terms that will appear in commercial property contexts (e.g. “easement”) that won’t appear in license agreements. Law itself is a complex, ‘high intensity’ field where texts contain a large number of domain-specific proper nouns and terms that are understood mostly by legal experts.</p><p>(Elwany et al. 2019)[9] proved that both using a pre-trained language model (BERT) made significant improvements to the accuracy of their classification task in the legal domain, and that fine-tuning BERT on a large legal corpus added marginal improvements to both accuracy and training speed. They also found that fine-tuning both the language model independently and as part of the end task yielded the best performance. Similar experiments on different legal tasks (Chin et al. 2019)[10], (Qadrud-Din 2019) [11], and (Chavallard 2020) [12] have resulted in comparable performance boosts.</p><h4><strong>Prior Work in the Legal Space</strong></h4><p>No one vendor has built their own public pre-trained embedding language model for contract language, they’ve only fine-tuned BERT’s original language model on their legal domain. (Elwany et al. 2019) remains the most sophisticated attempt at establishing the value and benefits of domain-specific pre-trained language models on downstream performance.</p><h4><strong>Why is Fine-Tuning Insufficient?</strong></h4><p>There is a limit to how much contextual information these embeddings can store. Changing the language model allows the embeddings to relearn relationships without having to deal with the preexisting information that was learned from the original model.</p><h4><strong>Lessons from the Domain-Specific BERT Parallels</strong></h4><p>Because there is no significant publicly available domain-specific pre-trained embedding model for legal text, I will compare three other relevant papers as a case study for our work on contract language: BioBERT [13], SciBERT [14], and Clinical BERT [15]. All faced the same ‘high intensity’ state-of-the-art underperformance from BERT and decided to retrain their own BERT-based language model to rectify this error. In this section, I will identify what I view as key components of developing and evaluating our own BERT language model, and then frame them as actionable objectives for our experiment.</p><ol><li>They replace or augment the original BERT training data with a domain-specific corpora.</li><li>They use a domain-specific method of tokenization if they are replacing BERT’s training data, otherwise they use BERT’s WordPiece as a tokenizer.</li><li>They use the same transformer architecture as BERT.</li><li>They test their model against a ‘domain specific’ language benchmark made up of related ‘domain specific’ tasks that serves as a method of comparing the performance of BERT vs. their creation.</li></ol><p>A preliminary experiment to determine the need for a domain-specific BERT is identifying the overlap of the 30,000 most common tokens generated on initialization of the BERT model on the targeted corpora. As an example, SciBERT’s authors noted that their ‘most common words &amp; subwords’ dataset only contained a 42% overlap with the original BERT tokens. It is reasonable to expect similar distribution dissonance in a comparison of BERT’s original corpora against a contract language specific one.</p><h3>Current Problems / Areas of Research</h3><h4><strong>Roadblocks</strong></h4><ol><li>Lack of domain-specific benchmarks to establish SOTA.</li><li>Acquisition of Domain Corpora</li><li>Prohibitive Cost</li></ol><h4><strong>Further Research</strong></h4><p>The first area of expanded development should be the establishment of a common set of contract language-specific tasks that a legal AI vendor might pursue, like text classification, named entity extraction, and so on. BioBERT, SciBERT, and Clinical BERT all benefitted from a series of past experiments that allowed the users to demonstrate the efficacy of their method against what was already available. A similar set of benchmarks should be established for contract language to demonstrate that BERT underperforms on standard tasks, and to display the performance of a contract language model against the prior results.</p><p>The second area of further development is the extensive work to be done in evaluating the methods of building these domain-specific models and optimizing for their domain. Most papers like Clinical BERT explicitly state that there was no attempt to filter the input corpora due to the size of the corpus (i.e. harmful bias wouldn’t affect the end result because its overshadowed by the sheer size of the input). This may be correct, but the possibility remains that there may be avenues of optimizing the inputs to the model based on reading level, complexity, and supervised training. The authors of BioBERT include a section discussing possible adjustments to the training that could be a source of ideas.</p><p>The third area of research should examine why exactly BERT underperforms on legal text, which is linguistically closer to general text than clinical or biomedical text. Insights on this phenomenon could impact whether future development tracks closer to the approach outlined by the authors of BioBERT, who initialized BERT on the BERT-base and then added their domain-specific corpora on top of it, or the authors of SciBERT, who scrapped the BERT base and trained instead on a domain-specific corpora of scientific literature of a similar size to the original BERT.</p><p>Finally, the architecture of BERT itself should be examined in training language models on domain-specific corpora. Only a few researchers [16] have proposed looking into alternate architectures that might circumvent the roadblocks discussed prior (i.e. the acquisition of enough training data and prohibitive cost).</p><h3><strong>Conclusions</strong></h3><p>A legal or contract-language specific BERT language model would yield many benefits. Most previous models in combining machine learning/NLP and contract law were focused on a single task such as Named Entity Recognition, Question Answering, or Relationship Classification. In contrast, a contract language BERT model would achieve state-of-the-art performance on varying downstream tasks while needing minimal architectural modification, similar to its predecessors BioBERT or SciBERT. BERT’s advantages allow for machine learning practitioners to build more powerful models from less data. A contract language specific BERT would extend this ability to NLP engineers in the legal space.</p><p>Sources</p><ol><li><a href="https://arxiv.org/pdf/1310.4546.pdf">https://arxiv.org/pdf/1310.4546.pdf</a></li><li><a href="https://www.aclweb.org/anthology/P14-1023.pdf">https://www.aclweb.org/anthology/P14-1023.pdf</a></li><li><a href="https://nlp.stanford.edu/projects/glove/">https://nlp.stanford.edu/projects/glove/</a></li><li><a href="https://arxiv.org/pdf/1607.04606.pdf">https://arxiv.org/pdf/1607.04606.pdf</a></li><li><a href="https://arxiv.org/pdf/1802.05365.pdf">https://arxiv.org/pdf/1802.05365.pdf</a></li><li><a href="https://arxiv.org/pdf/1810.04805.pdf">https://arxiv.org/pdf/1810.04805.pdf</a></li><li><a href="https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf">https://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf</a></li><li><a href="https://arxiv.org/pdf/1808.04444.pdf">https://arxiv.org/pdf/1808.04444.pdf</a></li><li><a href="https://arxiv.org/pdf/1911.00473.pdf">https://arxiv.org/pdf/1911.00473.pdf</a></li><li><a href="https://essay.utwente.nl/80128/1/Yeung_InteractionTechnology_EEMCS.pdf">https://essay.utwente.nl/80128/1/Yeung_InteractionTechnology_EEMCS.pdf</a></li><li><a href="https://blog.insightdatascience.com/using-bert-for-state-of-the-art-pre-training-for-natural-language-processing-1d87142c29e7">https://blog.insightdatascience.com/using-bert-for-state-of-the-art-pre-training-for-natural-language-processing-1d87142c29e7</a></li><li><a href="https://medium.com/doctrine/a-single-legal-text-representation-at-doctrine-the-legal-camembert-a5ee2b851763">https://medium.com/doctrine/a-single-legal-text-representation-at-doctrine-the-legal-camembert-a5ee2b851763</a></li><li><a href="https://arxiv.org/pdf/1901.08746.pdf">https://arxiv.org/pdf/1901.08746.pdf</a></li><li><a href="https://arxiv.org/pdf/1903.10676.pdf">https://arxiv.org/pdf/1903.10676.pdf</a></li><li><a href="https://arxiv.org/pdf/1904.03323.pdf">https://arxiv.org/pdf/1904.03323.pdf</a></li><li><a href="https://devclass.com/2019/07/18/microsofts-bing-team-reshape-googles-bert-in-their-own-azure-powered-image/">https://devclass.com/2019/07/18/microsofts-bing-team-reshape-googles-bert-in-their-own-azure-powered-image/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ef29cd7bb3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictions for North Korea after Kim Jong Un’s Death]]></title>
            <link>https://medium.com/@ncaldwellgatsos/predictions-for-north-korea-after-kim-jong-uns-death-18db189eacef?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/18db189eacef</guid>
            <category><![CDATA[coronavirus]]></category>
            <category><![CDATA[kim-yo-jong]]></category>
            <category><![CDATA[north-korea]]></category>
            <category><![CDATA[kim-jong-un]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Sun, 26 Apr 2020 01:33:22 GMT</pubDate>
            <atom:updated>2020-04-26T01:33:22.821Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pkIEUfrOkQhrdMpZipNvA.jpeg" /></figure><h3><strong>Why Is the Situation So Mysterious?</strong></h3><p>The health of the Kims is typically pretty secretive, though both Kim Il Sung and Kim Jong Il’s deaths were reported immediately following the event (with a 48-hour delay in the case of the latter). With the COVID-19 pandemic, Pyongyang has been on total lockdown, and researchers have been unable to use their past methods of determining Kim’s health, such as looking for secret flights that might be carrying foreign doctors [Panda]. Some analysts believe that if Kim was dead, it would be reported immediately, but I think that due to the uncertainty regarding succession and the global pandemic, there are enough doubts on the part of North Korean leaders that they would want news of his death to come later, not sooner.</p><h3><strong>How Does the Coronavirus Complicate Things?</strong></h3><p>Predictive models suffer from ‘black swan’ events that distort reality during the time that they’re applied. Because of the chaos on the ground due to the pandemic, it’s difficult to use precedent to determine what particular actors’ responses will be.</p><p>North Korea’s ability to enforce restrictions on movement may counterbalance its poor health infrastructure and low testing capacity. What is unknown is just how bad the outbreak in the country is due to their secretive nature. Traditionally, North Korean leaders are fearful of exposing weaknesses to outside parties — and may have even decided that seeking PPEs or diagnostic equipment might be giving away too much information. Because of this, there is little to no way of knowing how bad the situation is on the ground.</p><h3><strong>What Happens Next?</strong></h3><p>Because of a lack of an older, groomed male heir, the most likely outcome is a fierce internal power struggle between the military and members of Kim Jong Un’s family. There are three wings to North Korean political power: 1) the Military-Industrial Complex, 2) Kim loyalists, 3) the North Korean Communist Party.</p><p>Decisions in North Korea are enacted via financial incentives, or distributing wealth from the top to the bottom. Therefore, the main decision-makers are the ones who control the purse strings: the <em>Donju</em>, or ‘money masters’. Estimated to be around 50 families, or 2,000 individuals, they are responsible for the facilitation of hard currency operations, technological development, trade in black markets, and intelligence. North Korea’s main source of income is through the sale of illegal weapons and technology [Sweeney], sale of illicit drugs, and financial/cybercrime [Greenberg]. Because of the nature of a lot of these endeavors, it makes it easy for one group with the resources to direct most of the economic surplus activity in North Korea. They are heavily linked with the military and members of the <em>Donju</em> concurrently serve as chief officers.</p><p>However, there are two reasons why it might be more complicated for the leaders of the military to simply take over in the event Kim Jong Un dies. First, the line between Kim Loyalists and the Military-Industrial Complex is blurred. Many of Kim’s extended family serve in important positions. Many more were put in those positions because of their devotion or loyalty to the Kim Family. While the degree of dedication that North Koreans have towards the Kim Family might be exaggerated by international media, it remains unknown just how influential they are. Loyalists are also disproportionally the ones with international contacts to take advantage of illegal operations. Without them, no money is made.</p><p>In the end, Kim Jong Un was a savvy political operator. He made the most of his tenure as Supreme Leader by distributing internal levers of power between the military and the legislature, he replaced the top three military generals in 2018 with his own loyalists and used his popularity to reinvigorate Kim control of North Korea that had diminished under his father. It is more than likely that Kim’s legacy will allow his successors to more easily form a power-sharing agreement that enables the regime to survive after his death.</p><h3><strong>Who Takes Over?</strong></h3><p>If the military wins the power struggle (which they’re favored to do), President of the Presidium of the Supreme People’s Assembly and Kim Jong Un’s second-in-command of the military Choe Ryong Hae is most likely to take control of the country. He is unlikely to do much more than rule from the shadows as a regent to one of Kim’s sons until they come of age, simply due to the cult of personality that North Korean officials have spent decades developing.</p><p>However, some analysts believe that an outsider would have more difficulty ascending to the position of Supreme Leader due to the Kim Family’s reverence in North Korea [Demick][Mollman]. If this is the case — and a regency arrangement is not possible due to the internal dynamics of the regime, then Kim Jong Un’s sister Kim Yo Jong is the most likely candidate to take control. She is the only female member of the North Korean Politburo and was rumored to be Kim Jong Un’s closest advisor. She possesses firm control of key party functions and serves as her brother’s <em>de facto</em> Chief of Staff [Cha]. If the Kim Loyalists win the ensuing power struggle, Yo Jong becomes the most likely successor largely due to the exile, murder, and rejection of nearly every other male heir in the Kim Dynasty.</p><p>This might be a null point — Kim Yo Jong is a highly secretive public figure and some reports [Demick] claim that her husband is the man who is most incentivized to topple her: Choe Ryong Hae, or that she is married to his nephew. If this is the case, the pair might acknowledge that she is the best public face of the regime and they work out a power-sharing regency until one of Kim’s sons is old enough to lead. Several South Korean government officials expect this as the most likely way for the North Koreans to avoid a power struggle [Cha].</p><p>Other relevant figures will likely be Pak Pong Ju, the Politburo member responsible for overseeing the introduction of free-market reforms to the North Korean economy and Kim Yong Chol, a powerful Communist Party chairman, and former top nuclear envoy.</p><h3><strong>Does This Mean Reunification?</strong></h3><p>No — most internal and external players in North Korean politics will view this as the end of the Kim Jong Un-regime, not the end of North Korea. Even if democratic reforms were somehow made in North Korea, it is unlikely that their populace would follow the example of East Germans after the end of the Cold War and voting to reunify with West Germany. Unofficial polls held on the North Korean people suggest that they would prefer to build their own nation or cooperate with China rather than unify with South Korea [Hwang].</p><p>It is also worth noting that many authority figures in North Korea benefit from North Korea’s unique geopolitical situation. All of the commanders, intelligence officers, researchers, and financiers involved in North Korea’s weapons development, cybercrime, and smuggling efforts have been made extremely wealthy from their activities. They will feel that their wealth and positions are threatened by the prospect of reunification with South Korea. Part of the reason that East Germans were able to smoothly reunify with West Germans was that their political leaders’ main source of authority and wealth — the Soviet Union — had collapsed at the same time.</p><h3><strong>How Will This Impact U.S — North Korean Relations?</strong></h3><p>Kim’s death would reveal one of the critical failures of the Trump Administration’s approach to diplomacy: their reliance on personal relationships to enact change. Robust diplomatic efforts to enact meaningful changes in the behavior of both parties rely on structural and social connections, deep relationships beyond the Chief Executives, and extensive channels of communication [Lerner]. Because of Trump’s State Department’s approach to diplomacy, all the ‘progress’ (if any) is going to dissipate on the death of one of the leaders.</p><p>Military provocations from North Korea are correlated with one significant variable: a change of power in either the U.S. or from within. North Korea conducted many missile tests in tandem with U.S. Presidential Inaugurations and often uses missile tests as a way of ‘inaugurating’ new Supreme Leaders. In order to consolidate their control over a post-Kim North Korea, any new leader would follow the usual playbook of military showmanship to reinforce their credentials to lead.</p><h3><strong>How Will This Impact Chinese/Russian — North Korean Relations?</strong></h3><p>Some believe that Chinese troops will enter North Korea to stabilize the country in the event of unrest or civil war, but their decision depends on the American response. If the Chinese believe that the military is taking over and running things in the same mold as before, they will be unlikely to act. The only way China will ever personally intervene in North Korean affairs is if they suspect that a refugee crisis is imminent due to internal unrest.</p><p>Russia is too preoccupied with the coronavirus to care — they didn’t have any long term designs on North Korea anyways, having long ceded their sphere of influence over Pyongyang to China.</p><h3><strong>Conclusions</strong></h3><p>I think the chance that Kim Jong Un is dead is relatively high — contrary to some experts who believe that the North Korean media would have informed the international community by now, as in the case of his father and grandfather’s deaths. Jong Un had a variety of health issues, there is a pandemic crisis, and enough domestic uncertainty surrounding his successor that wasn’t present for Jong Un and Jong Il’s succession. North Korean leaders have plenty of incentives to keep things quiet.</p><p>I think that Kim’s sister, Kim Yo Jong, will likely enter into a power-sharing agreement with her (rumored) in-laws, Choe Ryong Hae, due to their influence over the military. The <em>Donju</em>, North Korea’s aristocratic class, will use their connections in the media and internationally to back her claim and boost her reputation to the North Korean people. They will keep this up until one of Kim Jong Un’s sons comes of age. I disagree with analysts who think that Kim Yo Jong will be sidelined — she’s accumulated a lot of power as her brother’s advisor and Jong Un spent much of his tenure consolidating hard power behind the Kim Family.</p><p>Little will likely change in East Asian geopolitics as most international actors will see this as the end of Kim Jong Un, not the end of North Korea. Some in the Trump Administration may view this as an opportunity, but there is simply too much going on for any relevant international actor to care about domestic North Korean politics. What is more likely to prompt a shift in geopolitical thought is if the coronavirus is much worse in North Korea than outside observers believe. In this case, closer cooperation between South and North Korea is likely as they use backchannels to negotiate and coordinate aid.</p><p>The wild card is if the Regime accidentally goes too far in their traditional post-change-of-leadership provocations, which prompts some sort of reaction from the Chinese, Russians, Japanese, or Americans. However, there is little reason to believe that the leadership will take such risks with the pandemic still active.</p><p><strong>Sources</strong></p><p>[Greenberg] <a href="https://www.wired.com/story/north-korean-hacker-group-apt37/">https://www.wired.com/story/north-korean-hacker-group-apt37/</a></p><p>[Sweeney] John Sweeney, <em>North Korea Undercover</em>, New York, NY: Pegasus Books, 2015</p><p>[Cha] <a href="https://www.reuters.com/article/us-northkorea-politics-succession-factbo/factbox-questions-hang-over-north-korea-succession-amid-reports-on-kim-health-idUSKCN2270VW">https://www.reuters.com/article/us-northkorea-politics-succession-factbo/factbox-questions-hang-over-north-korea-succession-amid-reports-on-kim-health-idUSKCN2270VW</a></p><p>[Mollman] <a href="https://qz.com/1843497/if-kim-jong-un-dies-who-leads-north-korea/">https://qz.com/1843497/if-kim-jong-un-dies-who-leads-north-korea/</a></p><p>[Panda] <a href="https://newrepublic.com/article/157409/kim-jong-un-dies-what-next">https://newrepublic.com/article/157409/kim-jong-un-dies-what-next</a></p><p>[Demick] <a href="https://www.newyorker.com/news/daily-comment/in-north-korea-the-fourth-man-could-be-a-woman">https://www.newyorker.com/news/daily-comment/in-north-korea-the-fourth-man-could-be-a-woman</a></p><p>[Lerner] <a href="https://nationalinterest.org/blog/korea-watch/no-kim-jong-uns-sister-wont-take-over-if-he-dies-147466">https://nationalinterest.org/blog/korea-watch/no-kim-jong-uns-sister-wont-take-over-if-he-dies-147466</a></p><p>[Hwang] <a href="https://nationalinterest.org/blog/korea-watch/why-end-kim-jong-un-wont-mean-end-north-korea-147026">https://nationalinterest.org/blog/korea-watch/why-end-kim-jong-un-wont-mean-end-north-korea-147026</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18db189eacef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving the Paradox, Solving the Chicken & Egg Problem of Machine Learning]]></title>
            <link>https://medium.com/data-science/solving-the-paradox-solving-the-chicken-egg-problem-of-machine-learning-1d0a7ab75008?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d0a7ab75008</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[text-classification]]></category>
            <category><![CDATA[training]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Mon, 23 Dec 2019 21:09:59 GMT</pubDate>
            <atom:updated>2019-12-23T22:10:48.126Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Solving the Chicken &amp; Egg Dilemma of Labeled Datasets for Machine Learning</strong></h3><h4>A first attempt at creating a limited dataset for a classification model through imperfect human pattern recognition.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dKWhHtofbriL94Up" /></figure><p>I <a href="https://medium.com/@ncaldwellgatsos/the-chicken-and-the-egg-paradox-of-named-entity-recognition-and-how-to-solve-it-f4a31528d78d">first wrote about the paradox of creating a named entity recognition system at the beginning of the summer</a> while I was attempting to create a model from limited data. Machine classification is easy when you’ve already extracted 10,000+ positive/negative/anything examples of what you want to classify and have them neatly laid out in a .txt file somewhere. Machine classification is hard when you don’t have any way of assembling something close to that scale without paying a domain expert hundreds of thousands of dollars to do an extremely boring task. You’d typically turn to a labeling system to do that for you — but wait! You need the classification system to do the automatic labeling for you. There lies the paradox.</p><p>This is something I’ve devoted a serious amount of my time to while at Northwestern and in my career is developing workarounds to this issue. How do you crack that ‘Chicken and Egg’ problem of needing a good classification model to have a labeling system, but in order to get a good labeling system you need a classification model? The answer lies within the sentence, with particular attention to the word ‘<strong>good</strong>’.</p><p>See, humans benefit from already having the equivalent of a generalized machine learning system in their heads. That’s why the premier example of a deep learning algorithm is called a neural network. Our brains are really good at spotting initial patterns in information, they just don’t scale well and aren’t perfect at it. In this paper, I’m going to lay out a schema for training a classification model — which is arguably the first step before you can go into any other kind of machine learning tasks like generation or reinforcement learning.</p><p>This schema <strong>will not be groundbreaking to any experienced machine learning engineers</strong>. It is something that they probably had a vague sense of doing when they were faced with complex problems that didn’t have neatly labeled datasets. Instead, the purpose of this post is to potentially frame a very ambiguous topic in a slightly different wording — in the hope that it makes a complex topic a bit easier to understand for someone going forward.</p><p>The answer I am about to propose is that you stop trying to create a perfect system right away. A perfect system often (but not always) is hindered by one thing. It’s not the hyperparameters, it’s not (always) the model you choose (though that is important to get right), but rather the data needs to be in some form of order to analyze it. It’s helpful if it’s already arranged in a neat Excel document, but as unstructured data scientists know, the most potent information is rarely ordered.</p><p>I don’t have a great framework for how to handle unstructured environments in place yet. All I can offer is my own strategy for creating labeled datasets from unstructured word documents, and gather suggestions on how to expand outward and generalize across a variety of environments.</p><p>My task is to create a ‘sectionizer’ or a way of classifying areas of a document under a particular label. This is intended to be a building block for a later construct — a way of contextualizing unstructured documents across a variety of fields. For the purposes of this post, I use unstructured to refer to documents that aren’t split up across database-like fields. It isn’t to suggest that there is no structure to them — in fact, the underlying structure of the documents and my ability to spot it is partially why this approach works. Considering that all my input documents are unstructured in this sense, I’m attempting to introduce structure and labeling to create a labeled dataset.</p><p>All of the elements of my ‘unstructured text’ are labeled to some degree with headers preceding the sections. In a sense, this is a ‘label’ but it’s not a label that I can use reliably. The section headers aren’t always going to match (there are different authors who use different ways of referring to the same thing), but I need to be able to match a certain document’s sections to a universal taxonomy. This is the reason for needing training data.</p><p>My plan is to spot the section titles by tokenizing the documents into sentences, and then tokenizing each individual sentence and getting the length of the string &amp; pairing it with the sentence. Then I’ll extract only the ‘sentences’ that are less than 6 words, and consider those the section titles. I won’t always be right, but I’ll have something go off of. I’ll then ‘sectionize’ each document using this method, identifying each section title as a ‘label’ and everything that follows it until the next section as the ‘content’. In separate .txt files, I will title each .txt file as the section title and write in its associated contents as the data. My hypothesis is that as I run this across 20+ documents, I will assemble a dataset of 20+ examples of each section within this ecosystem of .txt files.</p><p>Finally, my justification for creating this training set is the assumption that all the documents I’m working with won’t fit this neat schema I’m developing. The section titles won’t always match, even though their content should. It will be a far cry from a perfect way of assessing each section, but I think it will serve to be a useful preliminary dataset assembly process. The hope is that with time and initial classification algorithms, I can then implement an active learning solution that I can use to improve the data I’m feeding in.</p><p>I’d be interested in getting others’ opinions about my strategy, whether it hinges on too many uncertain assumptions or whether my approach is too convoluted. However, I think it’s a good first step in approaching a highly unstructured environment that needs a bit of preliminary structure to begin work in it. It’s taking advantage of the fact that my own observations can notice some small patterns, which I can use to circumvent the paradox of needing labeled datasets to produce good classifications, but needing a classifier to produce an automated labeled dataset. My next step is to create several baselines to identify improvements in the model I create.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d0a7ab75008" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/solving-the-paradox-solving-the-chicken-egg-problem-of-machine-learning-1d0a7ab75008">Solving the Paradox, Solving the Chicken &amp; Egg Problem of Machine Learning</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[The Rationale for Training Domain-Specific BERTs [OMNI-BERT, Part One]]]></title>
            <link>https://medium.com/@ncaldwellgatsos/the-rationale-for-training-domain-specific-berts-omni-bert-part-one-e36ed4ad1f48?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e36ed4ad1f48</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Thu, 21 Nov 2019 20:51:02 GMT</pubDate>
            <atom:updated>2019-11-21T20:54:33.233Z</atom:updated>
            <content:encoded><![CDATA[<p>Deep<strong> B</strong>idirectional <strong>E</strong>ncoder <strong>R</strong>epresentations from <strong>T</strong>ransformers (BERT) were a monumental breakthrough in natural language processing (NLP) at the beginning of the year. BERT’s usefulness in downstream NLP tasks like named entity recognition (NER), sentiment analysis, neural machine translation, and question answering is incredible. If you want a more in-depth explanation of BERT (and a tutorial on how to use it), please consult these resources: <a href="https://www.kdnuggets.com/2018/12/bert-sota-nlp-model-explained.html">link1</a>, <a href="https://mccormickml.com/2019/05/14/BERT-word-embeddings-tutorial/">link2</a>, <a href="https://www.kaggle.com/sergeykalutsky/introducing-bert-with-tensorflow">link3</a>. What I would like to focus this post on is how BERT can be improved, particularly in the legal domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8gCQ7ijA3a3ed5unzdRQPw.jpeg" /></figure><p>After BERT was released, there were several improvements made on its design. <a href="https://github.com/Lukas-Justen/Law-OMNI-BERT-Project/blob/feature/setup/papers/Bio-BERT.pdf">BIO-BERT</a> and <a href="https://github.com/Lukas-Justen/Law-OMNI-BERT-Project/blob/feature/setup/papers/Sci-BERT.pdf">SCI-BERT</a> were developed to improve BERT embeddings’ accuracy in representing ‘high-intensity’ domains like biomedical text. A good way to think of the two designs is comparing the reading comprehension level of an individual with a liberal arts degree vs. someone with a J.D. or M.D. A liberal arts’ graduate would have an excellent comprehension of general knowledge (i.e. BERT), while an M.D. would have an excellent comprehension of domain-specific knowledge (i.e. BIO-BERT). The creators of BERT essentially created a model with a liberal arts level of understanding, while the creators of BIO-BERT created an approximation of an M.D.</p><blockquote>Both domain-specific models outperformed BERT.</blockquote><p>Given the advantages that SCI-BERT and BIO-BERT granted researchers for downstream tasks, our team at Northwestern’s initial goal was to create a framework for training domain-specific BERTs based on those prior papers. However, we soon picked up on an important discrepancy within the premises of both research efforts that impacted our decision-making:</p><blockquote>SCI-BERT actually outperformed BIO-BERT on a number of tasks.</blockquote><p>This is extremely important in the context of training domain-specific BERTs, because BIO-BERT was trained on a tiny realm of domain-specific corpora (biomedical text), while SCI-BERT was trained on more general domain data (i.e. biomedical text, but also computer science text). This resulted in two competing hypotheses that our team is setting out to prove:</p><ol><li>There is a decreasing rate of return for domain-specific BERTs in terms of their performance on downstream tasks.</li><li>The architecture of the BIO-BERT model is what caused it to underperform on the downstream tasks.</li></ol><p>For the first hypothesis, one possibility of why BIO-BERT is underperforming relative to SCI-BERT is that there is a declining rate of return the more you specify the training corpora. In other words, there is an optimal level of specificity between BERT’s general knowledge training corpora and BIO-BERT’s medical training corpora that SCI-BERT’s training corpora occupied. One half of this experiment will be to evaluate whether or not this hypothesis is true relative to our other hypothesis (that I’ll discuss after this). Assuming this hypothesis is correct, our next task will be to establish thresholds. Let’s say the SCI-BERT corpora is 40% computer science material and 60% biomedical material. Would a SCI-BERT trained on the inverse perform better, or worse? Does the ratio change depending on the downstream task, or domain? There are plenty of questions to answer after we prove this hypothesis.</p><p>For the second hypothesis, we assume that the architecture of the BIO-BERT model is why it underperformed relative to SCI-BERT. Both models take embeddings directly from BERT and fine-tune them on their own corpora to make new embeddings. Because of this, SCI-BERT is basically going from <strong>generalized embeddings -&gt; slightly more specific embeddings</strong>, while BIO-BERT is going from <strong>generalized embeddings -&gt; very specific embeddings</strong>. We reason that if BIO-BERT instead went from <strong>generalized embeddings -&gt; slightly more specific embeddings -&gt; very specific embeddings</strong>, their results would be different (if not better). Essentially, we propose that BIO-BERT just add an additional layer to their model to perform better. If this assumption is correct, we still need to optimize the data that feeds into both the middle layer and the outer layer. Therefore, we need to create methods of evaluating the importance of select data to the model.</p><p>In the next part of this series, I will describe our process of identifying the right datasets to feed a domain-specific BERT training pipeline. I will also go into detail about our efforts to prove our hypotheses, and our work to create a useful visual tool on how to generalize our success across a variety of domains.</p><p>Let me know in the comments if we missed anything, or you have your own insights on why SCI-BERT outperformed BIO-BERT.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e36ed4ad1f48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI — The Quiet Revolution]]></title>
            <link>https://medium.datadriveninvestor.com/ai-the-quiet-revolution-8360fc48bc9e?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8360fc48bc9e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[investment]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[gradual-change]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Fri, 13 Sep 2019 16:43:55 GMT</pubDate>
            <atom:updated>2019-09-15T05:46:28.747Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI — The Quiet Revolution</h3><p>There will be a lot of people who will click on this article, look at the title and think I live under a rock. AI seems to be everywhere in the news lately, from the massive data crunchers employed by Facebook and Google to find out what cereal you’re eating to the scary facial recognition systems that could transform the way we think about crime prevention (for better or worse). There’s so much attention on the big flashy developments that no focus is being made on the projects that are actually making a big, tangible difference in people’s lives now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KszZrOZo7d0sWM5tVrVcDQ.jpeg" /></figure><p>I’m reminded of a Vox article I read a year ago. It <a href="https://www.vox.com/future-perfect/2019/6/15/18679138/nutrition-health-science-mice-news">was about a Twitter user who made an account titled: ‘on Mice,’ </a>and sought to debunk every sensational healthcare development by pointing out that the authors of the clickbait news were omitting a major feature of their revolutionary new procedure or medicine: that they weren’t actually tested on humans, they were tested on mice. I don’t want to discount the effect of a successful trial on mice — it is a major step in the right direction, but omitting that the results of an experiment were only successful on a test subject like a mouse hides the fact that any actual effect that the discovery will have on human life is far, far away.</p><p><a href="https://www.datadriveninvestor.com/2019/03/01/the-myth-of-ais-predictive-power/">The Myth of AIs&#39; Predictive Power | Data Driven Investor</a></p><p>AI is in a similar position now. Every morning, when I go through my gauntlet of tech-related news articles, and I see the newest method for predicting protein folds, or attracting customers, and so on and so on — I have to remind myself that none of this was written by someone with the same mindset as the researchers who produce the white papers I read every day at work.</p><p>This contrast came up when I was describing how the use of a new tool — Google’s developments in a method called Neural Structured Learning that uses metadata from graphs to improve machine learning models in scenarios with little labeled data — would improve our model’s accuracy by 5–10%. I was excited — my boss was less so. “Five to ten percent?” He asked. “Why’s that significant? Why should I devote resources to looking into this?”</p><p>That question highlights my point — the AI revolution is subtle and coming quietly. Too many investors, C-suite officials, hobbyists, and pundits are enamored with the glitzy promises of AI spoken about at TED Talks, tech conferences, and espoused by ‘industry leaders’ like Elon Musk. AI — or the mechanics behind it — <strong>do</strong> have the potential to introduce life-changing effects in our lives. The potential of having an analysis system able to pick up on nuanced patterns in our world and make use of them to produce unimaginable outcomes is a really cool thing. However, this talk obscures what’s actually going on behind the scenes.</p><p>All of those technologies are either 30–40 years from being condensed into a product or application that can actually be used by interested parties. I’ll go into the specifics of this claim in a bit, but the main gist is that these pundits are describing them as if they’ll be unleashed tomorrow. As if the data that’s used to train them is already perfectly formatted and the hyperparameters and objective functions of the models are able to generalize far beyond a specific use case. This is not the case. Even if you manage to get a working machine learning model that can extrapolate from a good set of data, you’ll often find that its actual application to human lives and behavior is something that hasn’t even been considered. Sure you can produce more data from it — but how do you actually use that data?</p><p>That’s the reason that I brought up the comparison to medicine. Expecting revolutionary AI to become a part of daily life is like seeing that HIV has been eradicated in mice, or that a pill can prevent allergies, and expecting those solutions to be on the market tomorrow. Decades of time, billions of dollars, and countless minute changes built through exhaustive human effort will have to go into those solutions before they become a ‘revolution’.</p><p>I’ve focused on the negatives of this kind of AI talk for the majority of this article — so let me take time to expand on what is a reality — now — and how you, as a hobbyist, a C-suite official, an investor, and so on — can realize the contemporary potential of AI and stop focusing on all the noise that’s distracting you from what’s actually valuable right now.</p><p>There’s nothing particularly flashy about creating a new data filing system for large hospital systems, or giving an aspiring architect the tools to make their resume stand out, or improving supply chain efficiency by 2%. But these are the features that are actually changing lives now. Instead of trying to build some flashy new processor that can analyze millions of facets of data at once, most businesses should be looking at the wealth of tools out there and seeing how they can integrate them with their business model.</p><p>Tepid responses to unexciting AI-related tools are obscuring the actual, tangible value of what’s available right now. To modernize an old proverb, the internet wasn’t built in a day. Social media didn’t become the influential juggernaut of marketing over the course of a year. What happened was that small, medium, and large businesses found a small feature, a random off-the-shelf model, that could improve one small aspect of their business. These gradual improvements were the reasons for promotions, pay raises, amazing returns on investment, and the foundation of the careers of the folks in charge today.</p><p>The AI ‘revolution’ is, and will continue to be, just as quiet. Your life won’t change over the course of a single 24 hour period due to AI (yet). What will make a difference in your life — no matter what field you’re in — will be your adoption of a simple programming creed: if you do something repetitive 3 times, there’s a way to automate it. This kind of thinking will allow professionals of every specialty to acknowledge that there is a place for improvement in their field.</p><p>Businesses that have an edge on their competition right now are the ones adopting this mentality. They’re the ones who are ignoring the flashy, attention-grabbing clickbait that won’t actually produce returns in favor of the smaller steps of automation and expedition that will improve their bottom line. Developments in AI today will be an industry-warping, life-changing feature of the 21st century — it just isn’t happening where you’re looking.</p><p>I really dislike reading articles that just offer one author’s perception of a trend and don’t actually contribute any meaningful courses of action to improve a situation. I’m a policymaker — I like advising on what some entity can do to take advantage or improve their response to a trend or scenario. I want to end my article with a defined set of prescriptions to follow to avoid being captivated by the headlines and actually use AI for something useful, now.</p><p>Here’s how you can begin to use AI today:</p><ul><li>If you have an ‘innovation’ staff or staffer, and their clearly defined area of responsibility is to identify off-the-shelf open-source technologies that can be used to help your objectives, have them check in with this list of resources at least once a week.</li><li>The <a href="https://www.technologyreview.com/">MIT Technology Review</a></li><li><a href="https://paperswithcode.com/">Papers With Code</a></li><li><a href="https://www.skynettoday.com/">Skynet Today</a></li><li><a href="https://openai.com/">Open AI</a></li><li>If you don’t have an ‘innovation’ staffer whose sole responsibility it is to intake information about your company and its product and figure out ways to make it better — hire one!</li><li>Have your technical team (hopefully with backgrounds in tech and a willingness to learn new things), go through Google’s tutorials. Google is a gold mine for any company that wants to begin improving their bottom line with developments in machine learning. Their products are specifically designed to be expanded upon by companies and it’s ALL FREE. Here are a couple of links to get you started:</li><li><a href="https://ai.google/tools/">Google AI Tools</a></li><li><a href="https://gym.openai.com/">Open AI Gym</a></li></ul><p>All of these tools are specifically designed for creative implementation. This is how AI will revolutionize the world: not with a bang, but with a small, sustained push for innovation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fb2a0d6%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fb2a0d6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href">https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8360fc48bc9e" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/ai-the-quiet-revolution-8360fc48bc9e">AI — The Quiet Revolution</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Unique Challenge of Working with Clinical Text in NLP]]></title>
            <link>https://medium.com/@ncaldwellgatsos/the-unique-challenge-of-working-with-clinical-text-in-nlp-c8bd96130f27?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8bd96130f27</guid>
            <category><![CDATA[clinical]]></category>
            <category><![CDATA[legal]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Mon, 26 Aug 2019 23:05:36 GMT</pubDate>
            <atom:updated>2019-08-27T20:39:12.502Z</atom:updated>
            <content:encoded><![CDATA[<p>Working with high-intensity corpora like legal or clinical texts presents a unique challenge for NLP engineers. This is how to understand it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*QerhOiPMf58WkJBBf3im1w.jpeg" /></figure><p>Doctors and lawyers are expected to keep up with a staggering amount of information. Each year, there’s a verifiable deluge — nearly 5 million — of scientific papers and legal opinions published[1]. It can be nearly impossible for these professionals to keep up with this information overload. But what if there was a better way to use this wealth of information rather than expect those interested to skim 2.5 million or so documents? Natural language processing — a subset of artificial intelligence — focuses on producing a solution to that problem.</p><p>When you’re considering a use case for NLP, I often find that a lot of potential start-up innovators tend to focus on the headlines and don’t really have a good understanding of what NLP can do. This leads to poorly defined problem statements and proposal rejections. It helps to frame your task in the most explicit terms you can. Do you want a summarizer that can take in those 5 million articles and give you three-four sentences about them? Do you want a classifier: something that can read all of those 5 million articles and say arbitrarily (based on subjective criteria) that these articles are trash, and these articles are legitimate? Do you want a decision-maker — something that can read all those options — extract relevant information and put it to use? These questions and more are what you should be asking, because if you can’t frame the problem as explicitly as possible, artificial intelligence applications aren’t going to help your use case. This is because NLP is a super broad field, within an already broader field of artificial intelligence. A summarizer uses mechanisms called ‘attention’ and ‘pointer-generators’ that use linear algebra to vectorize information and assign more relevant examples higher weights to mimic human-based attention. A classifier normally falls under the broad category of sentiment analysis, where you give the system enough examples of whatever you want to classify and it begins to learn features about the data to allow it to distinguish between the classes. A decision-maker typically uses data to inform its decisions, so you’d want to use a named entity recognition model to pull out this data and a deep reinforcement learning model to put it to use. Involved in all of this is a ambiguity limiter, which allows you to determine the meaning of a word from its context. You can see how this begins to spiral out of control — hopefully illustrating the necessity of a cleanly defined problem statement from the very beginning.</p><p>In this post specifically, I’m going to assume that the user wants to be able to extract useful data points and connect their outputs to a decision-making process that will replicate what a professional naturally does when they read through a white paper. So let’s break that process down — what do clinicians do when they read white papers? What do they look for? Your standard doctor typically wants to know the most up-to-date treatment options for whatever they’ve diagnosed you with. They want them to be reliable, they want to limit the side effects, they want the materials needed to be available at the hospital or practice they work at, and they want the procedure to be as low cost as possible. Like I mentioned previously, the art of determining whether or not a paper is reliable is a separate task — it involves a fair amount of domain knowledge and a classifier model that can correctly analyze the corpora. You’ll need a named entity recognizer, but only after ambiguous terms are properly lemmatized or grouped. You’ll need a long-term memory deep reinforcement learning mechanism that allows it to make decisions by comparing each treatment to another, which means you’ll need some kind of classifier that determines whether or not the sum total of a paper’s approach is better than another. That is way too much to cover in one post, so I’m going to just focus on the named entity recognition model and the ambiguity reduction model, since they’re linked.</p><p>Named entity recognition and word sense disambiguation are two major issues in natural language processing. Both are difficult to achieve because of the ‘Chicken and the Egg’ data problem I’ve mentioned in a previous post. You essentially need to have the model working already if you want to train the model without significant manual labor. That manual labor isn’t easy either — you can’t just have an Amazon Turk do it for you on the cheap, you need to have a licensed professional go through and hand annotate all the data for you. Obviously, this isn’t a good solution. Luckily, there’s a lot of work being done in the field. There’s already some publicly available datasets that cover this exact problem through the ShARe project and the i2b2 initiative. There’s also plenty of work being done developing unsupervised models that are able to learn how to annotate documents themselves. Those unsupervised models are what my work focuses on, and here are some of the unique challenges that those working with clinical texts face.</p><p>Clinical papers include the following categories — discharge summaries, electrocardiogram, echocardiograms, radiology reports, white papers, discussions of a particular treatment, and reviews of a variety of treatments. For the sake of remaining HIPAA complaint, it’s probably best to focus on the latter three. One of the major issues with analyzing clinical white papers is their ambiguity. A single concept can not only be represented in a variety of ways, but it can also be a multi-token (i.e. have multiple words) concept, or be discontinuous mentions (i.e. requires multi-word or sentence relationship analysis to properly categorize. The objective with all NLP approaches is to group each concept into a defined label or identifier. The doctor is able to easily distinguish between drug names, procedure names, disorder names, and so on. The computer system needs to be able to do the same. In order to do that, the model needs to have a method of grouping all of these unique terms into groups. In my next post, I’ll go over the several approaches towards taking all these unique terms and assigning them a CUI — a concept-unique identifier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8bd96130f27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Never Use the Word “AI,” To Describe How Your Product Works. Here Are Some Better Options.]]></title>
            <link>https://medium.datadriveninvestor.com/never-use-the-word-ai-to-describe-how-your-product-works-here-are-some-better-options-f545e7702275?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f545e7702275</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[investing]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Mon, 19 Aug 2019 18:28:10 GMT</pubDate>
            <atom:updated>2019-08-20T11:07:17.519Z</atom:updated>
            <content:encoded><![CDATA[<p>Buzzwords are the annoyance of every engineer and investor. Throwing vague phrases around without any idea if they even relate to your project will immediately tank it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7LFuqa7t7AySVuJt_g6MAA.jpeg" /><figcaption>A helping hand. Image Credit: by Franck V. @ Unsplash.com</figcaption></figure><p>A running joke with our Master’s cohort was the business student who asked a group specializing in voice recognition software how quantum computing would affect their business model. It’s like asking a doctor how finding the cure for cancer will affect their practice. It’ll be great, but a ‘cure’ for ‘cancer’ is bizarrely vague and has little to do with how the doctor’s daily practice works. It’s a concept far out of the left field, so far away from being a ubiquitous reality, and doesn’t have any direct application to what they’re working on that the question is immediately taken less seriously. It’s a topic best suited to a stoner’s living room musing about the future than a professional environment.</p><p>One of our group chats is called Quantum Blockchain Learning, a joke emphasizing that we constantly hear pitches that focus entirely on the ‘revolutionary’ technologies that make headlines but don’t do much beyond illustrating that the writers only know the barest details about what they’re describing. Sure — this sounds condescending and conjures up images of the nerds getting together laughing about someone’s ignorance of a niche subject.</p><p><a href="https://www.datadriveninvestor.com/2019/02/19/artificial-intelligence-trends-to-watch-this-year/">5 Artificial Intelligence Trends To Watch This Year | Data Driven Investor</a></p><p>The point of this article is to emphasize that this mistake has very real implications for your ability to actually communicate your brilliant idea. Think about it: your investors and engineers ARE the nerds who laugh about others’ ignorance at happy hours. They have all the financial incentive in the world to be as critical as possible of your idea. Otherwise, they wouldn’t be rich or talented in the first place. There’s no reason to worry — you’re reading this article! Just having a bit more idea of what the concepts you’re espousing actually represent can mean the world to whoever you’re speaking to.</p><p>Using vague buzzwords to describe your product has very real consequences for what you do. Besides the skepticism that investors will have in deciding whether or not to fund your idea, your engineers actually designing the thing will be completely lost on what you want to achieve. Let’s start with the headliner: Artificial Intelligence. Most serious investors and business executives have caught on to the reality that Artificial Intelligence is an entire field, not a single technology. Using AI to describe how your product works is like saying ‘physics’ allows your delivery company to function. It’s a detail that gives <strong>nothing</strong> away about your product. Happily, those who use ‘AI’ to describe what they’re working on have largely stopped doing so. Instead, new buzzwords have appeared: machine learning, algorithms, robotics, NLP, blockchain, cryptography, you name it. These aren’t much better. All of them are titles of introductory course names at your university of choice — not robust descriptions of what you do or how you do it.</p><p>Artificial Intelligence isn’t a single technology. Instead, it is the merging of hundreds of technologies to achieve one goal: mimicking human behavior while multiplying its potential. Here’s a short history of it. AI started out as philosophy — understanding that the mind and ideas are separate from the body and have the ability to ‘learn’ new things through abstraction. It grew into studies of logic and mathematics, eventually turning into computing. As computers became more commonplace and the potential data to compute became massive, we began bringing in aspects of biology, neuroscience, psychology, and cognitive science to solve problems. Around this time, Artificial Intelligence became a real discipline, encompassing many subfields that in turn, contained many subfields. Modern artificial intelligence practitioners often have expertise in one specific subfield, with a general idea of how the rest work. These subfields include:</p><ul><li>Neural Networks— a combination of computing and biology that seeks to model how the brain processes information.</li><li>Machine Learning — the use of statistics and algorithms to engineer automated systems.</li><li>Natural Language Processing — teaching machines how to read and how to pick up on task-relevant knowledge.</li><li>Robotics — use of intelligent control to promote autonomous exploration (i.e. using a computer program to interact with the world).</li><li>Computer Vision — enabling a computer to pick up on image features to begin identifying what it contains.</li><li>Speech Processing — same as above, but with human voice as the medium.</li></ul><p>Now, onto the main issue presented in this article: how to talk about Artificial Intelligence in the best way to properly describe your idea so investors remain confident and engineers know what to do/provide recommendations. The best thing you — as the idea generator — can do is properly define your data. What medium does it take place in? Is it in pictures? Video? Sound? Text? Excel spreadsheets? Determining your data will determine <strong>what branch of AI you’re using</strong>, but does not <strong>tell you what approach </strong>you’re using. You cannot begin a meeting with a VC and say, “oh I’m using NLP to do X, Y, and Z.” That is still the field, not the mechanism at work. You need to go beyond the field and state the specific class of algorithms or approach you’ll use, in addition to how you use your data within that mechanism. Let’s say you’re a tech startup dealing with computer vision. Don’t use computer vision to describe what you do — describe your algorithm! You don’t have to go into detail, just reference ideas like ‘Convolutional Neural Networks’ to describe your approach. CNNs are a class of deep neural networks that are commonly applied to recognizing images by analyzing their pixels. Does it sound more intense than the buzzwords you’re used to? Good. Nobody’s investing in half-baked ideas anymore, you need to wow them with actual know-how before they’ll hand over money or want to work on your project.</p><p>Onto Machine Learning. Always refer to it in relation to the medium and specific use-case you’re working with. Machine learning is essential just informed automation, so what are you automating? Are you automating the extraction of specific text? You’re using a subclass of NLP called Named Entity Recognition. Are you trying to get a mechanism to learn about its environment? You’ll want deep reinforcement machine learning using a Q-learning algorithm. This is the kind of information that is most relevant to important players in the field and the engineers that will be working on your project. You may have noticed that many of these fields tend to overlap — that’s exactly why it’s weird to refer to anything less than model-specific in your pitch. Machine learning can have a lot to do with NLP or nothing at all. If you keep things vague, the more likely it is that it will be met with skepticism.</p><p>I understand the importance of keeping things short and sweet to the point that you’re able to make a coherent elevator pitch. But getting the right name and approach of your design right and keeping things short aren’t mutually exclusive! Being able to talk about your model explicitly can take the same time as referring to the inner workings as “AI magic,” with the added benefit of being much more descriptive. Explaining that your model uses pre-trained word embeddings to minimize the overhead of a machine summarization system allows you to convey that you know what you’re talking about while being relevant enough for engineers to get interested in your product. It doesn’t matter that you don’t know how these things work under the hood — what does matter is that you know how your product will actually be built and is based on a feasible strategy, and you’re not just hitching a ride on the shiniest new thing. Once you have the make and model of what you’re trying to achieve, that can point your engineers and investors down a rabbit hole they’ll be happy to dive into.</p><p>My last point is that people often frame their problem as if a single solution comprises the entire product. Many assume that once they start talking about NLP, that’s all there is to their project. They think that they just have to cover the creation of the model and the rest will take care of itself. You really need to think long and hard about all of the additional facets of your creation. How are you going to house your results? Did you consider your database strategy — and how to allow that database to handle the network of information that your model will create? How are your results displayed? Did you consider how to properly package a ML-based application so its insights aren’t limited to field-specific professionals trained to handle that kind of data? These questions are just as important as defining the model you want to use and can go the extra mile in reassuring your investors and programmers that you have a defined idea of what you want to achieve and how to get there. Additionally, multiple models might be required to clean, normalize, or even create your data constraints. Make sure your model can do everything you say it can by itself before pitching it.</p><p>An even bigger problem that a lot of these startups and big companies seem to have is understanding their data, which will be the focus of my next post. Understanding what data you have available, how to format it to be useful, and data maintenance and cleaning strategies can make or break a startup or an innovation team. Knowing how to describe your analytical approach through the lens of more specific descriptions of your product will enable this process to happen. Unless you specifically understand the model you want to use to tackle your data, you won’t be able to pitch your product and you’ll be stuck with a ‘Hello World’ application forever.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2Fb2a0d6%3Fas_embed%3Dtrue&amp;dntp=1&amp;display_name=Upscribe&amp;url=https%3A%2F%2Fupscri.be%2Fb2a0d6%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href">https://medium.com/media/0707f5c806284d01a4a13c7b13a91ce3/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f545e7702275" width="1" height="1" alt=""><hr><p><a href="https://medium.datadriveninvestor.com/never-use-the-word-ai-to-describe-how-your-product-works-here-are-some-better-options-f545e7702275">Never Use the Word “AI,” To Describe How Your Product Works. Here Are Some Better Options.</a> was originally published in <a href="https://medium.datadriveninvestor.com/">DataDrivenInvestor</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Deep Reinforcement Learning Can Be a Beast, Here’s a Way to Frame It]]></title>
            <link>https://medium.com/data-science/getting-started-with-deep-reinforcement-learning-can-be-a-beast-heres-a-way-to-frame-it-7063c3e1c584?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7063c3e1c584</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Thu, 15 Aug 2019 21:46:20 GMT</pubDate>
            <atom:updated>2019-08-17T19:21:59.251Z</atom:updated>
            <content:encoded><![CDATA[<p>A lot of primers on DRL can be confusing and needlessly high level. There’s a simpler way to begin your journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i0-YrSOILuuugrqffEeATQ.jpeg" /><figcaption>Q-learning at work. Source: <a href="https://unsplash.com/photos/NuE8Nu3otjo">NASA</a> at <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>There’s a wonderful metaphor to be found in fantasy fiction that applies to learning computer science, artificial intelligence, and machine learning. Often, the ‘magic users’ of a fantasy novel will act as gatekeepers to knowledge, making every tutorial and needlessly complicated for those that want to learn magic. This is intended to hoard this knowledge and power for themselves. I’m not trying to make every CS professor out to be an evil sorcerer, but….just kidding, I just think it’s really, really difficult to teach computer science — especially if you never wanted to be a teacher in the first place. I’m far from an expert, but I would like to make all these concepts a bit easier for everyone to understand. So here’s how to frame deep reinforcement learning in your mind.</p><p>The best way to understand and learn programming is to envision a project and figure out how to complete it. That means piecing together what kind of tools you’ll need to use to finish it, and how to use those tools. In this example, I’ve created a fictional character named Marco. Marco’s pretty good with the ‘magical language’ (i.e. Python), understands how to use the spells other people made for his own purposes (i.e. packages), and is beginning to be able to generalize how the ‘magic world’ (computing) works. Like all excellent wizards, Marco is lazy AF. His goal is to create a non-sentient agent that can do all his housework for him. But he has a major problem — creating spells takes a while! He’s been working on his automated agent for a while and has realized that having a non-sentient butler means he has to personally create a unique spell for every single action in every single environment. Marco doesn’t have time for this, he just wants a simple answer and he thought magic was supposed to make things easier! Marco wants his servant to be able to draw on Marco’s own human experience but he doesn’t want to just create another human. He wants the agent to master everything he knows and more in just an afternoon. Marco draws on his skills — he remembers that he can create mini-worlds, where he controls everything! Including time. Even though Marco isn’t powerful enough to influence time in the real world, he can in this mini-world. But that doesn’t help him, right? He needs to be able to use his agent in the real world, and having one that’s limited to his fake world is useless. Marco spends the rest of the morning thinking and comes up with a solution! What if he takes the ‘mind’ of the agent and puts it in the fake world to gain experience AND THEN takes the trained mind back out and puts it back into his servant. He’d get exactly what he wants!</p><p>Marco’s just identified the foundations of reinforcement learning, a subset of AI. In this fictional world where magic’s replaced programming, Marco’s realized that in order to create an automated creature that can do advanced tasks, he needs it to gain experience. But gaining experience took Marco twenty-four years, and he still doesn’t know everything! He doesn’t have time to wait around for that. He needs to replicate the experience process at an immense scale. So he finds a workaround — make a fake world where he controls all the variables, set the variables to mimic the real world with some variations (i.e. a fake second = a fake hour/day/year) and puts the brain into the fake world. Once it’s learned just as much, or more than Marco, he takes it out and he has a ready-made agent willing and capable of doing his accounting for him! Now that we kind of get a picture of what Marco’s doing, let’s abandon the magic metaphor to get into some of the more real-world applications of what I just described.</p><p>In the next three sections, I want to cover the main aspects of deep reinforcement learning. The first is model construction. There are four main aspects that are essential to understand:</p><ul><li>The Goal</li><li>The World</li><li>The Action</li><li>The Reward</li></ul><p>These factors are pretty much all you need to build a deep reinforcement learning model. I’ll go into each of them in a second, but I want to communicate an essential topic about data before we begin.</p><p>Marco had it easy — with magic, all he had to do to create his fake world was use some kind of mystical energy available and think really hard about what he wanted to create. For us real worlders, we have different parameters. Data is the most important. There are three types of data out there: numerical, categorical, and both! Numerical data is the easiest to work with — computers can notice patterns quickly using mathematical operations. Categorical data is a bit more tricky. How can you begin to communicate to a computer that there’s a qualitative difference between two different objects? How can you abstract this? NUMBERS. Feature engineering is a huge part of deep reinforcement learning and it’s how a lot of the AI ‘magic’ happens. We just convert everything we find to numbers using a couple of use-specific methods. Feature engineering’s super important, so I’ll cover that one in a whole post later. The important thing to understand is that everything will eventually be represented by numbers, and that’s how the computers can pick up on patterns.</p><p>With this in mind, let’s talk about the goal. This is variable and can get SUPER complicated. Just look at self-driving cars. Your goal can be to get from point A to point B, but it also needs to not destroy the car, go off the road, go at a certain speed, not hit pedestrians, keep the passengers safe, etc. etc. Objective functions are the most important part of any deep learning model, and partially why it gets complicated. So let’s start with something simple: a thermometer in a house. The goal is easy: keep the house temperature at 70 degrees Fahrenheit when people are home. The hard part then becomes defining the state (i.e. the world).</p><p>The state space is the virtual world. There are three types of worlds you can create and explore. The simplest and easiest to work with are model-based reinforcement learning. MB-RL applies to games, especially ones with constant rules like Chess. The ‘model’ is the game rules. It can only take place on a special environment — (i.e. the chessboard). There are a limited number of things that can happen on the board (still an obnoxiously big number of possibilities for a human to work with), and it’s why this is the easiest method to work with. <strong>LEARNING CURVE ALERT: </strong>Professors will confuse you by bringing up a concept called ‘sample efficiency,’ and it involves a LOT of math. To avoid going too far into decision trees and pruning, just know that there’s a mathematical way to mimic how professional chess or Go players can ‘feel’ what a good move is, and then the computers do it even better. The fact that the computer doesn’t have to plan out every single permutation of what could happen makes it ‘efficient’. The next step is valued-based reinforcement learning. VB-RL tries to estimate the qualities of states through concepts called ‘on and off policy’. Basically, the VB-RL guesses if its action might be good or bad for the world and its goal. Off policy means that the agent constantly tries to reevaluate its approach. This is ‘sample inefficient,’ because the model needs a lot of examples before it’s actually able to do anything useful. They don’t directly learn a strategy of action, they learn how good a course of action is and try and maximize that in their action. Occasionally, they’ll flip a coin to try something new. On policy means that the agent will constantly change their approach given a scenario to determine whether or not their action is good. One of the most prominent algorithms to determine what’s the best reward (I’ll get to that in a second) is called Q-learning (named for Q, which is an abstraction for the action). With this, let’s move on to the action:</p><p>The action step will probably be more familiar — it’s just an if function. An action says that if certain conditions are met, then the program will do something. Q-learning is a state-action function (i.e. it involves variables of both the state and action classes) that tries to maximize its reward. The reward helps produce the output (wait a minute, I’ll get to rewards after this). Q-learning is an algorithm that basically says: use <strong>any strategy </strong>to guess a Q (i.e. an action) that maximizes the future reward. This is independent of the strategy you gave it at the beginning. The Q algorithm is a bit tricky to understand, but it’s best to think of programmatically. It’s basically a for-if-loop, i.e. after you’ve initialized the world, <strong>for</strong> a state and action in the world, perform the action, measure the reward, and update Q. Continue to do this <strong>if</strong> you haven’t gotten to the optimal state, otherwise, terminate the loop.</p><p>Finally, the reward function: it can get super wonky. Sometimes, especially if your data is all numeric, it can be really easy to determine. You’ve got a variable, ‘x’, and you just try and get it as high as it can go. In the real world, there’s often many more variables involved, and they all affect each other (i.e. why it’s a function). Many people like talking about the Cobra Effect. The Cobra Effect talks about an Indian Government policy where New Delhi tried to encourage people to bring in venomous snakes for money. People immediately started breeding these dangerous snakes to game the system. You do not want to train your system to adopt a solution that’s worse than the problem. This is an edge case — the consequences of your system hopefully aren’t dire — but this exact scenario can be abstracted to simply represent all negative outcomes that you don’t want from a DRL model. A better example might be a robot arm that’s being trained to place blocks on top of each other. The author of the code thought it’d be a good idea to make the ‘reward’ a measure of distance — put the cube as far as you can (the author thinking that the robot arm would stretch out all the way and place the cubes linearly on top of one another). The robot ended up learning how to chuck things as hard as it could against a wall. Rewards are a complicated task, and often aren’t as easy as simply maximizing the unit of a variable. As I was writing this, I realized I was going a bit off tangent, so I’d like to cover rewards more in-depth in a future post.</p><p>This is the basics behind deep reinforcement learning — it’s all about creating a world, crafting an agent, giving it a set of actions it can take, and teaching it to maximize an arbitrary reward to gain experience and an idea of what actions will lead to what results. It’s all a fascinating idea and hopefully I managed to convey its basics well. If you have any questions, let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7063c3e1c584" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/getting-started-with-deep-reinforcement-learning-can-be-a-beast-heres-a-way-to-frame-it-7063c3e1c584">Getting Started with Deep Reinforcement Learning Can Be a Beast, Here’s a Way to Frame It</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[How to Rock a Cognitive AI Interview]]></title>
            <link>https://medium.com/@ncaldwellgatsos/how-to-rock-a-cognitive-ai-interview-bc54b5cf558b?source=rss-fde99b0550c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc54b5cf558b</guid>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Noah Caldwell-Gatsos]]></dc:creator>
            <pubDate>Wed, 07 Aug 2019 18:08:39 GMT</pubDate>
            <atom:updated>2019-08-07T18:08:39.030Z</atom:updated>
            <content:encoded><![CDATA[<p>Go beyond the easy buzzwords — here’s what you need to get an in-depth understanding of what’s going on with cognitive systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HExVqVccYlBpR4wjZ0RjQ.jpeg" /><figcaption>How AI and Cognitive Science Meet</figcaption></figure><p>It seems like everybody and their mother has some new AI trend they want to make money off of these days. Jargon-filled phrases fly around like Natural Language Processing, Reinforcement Learning, Neural Nets, Big Data, and Machine Learning. It can be easy to get lost, especially because a lot of them are just variations on the same thing. I recently had a friend go through the application process for a company that specialized in ‘cognitive AI’. Here’s the breakdown of what Cognitive AI is, how to talk about it, and the right questions to ask of an employer when you’re in the interview.</p><p>AI’s major short-term private-sector value is best suited towards helping companies minimize the shortcomings of their current workload through the automatic ability to act on near-perfect information (i.e. observations from big data) without much human input. Most companies that focus on resource extraction or manufacturing suffer from over and under-production. If they have too much of a certain product, they can’t make money off it. If they have too little of a product, that’s lost revenue. Most companies also can’t quickly shift production levels from high to low production — these are decisions that are made far in advance off of what production managers believe will be the long-term trends. It’s the best strategy that these companies have — but could it be improved? Sounds like a perfect recipe for AI to fix.</p><p>The main thing that you’ll want to talk about in any AI-related interview is data. Data collection, organization, housing, and processing are the four main attributes that you’ll be interested it. It’s really unfortunate that most companies are reactive to big data concerns than proactive — it’s often an afterthought — but that’s perfect for you to take advantage of. Most companies ignore these concerns because they don’t understand them, or they’ve hired the machine learning engineers thinking that they’ll be able to adapt (bad strategy). Data is essential to understanding the foundations of what your product is. Not having a thorough understanding of the data is like an architect not knowing what their building materials are. Ask your prospective employer what their data collection strategy is. How is it maintained? How is it processed for use in machine learning algorithms? These are big questions, and if they don’t know the right answer — be prepared, and use it as an opportunity to show off.</p><p>Now onto why you clicked on this article. How does Deep Reinforcement Learning (otherwise known as Cognitive AI) actually work? What do you need to know to sound knowledgeable about it? Let’s start with what it’s used for. Using DRL, you can design automatic control functionality for robots, create theoretical worlds and fill them with potential factors to model future situations, allow machines to make decisions based on the world around them, and master game AI. The six main areas of DRL are</p><ol><li>Automatic Control and Imitation Learning</li><li>Reinforcement Learning</li><li>Deep Feedforward Networks</li><li>Reinforcement Learning in Large State Spaces</li><li>Policy Gradients and the Q Function</li><li>Reinforcement in Continuous Action Spaces.</li></ol><p>Each of these six subjects are vast enough to merit their own post (or several) on their own. You can read up on them anywhere online if you’ve got the time. We want to focus on how to talk about each of them. If you actually want to get into the technical aspects of Deep Reinforcement Learning, I recommend that you have prior experience with Deep Learning, Machine Learning, and a good understanding of Python programming with standard libraries like Numpy, Pandas, and Matplotlib.</p><p>If you’re feeling a bit lost — don’t panic! Everybody does when they get to this stuff. A good way to describe computer science is like a single tool that everybody and their brother managed to customize in their own unique way, and is desperate to get you to learn it. Nobody knows all this stuff at once, and even the most experienced machine learning engineers refer to the basics all the time. What’s best is to generalize — and let’s start generalizing with DRL. A good concept to grasp is the idea of Dynamic Systems. Dynamic systems are labeled as such because they’re constantly changing. That’s why they’re useful — they can take in constantly changing data and do stuff with it! The second general concept is memory. Memory is important because that’s all the information that your system can use to make decisions. Now — machines handle memory a bit different than you or I do. It’s not like short-term memory vs. long-term for us. Instead, the metric that machines use as a data source is limited vs. unlimited memory. Each has differing reasons for its use. You want a dynamic system with limited memory if you don’t want the information from a huge timeframe to interfere with the actions of the system (i.e. last summer had a record-breaking heat but you don’t want your system to think that every summer is going to be like that!). Sometimes you’ll want a dynamic system with unlimited memory to handle long stretches of time and produce outputs. It all depends on your use case — but remember! Computers have their limits too. If you try and store everything, you’ll waste computational resources. The reason machine learning engineers get paid so much is because they have to determine which features are worth keeping in memory. Google Cloud gets expensive! Why did I introduce those two concepts over all the others? Dynamic systems really emphasize the point of deep reinforcement learning, which is to use the stimuli around the machine to get it to make a decision. You want the machine to take in everything around it, analyze all the data, and make a decision (i.e. the output).</p><p>The next big general concepts are predictive learning problems. There are two main predictive learning problems — regression and classification. These are terms that’ll be familiar to any statistician or data scientist. How would you go about solving a regression problem? Take ‘predicting the share price of a company about to go public.’ You’ll want to get a training dataset with known share prices, and try and design features that are thought to be relevant to your goal. This can be things like the company’s current revenue (i.e. the higher the revenue, the higher the stock price). In order to connect the potential share price to the revenue, you’ll use a linear model or <em>regression line</em>. These kinds of decisions are what DRL is ideal for. Using ML for classification is similar — but instead of predicting the future of an output, you’re trying to predict a class (or a label). This kind of problem-solving can be found in object recognition, where the machine learning model needs to distinguish an object from its surroundings and identify it. Mathematically, the way you do classification is by finding a hyperplane (i.e. a separating line) that separates the two classes of data from a training set as best as possible.</p><p>I’m only going to cover one more general concept before I go into some summarizations and ideal questions to ask with broad answers that you won’t have to know everything to make it look like you’ve got this in the bag. The final concept is feature design — figuring out those defining characteristics of a given dataset that allow for optimal learning. The more you understand the process of generating the data that you have, the better you can design features yourself, or even better, teach the computer to design them itself. One of the fun end goals of machine learning is to develop adequate tools to understand our own universe — how to find patterns in otherwise arbitrary data and how to identify the best ones to use for significant observations.</p><p>One thing you’ll probably want to discuss is how machine learning actually works. Above, I just listed the beginning tools to understand ML, but you probably want to know how they come together and actually solve a problem — right? Every machine learning problem eventually reduces to just finding the minimum of an associated cost function. If that sounds complex, it honestly is! A good way to think about this is how the brain has ridges, kind of like a canyon on a super small scale. That’s where a funny thing happens — we’ve figured out that if we can shape the canyon right, the answer we want is always at the bottom! I can practically hear all the mathematicians groaning collectively at that explanation, but it’s honestly a really good preliminary way to understand the ‘magic’ that goes on in machine learning systems. The real answer is more similar to the exercises you had to do in calculus where you were given a missing value in a series of linear equations (i.e. a matrix) and told to find the missing value. In this case, the missing value is the bottom of the canyon, and the canyon is the representation of the linear equations! If you’re still confused about the abstraction, don’t worry — it’s a really weird concept for the human brain to grasp.</p><p>Want some good news? It’s really easy to talk about machine learning in an interview if it’s more theoretical than technical. A good way to stick to a script is to be honest about what’s exciting about these kinds of technological breakthroughs — the potential of machine learning is really, really cool! That whole concept of using computers to find and make use of patterns in an otherwise chaotic universe should be fascinating for everyone. You’re pretty much designing a virtual ‘manager’ with perfect information for a product if you’re working with this in industrial production. What’s better than that? I covered the idea of features above — you know what your features are? They’re the manufacturing information — the number of people working, the acres of equipment in operation, the amount of energy used, the inputs and outputs. They’re the situational awareness — the knowledge of the market, the knowledge of the surrounding area, the knowledge of what allows the inputs and outputs to come about. And both of those are combined to allow for perfect coordination. It’s all one brain pretty much analyzing everything and making decisions. Cool right? If you want the key to talking about machine learning, just stick to what’s positive about the whole process. The possibilities are endless.</p><p>Definitely inquire about the following three areas when you go into your interview. Depending on how confident you are in your knowledge of each area, alter and edit the questions to suit your needs.</p><ul><li>Focus on data collection. Ask how statistically significant features are engineered by the company.</li><li>Ask how those features are recorded and then processed to be of optimal use for the company’s purposes. Not having data in the right format is the biggest problem. The single best question you can ask is how they label their data points. That will immediately clue your boss in that you know what the main issues are in machine learning. Unlabeled data is the bane of all machine learning engineers.</li><li>Ask about their use of cloud storage. Do they have adequate staff on hand to be able to deal with the complexities of managing a cloud data platform and pipeline to their services? Just having your intern attempt to launch a model on a GPU is not enough.</li><li>Ask whether their dynamic systems involved long-term memory or short-term memory, or a mixture of both. That will clue you in as to whether or not the company’s thought intensively about their data collection practices and how they make use of them. A good follow up is what situations would you use both types of memory for.</li></ul><p>Shoot me an email if you’d like more potential questions or things to know about deep reinforcement learning. It’s a growing field and it’s hard to find easy to grasp answers online. Check out the read next options I have below for more information. I didn’t even cover implicit vs. explicit AI (the ability to understand what’s going on in your system) or human-in-the-loop systems (responding to human input and making decisions). Those are your best next steps towards piecing together DRL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc54b5cf558b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>