<?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 Ravil Kashyap on Medium]]></title>
        <description><![CDATA[Stories by Ravil Kashyap on Medium]]></description>
        <link>https://medium.com/@ravil.kashyap?source=rss-22f8be8395e3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RxxifrxfYqf-vZyZjUHHSQ.jpeg</url>
            <title>Stories by Ravil Kashyap on Medium</title>
            <link>https://medium.com/@ravil.kashyap?source=rss-22f8be8395e3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 05:55:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ravil.kashyap/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[Challenges with Enterprise Email Data]]></title>
            <link>https://medium.com/ushur-engineering/challenges-with-enterprise-email-data-4590e6d6b293?source=rss-22f8be8395e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4590e6d6b293</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[classification]]></category>
            <dc:creator><![CDATA[Ravil Kashyap]]></dc:creator>
            <pubDate>Tue, 18 May 2021 04:01:09 GMT</pubDate>
            <atom:updated>2021-05-18T06:53:05.152Z</atom:updated>
            <content:encoded><![CDATA[<p>There is an abundance of data in the Enterprise world that can be used to train a machine learning model for various tasks. Unfortunately, a large portion of the data is unlabelled or unannotated, making the data unusable to some extent. But, when it comes to email data, it is relatively easier to gather emails as they are usually processed, labeled, and archived in a database. Most of the companies already have a system in place that processes emails and places them in their respective category queues, which can be easily harvested for training data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8Bc8NCMC1-OTHMcuO1S8A.png" /></figure><p>Even with good quality labeled data, a lot goes into building a good model that does well in production. This blog highlights some of the commonly encountered challenges while building classification models based on Enterprise Email data.</p><h3>1. Data Sharing</h3><p>Even before we talk about training machine learning models, we first need to get access to the training data. Sharing data is <strong>NOT </strong>as easy as it sounds. Companies have a huge corpus of sensitive information bundled in the training data protected by the privacy laws such as GDPR and HIPAA. These laws protect PII <strong>(personally identifiable information) </strong>and other sensitive information from being disclosed. This poses a huge problem for companies to share their data to train an ML model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fK1qr4GT2AyT5CPQ-73AHg.jpeg" /></figure><p>A clever combination of Named Entity Recognition (NER), Parts of speech tagger (POS-tagging), and regex can be used to identify these personal pieces of information. Occurrences of name, phone number, age, date, address, email, website, and so on are masked with special meaningful tokens. This helps in securely masking PII as well as retain some information about the intent carried by the PII, which can be useful for downstream tasks.</p><p>Masking of PII has two very important counterintuitive benefits: removal of bias and improvement in accuracy of NLP tasks. First, anonymization of data removes unintended bias due to the presence of PII such as names and locations. Second, the removal of PII allows the model to focus attention on other indicators such as intent and actions. Thus, data anonymization acts as a data cleanser!</p><p>Just the fact that the dataset can be anonymized removes barriers to sharing it and opens up a large number of opportunities to solve many enterprise NLP use cases effectively.</p><h3>2. Noise — Separation and Removal</h3><p>Archived email data contains disclaimers, warnings, and signatures embedded along with informative content. Some emails are HTML formatted, some of them have attachments. When building an email classification model, a lot of this additional information act as noise and hinder the performance of the model.</p><p><strong>HTML Formatted Emails:</strong></p><p>Outbound enterprise emails have a well-formatted HTML template. These include different fonts, embedded images, VML tags, and many other things that are irrelevant for email classification. Purging HTML tags and other components result in usable plain text.</p><p><strong>Signatures and Disclaimers:</strong></p><p>Outbound enterprise emails usually go through security checks that result in disclaimers being automatically added to the email. Signatures at the bottom of the emails vary across organizations and geo-locations. These additional signatures and disclaimers act as noise to the model resulting in a high noise-to-signal ratio leading to reduced performance. It is a challenging task to identify and remove signature and disclaimer text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXnqXyM5eRvEodGnnA2_gQ.png" /></figure><p>There are a number of approaches to remove signatures. They are -</p><p><strong>Rule-based approach</strong>: If the content forming the disclaimer or signature is fixed, or there is a pattern to the way it is formatted, a regex pattern can be used to eliminate it from the email body.</p><p><strong>Span-based prediction model</strong>: Train a span prediction model that takes the entire email as input and predicts the start token and the end token of the signature. With the information of start and end tokens, we can even get rid of multiple signatures and disclaimers in the email body, if present.</p><h3>3. Enterprise Jargons</h3><p>Emails are filled with domain-specific jargon that is sometimes not part of the word vocabulary of out-of-the-box ML models. At times, the abbreviation itself can be an actual word in the vocabulary. Even the way emails are structured and the language used is domain-specific. If we take the insurance domain as an example, we see emails checking for a claim status or asking for benefits of a particular policy, or submitting documents related to a claim. The language used in framing these emails may differ from an email complaining about a service or a product.</p><p>The model must understand and adjust to this new form of data. To achieve that, we can fine-tune our language model to fit the training data. This way, we leverage the already-learned “understanding” of the English language and enhance the model’s linguistic abilities to understand and adjust to the domain-specific language used in emails.</p><p>Emails can also contain abbreviations that only domain experts may be aware of, eg — LOA (Letter of Authority) document or EOB (Explanation of Benefits). It might be a good idea to collate the abbreviations and expand them. This helps the model understand the context of the abbreviation a little better, resulting in improved performance.</p><h3>4. Data Overlap</h3><p>More often than not, some categories in the training data have overlapping intent. The boundary which separates these topics is not well defined, which results in the model incorrectly classifying samples between these categories. A typical example from the insurance domain would be a “query” category for an insurance provider. A “claim query” category would handle queries on a claim, whereas a “general query” would be a superset and cover any general queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*A9DYPycV1u7hlSJL6_Cgeg.png" /></figure><p>Even with a large enough training dataset, the model might still struggle to distinguish between overlapping categories. One nifty way to improve the classification accuracy is to leverage any additional information associated with these categories. For instance, a “claim query” may almost always have a claim number against which the query is directed. We can use “Data Extraction” techniques to extract the claim number and validate it against a lookup with all the claim numbers. A successful claim number extraction can be used to route the classification into the correct category.</p><h3>5. Model Drift</h3><p>If there is one ultimate truth about life, it is that “Nothing Lasts Forever”. The same is true for machine learning models as well. In a dynamic environment, a model’s performance is not guaranteed. Over a period of time, the model’s performance deteriorates. This can be a result of both data drift and concept drift.</p><p><strong>Data Drift — </strong>With time, the format of emails can change, or the way emails have been written can evolve. This can result in the model performing worse on the production/inference data, as the data may be falling under a different distribution than the training data distribution on which the model was trained on. The training dataset is usually fetched from historical data, therefore, it is important to ensure that there is no significant change in the historical training data and the data on which model will be inferred on.</p><p><strong>Concept Drift — </strong>Concept drift refers to the change in statistical properties of the target class. In simple words, the description that constitutes a category we want to predict changes over time. When a model is trained, it learns a function that maps the input to the target. Since the target has changed, the function is no longer accurate, resulting in incorrect predictions. Organizational changes and restructuring may affect the way category is defined.</p><p>Model drift can lead to unexpected behaviors. Therefore, it is important to detect this phenomenon early on. It is recommended to monitor the predictions of the model over time to identify any pattern or anomaly that can indicate model drift. Periodically retraining the model with newer data also helps to keep the model up to date. While designing ML models, we have to anticipate these changes, for which understanding the data is very important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IoL7mOSTvP04wSwyqir7Bg.png" /></figure><p>While we at <a href="http://www.ushur.com/">Ushur</a> continue to invent solutions like <a href="https://ushur.com/smartmail/">SmartMail</a>(TM) — <em>an intelligent automation solution for high-volume email triaging, email classification, and data extraction</em> — using complex data anonymization schemes and homegrown NLP solutions, the challenges of dealing with complex enterprise datasets can only grow over time. As Spider-Man from an Enterprise world would say, “<em>With Enterprise Data comes great responsibility</em>”, and we have to constantly be in a position to brace such challenges with creative solutions &amp; diligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4590e6d6b293" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ushur-engineering/challenges-with-enterprise-email-data-4590e6d6b293">Challenges with Enterprise Email Data</a> was originally published in <a href="https://medium.com/ushur-engineering">Ushur Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>