<?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 John Myers on Medium]]></title>
        <description><![CDATA[Stories by John Myers on Medium]]></description>
        <link>https://medium.com/@jtm_tech?source=rss-67ac73fa509b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hl3q9MqAUYryavhP.jpg</url>
            <title>Stories by John Myers on Medium</title>
            <link>https://medium.com/@jtm_tech?source=rss-67ac73fa509b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:05:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jtm_tech/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[Automated Data Exposure Detection with Gretel Outpost]]></title>
            <link>https://medium.com/gretel-ai/automated-data-exposure-detection-with-gretel-outpost-c2721ad31af8?source=rss-67ac73fa509b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2721ad31af8</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[security-tool]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[John Myers]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 16:51:39 GMT</pubDate>
            <atom:updated>2020-08-13T19:33:44.066Z</atom:updated>
            <content:encoded><![CDATA[<p>On August 25th <a href="https://gretel.ai/">Gretel</a> will launch its free Public Beta and we are super excited to enable developers to create safe data with our cloud service and developer <a href="https://github.com/gretelai">SDK</a>s. As we build, we constantly find new use cases for our technology.</p><p>Previously, while testing our own service, we discovered unintentional PII in a <a href="https://medium.com/gretel-ai/how-we-accidentally-discovered-personal-data-in-a-popular-kaggle-dataset-ac0a26bee74b">popular Kaggle dataset</a>. Since then, we’ve continued to observe the multiple data leaks in the news and have had several discussions with enterprise security and privacy teams, who reached out to see how our automated data labeling could minimize the risk of accidental data exposure.</p><p>After some great conversations and some weekend coding sessions we are happy to announce <strong>Gretel Outpost</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ZAaqt2Q6QBO6drOez-_QHA@2x.png" /><figcaption>Gretel Outpost Logo</figcaption></figure><p>Outpost is a free integration architecture that ingests alerts from common security tools, executes data collection surveys, and sends that data to Gretel to quickly identify the exposure of PII and sensitive data. In a sense, Outpost automates the steps that a security team will take in assessing the risk or exposure to data associated with the security alert.</p><h3>Overview</h3><p>Outpost has two components that work hand-in-hand:</p><ul><li><strong>Consumers</strong>: These modules receive alerts from security tools and parse the alerts to create a survey request message. We currently support <a href="https://www.shodan.io/">Shodan</a> and will be adding more modules that provide support for GitHub, BitBucket, GitLab, Amazon S3, and custom web hooks to support any system that can send HTTP requests!</li><li><strong>Surveys</strong>: These modules receive survey requests and depending on the request type, will attempt to gather data at a more granular level and extract record-level information. For each successful survey, a new Gretel Project will be created and samples of the data will be sent to the project, enabling security teams to easily share granular access of the discovery to data owners during investigations. Gretel <a href="https://medium.com/gretel-ai/how-we-accidentally-discovered-personal-data-in-a-popular-kaggle-dataset-ac0a26bee74b">automatically labels sensitive data types</a> including names, addresses, access keys using Gretel’s Natural Language Processing (NLP) and provides you a high level report of what it finds.</li></ul><p>The diagram below illustrates possible deployment modes for Outpost using the Shodan consumer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FIbtPjR-eAd73Yaama3ipg.png" /><figcaption>Example Shodan.io Deployment with Gretel Outpost</figcaption></figure><h3>Example Flow</h3><p>One example deployment would be using Shodan.io (a search engine that scans the Internet) alerts to identify publicly accessible ElasticSearch systems that reside within your organization’s public IP ranges. First, you would configure Shodan to <a href="https://help.shodan.io/guides/how-to-monitor-network">monitor IP ranges and/or domains</a> that belong to your organization. Second, start Outpost with the Shodan consumer enabled.</p><p>Whenever Shodan yields an alert that indicates a possible exposed ElasticSearch system, a survey request will be generated and the ElasticSearch survey module will attempt to extract sample documents and send them to a new Gretel Project. We will sample documents from all possible indices, which provides maximum coverage on all possible data that is exposed.</p><p>Additionally, the raw Shodan alerts are also consumed, processed for data labeling, and made available in its own Gretel Project. This provides a quick, safe way to view everything Shodan knows about your infrastructure.</p><p>Survey data shows up as new projects in your project list and contain a short description of the survey that created the project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wtGuOenVoODb9ELL" /><figcaption>Gretel Project Listing with Outpost Survey Results</figcaption></figure><p>Now you may invite others to look at the data or use our SDKs to anonymize and share the findings with others. The records that are sent to Gretel are encrypted in a memory-only stream and we only retain the most recent 50,000 records to enable raw data analysis.</p><p>Metadata about the records, however, will be kept for the duration you keep the project active and can accumulate metrics well beyond the cached 50,000 records. One particular report that is useful when analyzing sampled data from Outpost is the entity report, which shows high level statistics on what types of data we saw across the entire ingest stream:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TWt-QIcehTpd4kcJ" /></figure><h3>How to get started with Outpost</h3><p>Outpost is a free community project, however due to the sensitive nature of its capabilities we have chosen not to open source it at this time. We welcome any team member of a security or privacy organization that has a need to mitigate exposure risk to request access. We will add you to our GitHub team, which provides access to the code and deployment guides.</p><p>Outpost is available today and will be usable with our public beta that launches August 25th!</p><blockquote>Please contact us at <a href="/service/mailto:outpost@gretel.ai">outpost@gretel.ai</a> if you are interested in joining the GitHub team to get access to Outpost.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2721ad31af8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gretel-ai/automated-data-exposure-detection-with-gretel-outpost-c2721ad31af8">Automated Data Exposure Detection with Gretel Outpost</a> was originally published in <a href="https://medium.com/gretel-ai">Gretel.ai Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we accidentally discovered personal data in a popular Kaggle dataset]]></title>
            <link>https://medium.com/gretel-ai/how-we-accidentally-discovered-personal-data-in-a-popular-kaggle-dataset-ac0a26bee74b?source=rss-67ac73fa509b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac0a26bee74b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[John Myers]]></dc:creator>
            <pubDate>Thu, 02 Jul 2020 15:31:01 GMT</pubDate>
            <atom:updated>2020-07-02T16:17:56.418Z</atom:updated>
            <content:encoded><![CDATA[<p>In the coming weeks, the <a href="https://gretel.ai/">Gretel Public Beta</a> will be available for developers everywhere. We are so excited and we want to discuss some of the features early on so you can start to think about all the workflows that are possible!</p><p>In this post we will share some of the upcoming features in Gretel, and how those features enabled us to discover personally identifiable information including full names and email addresses in the popular <a href="https://www.lendingclub.com/">Lending Club</a> financial dataset on <a href="https://www.kaggle.com/">Kaggle</a>.</p><p>Gretel helps developers share data more safely so you can build faster and better. To do that, we are building workflows that enable you to better understand your data and then make informed decisions on how to make this data safe to share. This workflow is outlined below:</p><figure><img alt="The Gretel Workflow starts with Automatic Labeling of data, which enables multiple downstream workflows for safe data sharing" src="https://cdn-images-1.medium.com/max/1024/1*3yz3vbqZHzZjjqkkCnLPxg.png" /><figcaption>Gretel Workflow</figcaption></figure><p>When you use Gretel, your data’s first stop is our labeling pipeline, for automatic data labeling. We use a combination of <a href="https://en.wikipedia.org/wiki/Natural_language_processing">Natural Language Processing</a> (NLP) featuring neural network-based entity recognition for names and addresses, managed regular expressions, and custom extractors to label different types of entities. In the NLP space, this is referred to as <a href="https://en.wikipedia.org/wiki/Named-entity_recognition">Named Entity Recognition</a> (NER).</p><p>Gretel offers NER in two flavors:</p><ol><li>Asynchronous project streams: Here you can create a Gretel Project, ingest your data through our REST API, and your data will be labeled and ingested into an encrypted, memory-only based stream. The labeled records can also be consumed back through our REST API, allowing a variety of publish/subscribe workflows to be built.</li><li>Synchronous API: Our REST API also has endpoints where you can send a limited number of records and instantly receive a labeled version of the record back. This is great for experimentation, debugging, or just getting a feel for our APIs.</li></ol><p>The data structure will be the same whether or not you are using our synchronous API or our publish/subscribe project stream. That will allow you to build applications that function the same regardless of which API you use.</p><p>Now, we’ll walk you through automatic data labeling in Gretel, using real <a href="https://www.kaggle.com/wendykan/lending-club-loan-data">Lending Club loan data</a> from Kaggle. (We were impressed by its vast dimensionality of the data set, so have been using it for some of our own testing!) The Lending Club loan dataset is approximately 2.2 million records with 147 fields in each record. We used one of our language client libraries to stream all the records through our API and explore the entity index that was built.</p><p>Take a look at the Lending Club example below (we altered the record before testing with it to not reveal any of the original data). All labeled record results have a “records” array. Each element in this array is a pair of the original record we received and our attached metadata. Each element in the “records” array has two top level keys: “data” and “metadata.” The “data” key is the original record we received. The “metadata” key contains all of the information we learned about this record.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8edb7f54585c5c3e2d60420729bda64/href">https://medium.com/media/f8edb7f54585c5c3e2d60420729bda64/href</a></iframe><p>Note that we assign a unique “gretel_id” for every record you send us. In synchronous mode, the ID is returned along with all completed data. When you use the asynchronous API, you only receive the ID back and the labeled data is available in your project stream.</p><p>We also provide metadata information on a per-field basis. As you can see, in this record (and several others) it appears the “desc” field has a lot of free-form text which can easily contain sensitive information. Any fields that have entities detected will have a “ner” key and an array of label objects. Once this metadata is created, you can plug into our Transformer SDK, use our rule-engine Docker container to do specific routing based on detected entities, or build your own workflows.</p><p>Looking closer at the label object structure:</p><ul><li><strong>text</strong>: The actual data that was matched</li><li><strong>start</strong>: The starting index offset in the string that contains the entity.</li><li><strong>end</strong>: The ending index offset in the string that contains the entity.</li><li><strong>label</strong>: A unique label, managed by Gretel, that describes this entity. We maintain a catalog of these labels and each entity will have one.</li><li><strong>source</strong>: This is a unique name for the backend service which discovered the entity. If the same entity is matched by multiple sources (for example both Spacy and a Regex) then there will be separate label objects for each.</li><li><strong>score</strong>: Depending on the detector, we assign a score between 0 and 1 to indicate a confidence level. Because we are optimized for working with semi-structured data, we will use field names to help infer detections which leads to higher scores. Lower scores are for detections that may not have any context from the field name.</li></ul><p>If you followed our example closely, you may have realized that as a result of our data labeling, we discovered personally identifiable information in this public data set. To our surprise, we noticed a handful of specific identifiers, like email addresses and phone numbers, when labeling the data. At first, we had assumed they were redacted and substituted with fake surrogate data. Ultimately, the Gretel data labeling service discovered 27 records containing email addresses, first and last names, and phone numbers.</p><p>We take privacy very seriously, so we immediately notified Lending Club of our discovery and have been working with their security team to remediate personal information in their public datasets. But had this data been scanned by Gretel originally, these records could have been properly sanitized, fields dropped (like the verbose “desc” field), or the entire record dropped before releasing publicly.</p><h3>Conclusion</h3><p>We’re super excited about applying natural language processing to help developers learn and reason about data. We’d love to hear about your use cases- feel free to reach out to us for a more in-depth discussion in the comments, <a href="https://twitter.com/gretel_ai">twitter</a>, or <a href="/service/mailto:hi@gretel.ai">hi@gretel.ai</a>. Follow us to keep up on the latest trends with data!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac0a26bee74b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gretel-ai/how-we-accidentally-discovered-personal-data-in-a-popular-kaggle-dataset-ac0a26bee74b">How we accidentally discovered personal data in a popular Kaggle dataset</a> was originally published in <a href="https://medium.com/gretel-ai">Gretel.ai Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gretel Synthetics: Version 0.10.0]]></title>
            <link>https://medium.com/gretel-ai/gretel-synthetics-version-0-10-0-fa77e960ecc8?source=rss-67ac73fa509b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa77e960ecc8</guid>
            <category><![CDATA[synthetic-data]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[differential-privacy]]></category>
            <dc:creator><![CDATA[John Myers]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 16:01:01 GMT</pubDate>
            <atom:updated>2020-06-17T16:01:01.277Z</atom:updated>
            <content:encoded><![CDATA[<h3>Gretel Synthetics: Introducing v0.10.0</h3><p>Today we are thrilled to release new features for<a href="https://github.com/gretelai/gretel-synthetics"> gretel-synthetics</a> that make it even easier to get started with synthetic data. After initial rounds of testing and feedback from customers we are introducing a new interface that works directly with Pandas DataFrames and allows batched training of columns to <em>exchange your source DataFrame directly with a synthetic DataFrame of the same shape</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUGwlhNyCbUDyYjTd_VxuQ.png" /><figcaption>Gretel Synthetics v.0.10.0</figcaption></figure><blockquote>Got DataFrames? Want synthetic data? It is time.</blockquote><p>The Batch interface uses the existing config, training, and generation modules under the hood while automating some of the manual steps a user would have to take to work with complex and highly dimensional datasets.</p><p>The motivation behind the Batch interface is to support datasets with high dimensionality and column counts. This is achieved by clustering like columns and training models on subsets of the entire dataset at once. While batching is generally not required to generate synthetic datasets with less than 30–40 columns, scaling to support datasets with hundreds or thousands of columns requires a different approach.</p><p>One of the biggest benefits to Gretel’s synthetic data library is its ability to automatically <a href="https://medium.com/gretel-ai/deep-dive-on-generating-synthetic-data-for-healthcare-41acb4078707">learn and maintain correlations and statistical relationships between columns</a> at both the dataset and record levels. For example, consider height and weight. Taller people tend to be heavier — that’s an example of a positive correlation, which would be learned automatically by our model. Not all columns are directly correlated, however, and by splitting the input training into batches or clusters of columns, it becomes possible to scale synthetic generation to highly dimensional datasets with minimal loss in accuracy.</p><h3>Getting Started</h3><p>Let’s explore how we create our Batch interface. Click the link below to build a synthetic dataset interactively with our batch training notebook (including free GPU access 🔥) on Google Colaboratory.</p><p><a href="https://colab.research.google.com/github/gretelai/gretel-synthetics/blob/master/examples/dataframe_batch.ipynb">Google Colaboratory</a></p><p>First, define parameters for training Gretel’s synthetic data model:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b6fd58d4dc675c24387312f4ebc2cdc/href">https://medium.com/media/5b6fd58d4dc675c24387312f4ebc2cdc/href</a></iframe><p>Gretel Synthetics’ DataFrameBatch object only takes two keyword arguments to function.</p><p>First is your source PandasDataFrame and second is a configuration template. The parameters for the configuration template are <em>exactly the same</em> as the configuration parameters you would use for a<a href="https://gretel-synthetics.readthedocs.io/en/stable/api/config.html"> synthetic configuration</a>, simply put them into a dictionary instead. Version 0.10.0 also includes detailed doc strings for each of the config parameters so you can explore and tune for more sophisticated use cases.</p><p>By default we split the input DataFrame into batches of 15 columns. This can be changed via init params and additionally you may use a <em>batch_headers</em> parameter to provide your own batches of headers.</p><p>There are a couple of notable changes / updates:</p><ul><li><em>input_data_path </em>is not required (and will be ignored if provided) since this module will create the training data for you based on the input DataFrame.</li><li><em>gen_lines</em> is optional and if omitted we will automatically set this value to be the number of rows as the input DataFrame. <em>This means that the synthesized data should be of the same shape of the input DataFrame!</em></li><li><em>checkpoint_dir</em> will automatically have “batch_N” sub-directories created under it. Each directory will contain the training data and models specific to that batch’s data.</li><li><em>field_delimiter </em>is required for Batch mode. If no validators are provided, at a minimum, the batch module automatically ensures generated lines have as many columns as the input training data. This parameter controls how generated lines are split back into columns.</li><li>Note that regardless of how headers are split and batched, the final synthetic DataFrame will have the headers in the same order as the input DataFrame.</li></ul><h3>Data Validation</h3><p>A vital step in data synthesis is validating that generated lines meet specific constraints. Gretel Synthetics allows validators to be used for each line, this functionality extends into the Batch module by allowing validators to be set for each batch.</p><p>By default, if no validators are provided, each line generated for a batch will be checked that it can be split back into the number of headers that exist for the batch. This ensures that the output DataFrame has the same shape as the input DataFrame.</p><p>If you wish to configure a validator for a specific batch — for example, to balance a health dataset by <a href="https://towardsdatascience.com/reducing-ai-bias-with-synthetic-data-7bddc39f290d">only generating female gender records</a> — you can do that like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/688e4eeb97b8ce301fb46a95cb263688/href">https://medium.com/media/688e4eeb97b8ce301fb46a95cb263688/href</a></iframe><h3>Coming soon…</h3><p>Stay tuned for our Public Beta which makes several more libraries available, including our custom validator package.</p><p>Our custom validation package will automatically learn constraints in your data and enforce them during generation. This includes character sets, numerical boundaries, string patterns, and more! As always, we will have simple API interfaces and notebooks examples to help you get started.</p><h3>Wrapping Up</h3><p>Once we have created our DataFrameBatch<em> </em>instance, we need to go through the training and generation process. These functions are bundled into three core methods for: generating training data, training the models, and generating synthetic data:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/190a7a809b6d95eecccbbe5ea5af8921/href">https://medium.com/media/190a7a809b6d95eecccbbe5ea5af8921/href</a></iframe><p>Now you’ve got your synthetic data!</p><p>We hope this overview has been helpful. Please step through our <a href="https://github.com/gretelai/gretel-synthetics/blob/master/examples/dataframe_batch.ipynb">sample notebook</a> which walks through the entire process using a publicly available dataset.</p><p>Feel free to shoot us feedback at <a href="/service/mailto:hi@gretel.ai">hi@gretel.ai</a> or open an <a href="https://github.com/gretelai/gretel-synthetics/issues">issue on GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa77e960ecc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gretel-ai/gretel-synthetics-version-0-10-0-fa77e960ecc8">Gretel Synthetics: Version 0.10.0</a> was originally published in <a href="https://medium.com/gretel-ai">Gretel.ai Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Contact Tracing: Deep Dive & Simulation]]></title>
            <link>https://medium.com/gretel-ai/contact-tracing-deep-dive-simulation-d4feed373c09?source=rss-67ac73fa509b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4feed373c09</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[covid19]]></category>
            <dc:creator><![CDATA[John Myers]]></dc:creator>
            <pubDate>Mon, 13 Apr 2020 16:58:44 GMT</pubDate>
            <atom:updated>2020-04-13T17:15:10.163Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s been a lot of scrutiny, concern, and analysis of the <a href="https://www.apple.com/covid19/contacttracing">Contact Tracing</a> proposal from the joint Apple + Google effort to provide privacy preserving capabilities that inform people when they have been in close proximity to a COVID-19 infected person. I decided to examine this a little further to see exactly what was being proposed, how it would be implemented, and what privacy concerns there are.</p><p>I implemented the cryptographic portion of the specification in Python and created a rudimentary “Life” simulator that shows what results can be expected. The code is <a href="https://github.com/gretelai/contact-tracing-experiment">available on GitHub</a>.</p><p><em>The big takeaway is Apple and Google’s specification substantially lowers privacy risk for contact tracing by not collecting existing data, but by generating new custom data specific to the use case. This privacy preservation happens at the lowest possible level. The handset can compute as much data as possible but share as little as possible in order to provide effective contact tracing while preserving user privacy.</em></p><h4>Summary</h4><ul><li>This is not location tracking. There is no GPS collection. Handsets exchange secure unique bits of data using Low Energy Bluetooth connections which are only possible when the handsets are near each other.</li><li>This would be an opt-in program, to include the voluntary reporting of a positive COVID-19 test.</li><li>As written, no <em>specific personal or handset</em> information needs to ever leave the device. Only the cryptographically secure keys or signatures that were <strong><em>created for and only for this use case </em></strong>need to be sent externally for effective results.</li><li>The privacy focus is about ensuring the application and aggregator of the self-identifying subject data cannot identify who you are or who you have interacted with.</li><li>The biggest risk to privacy will be how application developers implement the extraction and storage of Daily Trace Keys and what <strong><em>additional pieces of information they might request (or take) that are not within the scope of the initial specification.</em></strong></li></ul><h4>Crypto Components</h4><p>The core of this specification is creating a 3-tier system of secure identifiers / keys that can be selectively exchanged.</p><p>The first component is the handset Tracing Key. The Tracing Key is a unique 32-byte base encryption key that will never leave the device. Ever.</p><p>Second is the Daily Trace Key (DTK). This is a derivative encryption key that is created every 24 hours using a HMAC Key Derivation Function (HKDF). This key:</p><ul><li>Will never leave the handset if the the handset owner never reports a positive infection.</li><li>Will leave the handset if and only if the owner reports a positive infection.</li><li>If a positive infection is reported, the last N (14 days) DTKs will be transmitted and only transmitted to a remote system (presumably maintained by the application developer or agency). This is done so the remote system can distribute these DTKs to all other handsets to determine potential risky contacts.</li></ul><p>Finally, there is the Rotating Proximity Indicator (RPI). This essentially is a 16-byte digital signature that is derived from a particular DTK. For a single DTK, there can be up to 144 unique RPIs. We use a HMAC to compute this and part of the message component to the HMAC is the nearest 10-minute interval for that day.</p><ul><li>00:00–00:10 = interval 0</li><li>00:10–00:20 = interval 1</li><li>…</li><li>23:50–24:00 = interval 143</li></ul><p>We concatenate the interval number to the string “CT-RPI” to create the message we are hashing.</p><p>So we compute the first RPI of the day as <em>HMAC(dtk, “CT-RPI0”, sha256) </em>and the last RPI of the day as <em>HMAC(dtk, “CT-RPI143”, sha256)</em>.</p><p>Technically, the device only computes a new RPI when the Bluetooth MAC address changes but the specification allows for every 10 minutes if needed. MAC address rotation is usually between 10 and 20 minutes.</p><h4>Proximity Exchange</h4><p>So, at any given point in time. A single handset will have:</p><ul><li>Exactly one Tracing Key</li><li>Exactly one “active” Daily Tracing Key</li><li>A historical list of previously used Daily Tracing Keys</li><li>Exactly one “active” Rotating Proximity Indicator</li></ul><p>Because of the chain of custody from the base Tracing Key we are almost sure there will be no collisions across these varying components.</p><p>When 2 handsets come within close proximity to each other (which is detected by one handset sensing another bluetooth device near by), each handset will send the other handset its current RPI.</p><p>So if handsets A and B come within a proximity where they can sense each other’s Bluetooth connections. A will send B an RPI and B will send A it’s RPI.</p><p>Each handset stores a growing list of RPIs it received from other handsets.</p><h4>Determining Risky Contacts</h4><p>When the owner of a handset receives a positive test result for COVID-19, that owner will have the option to self-identify in whatever application is using this protocol. Then the application will:</p><ul><li>Gather the last N used Daily Tracing Keys (default to maybe the last 14)</li><li>Send these DTKs to a remote server</li></ul><p>At this point, all other handsets are able to download these DTKs. Now remember, given any DTK, you can compute all possible 144 RPIs from that DTK without needing any other information.</p><p>So, if a handset receives a list of 14 DTKs from the remote server, that handset can compute all potential RPIs for that list of DTKs. This is 14 * 144 (2,016) possible RPIs. The handset now determines if one or more of those 2,016 RPIs are in its own list of RPIs that it received from other handsets in the last 2 weeks.</p><p>This is essentially doing a set intersection between the 2,016 derived RPIs from our infected subject and the set of all RPIs we received from other handsets.</p><p>The intersection of RPIs now represent precise windows of time that a handset was in close proximity to another handset where the owner has tested positive for COVID-19.</p><p>Here is a simplified graphic overview of how this process works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*4MtiLU7vy8EHVpROkeCc2Q.jpeg" /><figcaption>Simplified Flow for Bluetooth Enabled Contact Tracing</figcaption></figure><h4>Simulation</h4><p>To simulate how this works I created a basic Python class that represents a single handset. Additionally, I created a Life class that simulates 2 weeks of life-living from a subject that will eventually test positive for COVID-19.</p><p>The pattern-of-life is very rudimentary, we assume the individual interacts with family in the morning, co-workers for most of the day, other random individuals at meals, errands, etc and back to family in the evening. Weekends are a mix of interacting with family, friends, and others.</p><p>The README will get you started if you want to run it yourself. When the simulation begins, we choose a random amount of family, friends, co-workers and others that you will interact with. The “others” category represents all the people the subject does not know, but interacts with at stores, gyms, etc.</p><p>The number of unique handsets increases for family, friend, and so on in an attempt to be a little realistic about who you have close and continuing contact with.</p><p>After it runs, a “report.txt” will be generated. The header of this report will show the chosen sizes of your groups:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*4sCpUtZSkeK6m4OUK-hp6g.png" /><figcaption>Report Header</figcaption></figure><p>I hard-coded the start date to be 13 Apr at 0700 AM ET.</p><p>Each interaction with a category of people chooses a handset at random from that group. Naturally this yields higher amounts of interaction with family compared to a larger group like “others.”</p><p>The other sections in the report shows what a <em>single handset</em> might show to its owner. Each handset report <strong><em>would not be able to be aggregated at a single location.</em></strong></p><p>Additionally, the report is sorted descending by the number contact windows each handset had with the infected individual.</p><p>Taking the first handset report from the list, shows a high level of interaction with the subject:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*YIBpPFzLRooSZJOOPTpqHQ.png" /><figcaption>Derived time periods of proximity for a simulated family member</figcaption></figure><p>Naturally, as we scroll down the report, other relation categories have fewer interactions with the subject:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*b2d6dAnjOS69bGZY1181nA.png" /><figcaption>Simulated co-worker interaction</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*TBQYMhXr-KIhfNOjL7Sreg.png" /><figcaption>Simulated “other” interaction</figcaption></figure><h4>Privacy</h4><p>The protocol itself drastically reduces risk of re-identification. Rotating unique IDs that grow in cardinality for any given handset help mitigate risk. The rotating RPIs assist in providing much better granularity of risky contacts while also mitigating re-identification.</p><p>With that said, the upstream use of this protocol is the biggest risk.</p><p>Device and owner specific information should not be collected, ever. It’s “easy” to also collect device / user information especially in the step where DTKs are sent to a remote system. This would include handset data, GPS location information, and transport information (IP addresses, etc). This data can be joined and used to re-identify DTKs to specific people.</p><p>This protocol does not guarantee anonymity from other people that may receive a notification once the subject discloses an infection. Primarily because it is very likely someone might recall where they were on any date and time and narrow down the potential list of carriers to the subject that reported the positive test in the first place.</p><p>Generally, the protocol should be implemented in a way that ensures the owner of the upstream systems that collect DTKs are unable to identify specific individuals. This protocol should more quickly enable better testing candidates and faster quarantines and does not replace the more specific location/trend analysis that public health professionals will have to do.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4feed373c09" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gretel-ai/contact-tracing-deep-dive-simulation-d4feed373c09">Contact Tracing: Deep Dive &amp; Simulation</a> was originally published in <a href="https://medium.com/gretel-ai">Gretel.ai Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fast data cataloging of streaming data for fun and privacy]]></title>
            <link>https://medium.com/gretel-ai/fast-data-cataloging-of-streaming-data-for-fun-and-privacy-17bb1ec7d3ed?source=rss-67ac73fa509b------2</link>
            <guid isPermaLink="false">https://medium.com/p/17bb1ec7d3ed</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[uber]]></category>
            <dc:creator><![CDATA[John Myers]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 17:32:04 GMT</pubDate>
            <atom:updated>2020-03-05T17:32:04.777Z</atom:updated>
            <content:encoded><![CDATA[<h3>TL;DR;</h3><p>While experimenting with the Global Bikeshare Feed Specification (GBFS) data set, we noticed some interesting fields that we determined could be a potential privacy issue from a leading rideshare operator. We reported this information to the operator and the issue was patched the same day. No red tape, developers helping developers. In this post we’ll explore how we discovered these privacy concerns with our APIs.</p><h3>The Metastore</h3><p>Gretel’s APIs, by default, automatically build a metastore that makes it easy to understand what is inside of your data. Many developers are used to working with metastores that are provided by technologies like Hive, and incorporated into services like AWS Glue. The metadata provided here is extremely useful, but not very friendly to work with. At Gretel, we strive to make everything accessible through our REST API, a concept virtually every developer is familiar with.</p><p>Once you start sending records to the Gretel API, indexing to the metastore automatically begins. In this case, we were streaming several hundred of the GBFS <a href="https://github.com/NABSA/gbfs/blob/master/gbfs.md">free_bike_status.json</a> feeds into our API. The most obvious field from the specification is “bike_id”, as this is most likely a primary identifier.</p><p>Pretty straight forward here, most of the values are strings, we’ve seen over 17 million records with this field, with an approximate unique count just over 1.1 million. Our initial hunch is 1.1 million unique IDs is <em>a lot </em>of e-bikes and scooters out there…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*jqoJvGsEEWPgIwrZ3dvcSw.png" /><figcaption>Gretel Metastore API Call Result</figcaption></figure><p>Understanding what other fields in your data that can correlate to your primary IDs / keys is a vital part of privacy introspection. Remember, even if a unique ID is removed, there could very well be another field or combination of fields that provides a similar level of attribution (see the <a href="https://www.wired.com/2010/03/netflix-cancels-contest/#">Netflix Prize Challenge</a>). One technique we use to find other potentially identifiable fields is comparing field names using word embeddings to infer relationships</p><p>By creating Word2Vec and FastText models trained on the schemas of thousands of open-domain databases and tables, we’re able to do fast comparisons between schema field names to clue us in to other fields we may want to pay attention to. This is great because it gives us clues <em>without ever having to analyze the field contents! </em>Comparing all of the other fields in the records yields two closely related fields (based on field name): “is_ebike” and “jump_vehicle_name.”</p><p>Looking at “is_ebike” shows us this is most definitely a boolean value (which is almost always set to one value so basically a constant). It’s also not very common, with only 11k entries, so probably only being reported infrequently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*t14Ch11GUcKu_sCb1b8vEA.png" /><figcaption>Gretel Metastore API Call Result</figcaption></figure><p>Moving on to the next field with the metastore tells a slightly different story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*xB0Ilvt4OIvhHb0kCxhWIg.png" /><figcaption>Gretel Metastore API Call Result</figcaption></figure><p>So we see an overall lower number of fields with this name, not surprising, as this is only one operator of several sending location data. But what’s more surprising is the lower overall approximate unique count of field values relative to the total field count.</p><p>When comparing the percentage of unique values between “bike_id” and “jump_vehicle_name” at this point in time, it is approximately 6.6% vs 0.4% respectively. As we discuss below, the p_unique value for “bike_id” will generally level off while the value for “jump_vehicle_name” would infinitely approach 0 as time moves on.</p><h3>Deep Dive</h3><p>We decided to take a closer look and pull some of the raw data and see what was going on with these IDs. With respect to the “bike_id” fields, we found that in general, over time, the cardinality of this field was steadily increasing. It turns out that some data producers were actually generating ephemeral “bike_id” values on a steady interval. This would explain why the cardinality was increasing steadily.</p><p>When we isolated the “jump_vehicle_name” field, however, the cardinality over time was basically linear. To us, this indicated that this field probably has a one-to-one mapping with an actual vehicle.</p><p>This field was also only 6-characters long, more friendly for a small screen, while the “bike_id” field usually appeared to be some type of UUID.</p><blockquote>Then we checked the actual Uber app and found that jump_vehicle_name field values were the actual scooter names that show up in the Uber application.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5z7iLdHXU2De1rYadxxSsg.png" /><figcaption>Scooter in Baltimore (Fell’s Point)</figcaption></figure><p><strong>Side Note:</strong> <em>If you’re ever in Baltimore definitely check out One-Eyed Mike’s (in the map above). Awesome row home converted to a restaurant and bar. Great cocktails and awesome food.</em></p><p>By generating snapshots of the GBFS feed, it becomes fairly straight forward to create a “ride record” that shows a change in a scooter’s GPS location based on a previous value. Plugging this ID into that dataset shows some unique rides. By computing the geodesic distance between coordinates we can also create a filter to show changes in location that are above a certain value (to avoid GPS drift).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ug1LFiAcViejdpt5OEqoJA.png" /><figcaption>Sample Scooter Rides</figcaption></figure><p><strong>The privacy implications here are real.</strong> Observing bikes through the app (or getting the vehicle name from the bike itself) combined with aggregated feed data could allow ride reconstruction for specific individuals as they rent scooters.</p><h3>Disclosure</h3><p>When deciding to suggest the removal of this data we originally looked at HackerOne but ran into a roadblock. None of us are super active HackerOne users so by default, we don’t have any “signal” (aka street credit) on that system to actually submit anything. Then we decided to do what any other developer would do, check out GitHub issues! Turns out there had already been some discussion around “bike_id” randomization and there was a small subset of vendor contributors active on the issue trackers.</p><p>This felt like the right place because fundamentally we wanted to ensure visibility and that we were reaching the right audience. We posted the information as a new issue, and within minutes we had a response, and within hours the data was removed from the feeds. Clearly there was already someone empowered with decision making monitoring this GitHub repository and we were able to provide them the right insight to make a change happen same-day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17bb1ec7d3ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/gretel-ai/fast-data-cataloging-of-streaming-data-for-fun-and-privacy-17bb1ec7d3ed">Fast data cataloging of streaming data for fun and privacy</a> was originally published in <a href="https://medium.com/gretel-ai">Gretel.ai Engineering and Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>