<?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 Andrew Marmon on Medium]]></title>
        <description><![CDATA[Stories by Andrew Marmon on Medium]]></description>
        <link>https://medium.com/@andrewmarmon?source=rss-dd9691a8c702------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_HrZDhlahrZ106PT8ObF3g.jpeg</url>
            <title>Stories by Andrew Marmon on Medium</title>
            <link>https://medium.com/@andrewmarmon?source=rss-dd9691a8c702------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 08:11:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrewmarmon/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[Fine-Tuned Named Entity Recognition with Hugging Face BERT]]></title>
            <link>https://medium.com/@andrewmarmon/fine-tuned-named-entity-recognition-with-hugging-face-bert-d51d4cb3d7b5?source=rss-dd9691a8c702------2</link>
            <guid isPermaLink="false">https://medium.com/p/d51d4cb3d7b5</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[named-entity-recognition]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[united-nations]]></category>
            <category><![CDATA[transfer-learning]]></category>
            <dc:creator><![CDATA[Andrew Marmon]]></dc:creator>
            <pubDate>Thu, 05 Aug 2021 16:43:29 GMT</pubDate>
            <atom:updated>2021-08-05T16:43:29.300Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*neMtTpl5gk9BfVU5" /><figcaption>Photo by <a href="https://unsplash.com/@internetztube?utm_source=medium&amp;utm_medium=referral">Frederic Köberl</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In many organizations, there is a unique vocabulary that maps names to known entities within that domain. At the United Nations, for instance, we have many specific entities which it is useful to identify in documents, including specific named committees and assemblies, important topics like the Sustainable Development Goals (SGDs), and many different countries and cultural groups that must be identified correctly. Exhaustively naming each and every important topic that may appear in a document, however, is not reasonable considering the shear number that may be important, especially considering the context of a document or sentence in which this entity is present. Instead, we want to be able to automatically identify and predict named entities using Named Entity Recognition (NER) to avoid creating a Regex parser with thousands or hundreds of thousands of possible named entities to match.</p><p>In this article I will show you how to use the Hugging Face library to fine-tune a BERT model on a new dataset to achieve better results on a domain specific NER task. In this case, we want to predict United Nations named entities in transcripts of meetings of the General Assembly. Key phrases such as “the general assembly”, “second plenary meeting”, “the rohingya muslims”, and more will need to be identified and extracted as named entities within these transcripts in a consistent and automated fashion.</p><h3>The Dataset</h3><p>First we need to retrieve a dataset that is set up with text and it’s associated entity labels. Because we want to fine-tune a BERT NER model on the United Nations domain, we will need labelled text from United Nations documents. We will use Leslie Huang’s generously open sourced <a href="https://github.com/leslie-huang/UN-named-entity-recognition">UN NER dataset</a> as training and test data.</p><pre>git clone <a href="https://github.com/leslie-huang/UN-named-entity-recognition">https://github.com/leslie-huang/UN-named-entity-recognition</a></pre><p>Notice how this data is structured in the tagged-training folder. Each text file is formatted with text from sentences and a label for each word which describes it as either not an entity (O) or as a specific type of entity (I-LOC, I-MISC, I-ORG, etc.). To get this into training format, we will read all of these files and, for each sentence, create a list of words and a list of these words entity labels. We will store this in a dataframe by reading the files in the UN NER dataset and reading each sentence as a row:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4adccea5f6330bf8ac259878524f73d0/href">https://medium.com/media/4adccea5f6330bf8ac259878524f73d0/href</a></iframe><p>which yields the dataframe:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*_b3H_wdFrTbKP3B-Lp8GYg.png" /></figure><p>Now that we have the data in a workable format, we will use the <a href="https://huggingface.co/">Hugging Face library</a> to fine-tune a BERT NER model to this new domain.</p><h3>Using the BERT Tokenizer</h3><p>A tokenizer is responsible for preparing the text inputs as inputs to the transformer model (in this case, BERT). Each of these tokens have a mapping to a number that will be used as the transformer input. In order to get value from the fine-tuning process, we will need to use the same tokenizer on our UN NER dataset that was used during the original training. This will ensure that what was learned during upstream training will be carried over into this downstream task.</p><p>First, we need to get the Hugging Face transformer and datasets libraries.</p><pre>pip install transformers<br>pip install datasets<br>pip install seqeval</pre><p>Next, we will tokenize our inputs and match the labels in the UN NER dataset (some of which have data quality issues which must be handled) to those labels used in upstream BERT training.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85bafff45fa1dad0d3718bf02ae2fd98/href">https://medium.com/media/85bafff45fa1dad0d3718bf02ae2fd98/href</a></iframe><p>Which yields us the datasets for both training and testing. Next, we need to tokenize these datasets to convert the tokens and labels into numeric form for our BERT model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a7bff90f1aa2ce3a81c3bbc7d0e90615/href">https://medium.com/media/a7bff90f1aa2ce3a81c3bbc7d0e90615/href</a></iframe><p>Each token has now been transformed into a numeric representation and each label has been mapped to those used in upstream training, all in Hugging Face data format.</p><h3>Fine-Tuning the BERT Model</h3><p>Now that we have our dataset in the proper format, we will train our BERT model using the pre-trained model weights as our initial checkpoint. During this process, we will evaluate the model on the testing data by reporting F1 score and accuracy and finally save the model in the “un-ner.model” directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e10b80c25dedab35f94ffd085cb9d53f/href">https://medium.com/media/e10b80c25dedab35f94ffd085cb9d53f/href</a></iframe><p>After running this pipeline with these model parameters, we were able to achieve an F1 score of 0.85 and an accuracy of 0.98 on unseen data. Now we can load these saved model weights and predict on sentences in our current General Assembly documents to qualitatively assess the results!</p><h3>Predicting on New Sentences</h3><p>Now that we have our saved fine-tuned model weights, we can load them into a Hugging Face transformer object and predict entities on new sentences! We will run the entity recognition on the following paragraph,</p><blockquote>Before proceeding further, I should like to inform members that action on draft resolution iv, entitled situation of human rights of Rohingya Muslims and other minorities in Myanmar is postponed to a later date to allow time for the review of its programme budget implications by the fifth committee. The assembly will take action on draft resolution iv as soon as the report of the fifth committee on the programme budget implications is available. I now give the floor to delegations wishing to deliver explanations of vote or position before voting or adoption.</blockquote><p>and extract the associated entities.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d448aa7810239c09e5d6232c3821dadc/href">https://medium.com/media/d448aa7810239c09e5d6232c3821dadc/href</a></iframe><p>Using this fine-tuned model, we were able to extract many useful concepts related the the decisions made in this General Assembly meeting. We were able to correctly identify the Rohingya Muslims, the Fifth Committee, the General Assembly, Myanmar, and other entities within this paragraph. By fine-tuning our BERT model on this UN specific dataset we were able to achieve excellent quantitative and qualitative results.</p><p>The <a href="https://github.com/acoadmarmon/united-nations-ner">full codebase can be found on GitHub</a>, and the results for this prediction task on this paragraph <a href="https://github.com/acoadmarmon/united-nations-ner/blob/master/un_ner_results.csv">can be found in un_ner.csv</a>.</p><h3>Wrap-up</h3><p>This information can be critical in extracting useful information from the staggering number of documents created within the United Nations. For instance, by extracting these entities from documents we can create <a href="https://medium.com/slalom-technology/helping-the-united-nations-infer-document-labels-using-knowledge-graphs-211b73897014">knowledge graphs</a> connecting otherwise disparate documents together. This can be used for document topic inference, relating useful documents to eachother, and question and answering tasks. This NER work is just a small part of the work we are doing at the UN Emerging Technology Lab (ETL) to accelerate the UN’s mission.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d51d4cb3d7b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Helping the United Nations Infer Document Labels using Knowledge Graphs]]></title>
            <link>https://medium.com/@andrewmarmon/helping-the-united-nations-infer-document-labels-using-knowledge-graphs-211b73897014?source=rss-dd9691a8c702------2</link>
            <guid isPermaLink="false">https://medium.com/p/211b73897014</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[united-nations]]></category>
            <dc:creator><![CDATA[Andrew Marmon]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 18:48:11 GMT</pubDate>
            <atom:updated>2020-10-12T23:44:45.406Z</atom:updated>
            <content:encoded><![CDATA[<h3>Helping the United Nations Infer Document Labels Using Knowledge Graphs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*nuIryRhBsVJkwolP" /><figcaption>Photo by Kyle Glenn on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The United Nations Office for the Coordination of Humanitarian Affairs (OCHA) manages a multibillion-dollar fund intended for projects related to humanitarian emergencies. Donors provide these funds to OCHA with a list of strategic priorities that they‘d like their donations to be aligned with, including initiatives centered around education in crisis, women and girls, protection, and disability. There’s a challenge in prioritizing where these funds land, however. Non-governmental organizations (NGOs) request funding from this pool by submitting lengthy project proposals that then must be aligned to donor funds. Once projects are selected and funded, the OCHA team must also justify their selection decisions by aligning key outcomes to the goals of the donor fund.<br> <br> Currently, the entire process of project proposal ingestion, alignment determination, and reporting is manual. The Emerging Technologies Lab (ETL) at the UN partnered with Slalom to find ways that innovative technology like AI/ML and knowledge graphs can:</p><p>· Reduce the time required to process these project proposals</p><p>· Increase the rate at which these proposals successfully align with the key strategic initiatives</p><p>· Explain how and why these decisions were made</p><p>The end result was a highly explainable natural language processing pipeline that leveraged keyword entity extraction and an open source knowledge graph to achieve these goals.<br> <br> <strong><em>Learn more about this project in </em></strong><a href="https://slalom.ws/3iOtInX"><strong><em>our story on slalom.com</em></strong></a><strong><em>.</em></strong></p><h3>How we work</h3><p>For every <a href="https://www.slalom.com/case-studies">project</a> Slalom takes on, we follow a standard framework to solve the problem meaningfully and responsibly. We:</p><p>i) Determine metrics that constitute a successful outcome</p><p>ii) Identify ethical considerations to address during data profiling and modeling</p><p>iii) Explore the dataset and prototype approaches</p><p>iv) Implement a solution using metrics as a benchmark</p><h3>Measure what matters</h3><p>Ensuring that funds are well spent is paramount for OCHA, its donors, and ultimately the people in need. A manual process obviously imposes limitations on the speed of proposal assessments and the variety and granularity in reporting on finished projects. An automated tool to help humans in this process would need to be accurate, fast, and flexible. We defined success as achieving a &gt; 85% accuracy in classification.</p><p>An important component of every solution we propose is model explainability. Any funding that OCHA provides must have an associated, discernible reason behind that decision that can be reported back to the donors. In contrast with many modern black box models, the text extraction and knowledge graph pipeline we implemented embeds a high level of transparency into the inference process, allowing for a robust reporting structure that ties these model outcomes to key terms and phrases that had a disproportionate impact on the assigned label.</p><h3>Do what’s right</h3><p>A key question to ask during any machine learning engagement is, what kind of outcomes are we driving? Is it possible that our dataset is inherently biased, and if so, do we have the tools to mitigate this bias that could lead to the perpetuation of unjust outcomes for a subset of people? As machine learning practitioners on the front lines of innovation, we have a responsibility to ask these questions to prevent machine learning models from perpetuating biased learned from historical data. For this engagement, we investigated the ethical considerations relating to the project’s purpose, the dataset, and the machine learning models.</p><p>The core of this collaboration was to help the United Nations coordinate assistance for people in need more efficiently. When this pipeline we built is deployed into production, it will have a significant positive impact on people in need of this OCHA funding. Money designated for the strategic initiatives will be more efficiently allocated, allowing NGOs to leverage this funding to help people faster. Taking these points into consideration, we concluded that this was an ethical engagement that will make a positive difference as long as we implement it correctly.</p><p>For the dataset and machine learning models, we prepared a set of ethical considerations to investigate while exploring and prototyping approaches. We knew we would be working with NGO proposal documents and detailed descriptions of the strategic initiatives. These are already heavily vetted by humanitarian experts, so we assume that these are mostly free of any glaring inherent biases. However, the machine learning approach we settled upon was an open source knowledge graph trained on Wiktionary called ConceptNet. These models trained on open source data are notorious for containing bias extracted from users using discriminatory language on these platforms. One of the most striking examples of this is <a href="https://gizmodo.com/here-are-the-microsoft-twitter-bot-s-craziest-racist-ra-1766820160">Microsoft Tay, which quickly became racist, homophobic, and antisemitic after being exposed to Twitter users for a few hours</a>. During our prototyping phase, we committed to eliminating bias like this in ConceptNet before using the model for our purposes. Read more about our findings in the model prototyping section.</p><h3>Begin with the end in mind</h3><h4><strong>The OCHA dataset</strong></h4><p>The solution required data from NGO project proposals and formal definitions for the four strategic initiatives we targeted. Each NGO that applies for funding must submit an extensive (30+ pages) proposal which includes a statement of purpose, detailed descriptions of its mission, metrics that show why it needs funding, and a rich set of diagrams and images that help visualize the information. These proposals have no associated labels linking them to the strategic initiatives: education in crisis, women and girls, protection, and disability.</p><p>Every project proposal that the UN receives needs to be tagged with one of these strategic initiative labels by our NLP pipeline. Each of these topics is accompanied by a descriptive supporting document that outlines the definition of that strategic initiative and what OCHA’s responsibility is in addressing it. For example, see the <a href="https://www.unocha.org/sites/dms/Documents/120405%20OOM%20Protection%20final%20draft.pdf">definition of protection</a>.</p><h3><strong>Linking strategic initiatives to project proposals</strong></h3><p>So how do you create an explainable document classification algorithm with no explicitly assigned labels? The idea is fairly simple: use commonsense word relationships derived from an open source knowledge graph to link key words extracted from project proposal documents to words related to the strategic initiatives ‘education in crisis,’ ‘protection,’ ‘women and girls,’ and ‘disability.’</p><p>The first step is to extract key words from the project proposals that are representative of the documents. Once we have these terms, we can start building a pipeline that labels which strategic initiative these terms are closest to. There are many well-documented methods to find words or phrases that are important to a document. Methods like TF-IDF, LDA, and other variants are commonly used for this purpose. In this case, the ETL had already developed a robust implementation of <a href="https://github.com/LIAAD/yake">YAKE</a> (Yet Another Keyword Extractor) to gather these phrases from its documents. In addition to this extraction method, Slalom implemented LDA to gather topics from these documents and the keywords related to those topics. Below is an extract of terms found in one of the UN project proposals:</p><pre>keywords = [&#39;wfp&#39;, &#39;provides&#39;, &#39;dispatch&#39;, &#39;rations&#39;, &#39;idps&#39;, &#39;delivery&#39;, &#39;assistance&#39;, &#39;severely&#39;, &#39;situation&#39;, &#39;percent&#39;, &#39;programme&#39;, &#39;partners&#39;, &#39;hudaydah&#39;, &#39;insecurity&#39;, &#39;security&#39;, &#39;insecure&#39;, &#39;million&#39;, &#39;humanitarian&#39;, &#39;food&#39;, &#39;emergency&#39;, &#39;general&#39;, &#39;world&#39;, &#39;response&#39;]</pre><p>The million-dollar question is: how do we map these key terms to the strategic initiatives the UN cares about? Our proposed solution was to create a knowledge graph centered around those humanitarian concepts (education in crisis, women and girls, protection, and disability) and implement a distance metric that finds the closest initiative given a set of key words.</p><p>For example, if we extracted these keywords from a UN proposal:</p><pre>keywords = [&#39;assist&#39;, &#39;safe&#39;, &#39;defend&#39;, &#39;guard&#39;]</pre><p>We’d want to label that document as ‘protection.’ Alternatively, if the keywords we extracted were:</p><pre>keywords = [&#39;learning&#39;, &#39;traumatic&#39;, &#39;schooling&#39;, &#39;unstable&#39;]</pre><p>Our mechanism for labeling these documents would ideally label the document as ‘education in crisis.’</p><p>We used an open source knowledge graph trained on Wiktionary called ConceptNet to represent the logical similarities between words and phrases. However, this knowledge graph contains many words and relationships that are not useful to us because of the vast number of topics it was trained on through Wiktionary. To narrow down the scope of what was represented in this graph, we used the ConceptNet API to gather words related to our strategic initiatives. Below is an extract of the first-depth graph centered around the strategic initiative ‘protection.’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*R2owvElXPS7l3RvTPoPmbw.png" /><figcaption>‘Protection’ ConceptNet Extract</figcaption></figure><p>As you can see, each one of these terms is closely associated with the protection initiative that OCHA is invested in. These relationships are best thought of in terms of sentences found in these NGO documents. For example, in the Yemen humanitarian needs funding proposal, the organization explicitly calls out its need for protection:</p><blockquote>“The escalation of the conflict since March 2015 has dramatically aggravated the <strong>protection</strong> crisis in which millions face risks to their safety and basic rights.”</blockquote><p>Similarly, the South Sudan humanitarian needs proposal shows the need for protection, but doesn’t call it out specifically:</p><blockquote>“Five years of the most recent conflict has forced almost 4.2 million people to flee their homes in search of <strong>safety</strong>, nearly 2 million of them within and nearly 2.2 million outside the country.”</blockquote><p>In both of these situations, funding for protection is paramount. However, notice how in this South Sudan excerpt, ‘protection’ isn’t mentioned, but a related word, ‘safety’, is. This knowledge graph is key for linking the implicit need for protection highlighted in, “flee their homes in search of <strong>safety,</strong>” to the initiative ‘protection’ that will help provide them with funding. We expanded on this simple 8 node knowledge graph to encompass 4,538 concepts by including each initiative in the knowledge graph and running a depth 3 breadth first search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*ls8lPxq3vzsKiIk9oPanLQ.png" /><figcaption>Full ConceptNet Extract with 4,538 Nodes</figcaption></figure><p>The last piece is to implement a function that takes keywords and scores extracted from documents as an input and outputs an initiative label based on concepts embedded in the knowledge graph. To do this, we use a simple softmax of keyword scores divided by the distance of each keyword to the initiative in the knowledge graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/164/1*FOEYwZS4T_iIctXzPGhjwg.png" /><figcaption>Where ri is the relevance score for initiative i over the n keywords extracted from a document, s(k) is the score for each keyword k, and d(k, i) is the distance from word k in the knowledge graph to the specific initiative i.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*LoU0jsaGebNMOzrpwBa2iA.png" /><figcaption>Take the softmax for all relevance scores ri, where m = {education in crisis, protection, disability, women and girls} and rj is the relevance score of the strategic initiative at the index j in set m.</figcaption></figure><p>For example, given a set of terms and their associated scores:</p><pre>entity_scores = {&#39;learning&#39;: .93, &#39;traumatic&#39;: .87, &#39;schooling&#39;: .80, &#39;unstable&#39;: .23, &#39;money&#39;: .77, &#39;poverty&#39;: .52}</pre><p>We can calculate the shortest path between each of these terms and an associated initiative in the knowledge graph. The following shows the distances between these terms and ‘education in crisis’:</p><pre>entity_distances = {&#39;learning&#39;: 1, &#39;traumatic&#39;: 1, &#39;schooling&#39;: 1, &#39;unstable&#39;: 1, &#39;money&#39;: 2, &#39;poverty&#39;: 3}</pre><p>Based on the entity scores and distances, we get the following relevance scores r for each initiative:</p><pre>initiative_relevance_scores = {&#39;women_and_girls&#39;: 1.17, &#39;education_in_crisis&#39;: 2.58, &#39;protection&#39;: 1.26, &#39;disability&#39;: 0.99}</pre><p>We then apply softmax for each initiative i:</p><pre>initiative_softmax_scores = {&#39;women_and_girls&#39;: 0.142, &#39;education_in_crisis&#39;: 0.583, &#39;protection&#39;: 0.156, &#39;disability&#39;: 0.119}</pre><p>Which gives an upper-bounded score that maps the relevance of the entities extracted from a given document to the strategic initiatives that the documents will be labeled with. In this case, the document would be labeled ‘education in crisis’ due to its high score of 0.583. The graph below depicts the holistic pipeline:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*MYNcHbMPgsVjMzI2r-2JwA.png" /><figcaption>Process to Calculate Document Label Likelihood</figcaption></figure><h3><strong>Addressing open source model bias</strong></h3><p>We quickly identified discriminatory language and bias while using ConceptNet to find terms related to the key strategic initiatives. We found the most prominent biases when we looked for terms related to ‘women and girls.’ Here are some of the terms we found while using the ConceptNet API: ‘woman is a gold digger,’ ‘woman is a nymphet,’ ‘woman is a baggage,’ ‘girl is a lolicon,’ ‘woman is an attendant,’ etc. We then looked at terms like ‘refugee’ and ‘disability,’ which are related to the initiatives, and found some disturbing results: ‘refugee related to refujew’ and ‘disability related to useless eater.’ Note that these are specific examples taken out of many valuable results, but regardless, it’s inexcusable to allow these associations to remain.</p><p>To address these issues, the first step we took was to remove all verbiage not found in the project proposal vocabulary. This removed much of the specific slang and discriminatory words that would never be found in an official document unless it was specifically relevant. The second was to remove associations that we deemed biased from the associations to women, including ‘baggage,’ ‘servant,’ and ‘attendant.’ We completed a manual review of all concepts directly related to the strategic initiatives and ensured this bias would not persist into any future iterations of the knowledge graph we built. That being said, we believe the ideal future process includes a group of subject matter experts of various backgrounds reviewing this terminology to promote inter-rater reliability and ensure all model bias is removed.</p><p>ConceptNet has worked to address many of the issues we outlined here and has specifically highlighted its ability to reduce inherent gender bias in its model in a <a href="https://blog.conceptnet.io/posts/2017/conceptnet-numberbatch-17-04-better-less-stereotyped-word-vectors/">2017 blog post</a>. But despite its best efforts, there’s still clear and present bias that we were fortunately able to mitigate with our small knowledge graph subset.</p><p>There’s quite a bit of work left to do in the machine learning field to automatically remove bias from tainted datasets. <a href="https://deepai.org/publication/automatically-neutralizing-subjective-bias-in-text">An example of recent work aimed at reducing inherent bias</a> outlines a method using neutralizing edits in Wikipedia articles to find instances of demographic bias, like using the term ‘mankind’ instead of ‘humankind’ or ‘his career’ as opposed to ‘their careers’ when describing a group of people (Pryzant et al., 2020). Although this work did not directly serve our use case, it’s encouraging to see the research community start to address this problem plaguing many of the most used machine learning datasets.</p><h3>Tying it all together</h3><p>Our implementation was incredibly fast and inexpensive. With the current limited-size knowledge graph, we were able to run it on a micro-instance virtual machine far cheaper than our $150,000 benchmark. As the solution is scaled to accommodate real-time document classification, this cost will increase but not above the target amount. Also, through our initial discovery, we saw very promising results for meeting the 85% required classification accuracy necessary to justify the scaling of this model. However, there’s still a significant amount of expert review required to verify these results.</p><p>There are many future refinements that can be implemented to improve this current pipeline. The UN team is interested in leveraging expertise in its organization to embed domain specific knowledge into the existing knowledge graph. This would seamlessly integrate into the current pipeline by allowing the distance metric to better link these extracted key words to the strategic initiatives that are most relevant to a given document. The distance metric itself is fairly simplistic and could be modified to better represent how graph distance between keywords and initiatives maps to how relevant that term is. The current solution is powerful and is truly just the first step in what will become a scalable, explainable natural language processing pipeline that will help the UN more efficiently allocate donor funds to the humanitarian crises that need it.</p><h3>Learn about us</h3><p>This work was delivered by Slalom’s <a href="https://www.slalom.com/ai-center-purpose">AI Center of Purpose</a> which is dedicated to improving the world with artificial intelligence. Learn more about this team and the associated <a href="https://www.slalom.com/innovation-for-good">Innovation for Good initiative</a>.</p><h3>Acknowledgements</h3><p>Big thanks to Lambert Hogenhout, Kevin Bradley, Mulin Tang, and Jiayue Wu at the United Nations Emerging Technology Lab for partnering with our team at Slalom. Also, to Raki Rahman, Benjamin Chan, Adrien Galamez, Michelle Yi, Tony Ko, Zahra Zahid, Parul Patel, and many others at Slalom for making this solution come to life.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=211b73897014" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>