<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Karan Shah</title>
    <description>The latest articles on DEV Community by Karan Shah (@krshah3).</description>
    <link>https://dev.to/krshah3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4227446%2F8f6571ef-22fa-4841-adc8-038bed04ff1c.png</url>
      <title>DEV Community: Karan Shah</title>
      <link>https://dev.to/krshah3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/krshah3"/>
    <language>en</language>
    <item>
      <title>Five Levels of Purpose Enforcement in Data and ML Pipelines</title>
      <dc:creator>Karan Shah</dc:creator>
      <pubDate>Sun, 22 Nov 2026 02:52:14 +0000</pubDate>
      <link>https://dev.to/krshah3/five-levels-of-purpose-enforcement-in-data-and-ml-pipelines-1659</link>
      <guid>https://dev.to/krshah3/five-levels-of-purpose-enforcement-in-data-and-ml-pipelines-1659</guid>
      <description>&lt;p&gt;In a 2025 IEEE S&amp;amp;P study, 30 professional developers implemented three programming tasks designed around GDPR. 79 of the 90 solutions were not compliant, and participants named purpose limitation, consent, and data minimization as the requirements they struggled with. A 2026 PoPETs interview study with 15 developers describes the same gap in organizations: a privacy policy that looks compliant from outside, decoupled to varying degrees from what the software does. The authors call this symbolic compliance.&lt;/p&gt;

&lt;p&gt;Privacy maturity models are one way organizations measure progress on gaps like these. The NIST Privacy Framework tiers and the AICPA/CICA Privacy Maturity Model both score the privacy program. An organization can reach a high tier while its pipelines copy restricted data into unlabeled tables. The five levels below score the data platform: what it checks, where, and when.&lt;/p&gt;

&lt;h2&gt;
  
  
  What existing models measure
&lt;/h2&gt;

&lt;p&gt;NIST Privacy Framework 1.0 defines four Implementation Tiers: Partial, Risk Informed, Repeatable, and Adaptive. The 1.1 draft keeps them. Each tier is described by four elements: the risk management process, the integrated risk management program, relationships in the data processing ecosystem, and the workforce. NIST calls the tiers "a progression, albeit not a compulsory one" and ties success to the outcomes in a Target Profile rather than to a tier.&lt;/p&gt;

&lt;p&gt;The AICPA/CICA Privacy Maturity Model (2011) scores 73 GAPP criteria on five levels borrowed from the Capability Maturity Model: ad hoc, repeatable, defined, managed, and optimized. Its levels describe how formal, documented, and reviewed each practice is.&lt;/p&gt;

&lt;p&gt;The engineering outcomes are in the NIST Core, as three subcategories that the tier descriptions never reference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ID.IM-P5.&lt;/strong&gt; The purposes for the data actions are inventoried.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CT.DM-P7.&lt;/strong&gt; Mechanisms for transmitting processing permissions and related data values with data elements are established and in place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CT.DM-P9.&lt;/strong&gt; Technical measures implemented to manage data processing are tested and assessed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The five levels turn these outcomes into checks, ordered so that each level closes the gap left by the one beneath it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The five levels
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Level 1, Documented.&lt;/strong&gt; Purposes exist in the privacy policy and in the records of processing that GDPR Article 30 requires. Engineers map purposes to tables in design review. The platform has no record of purposes, so violations surface in audits, after the data has been used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 2, Declared.&lt;/strong&gt; Purposes are machine-readable labels on systems and datasets. In the open-source Fides project, a system's &lt;code&gt;privacy_declarations&lt;/code&gt; list data categories, a data use, and data subjects, and a CLI evaluates them against policy rules such as "no &lt;code&gt;user.contact&lt;/code&gt; data for &lt;code&gt;advertising&lt;/code&gt;". The evaluation reads only the declarations, and nothing observes the running jobs. When the code changes and the declaration does not, the two diverge without any check failing, which is the decoupling the PoPETs study describes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 3, Checked at read.&lt;/strong&gt; Each job declares a purpose at submission, and the query engine compares it with the labels on every table and column the job reads. Disallowed reads fail, and per-row consent is applied by filtering against the consent store. The check stops at the read. A job allowed to read a column can write its values into a new table with no label, and every reader of that table is unrestricted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 4, Enforced across flows.&lt;/strong&gt; Labels propagate through joins, writes, and training jobs. Each output carries the union of its inputs' restrictions, which is the join operation in the label lattice of information flow control. Meta's public description of Policy Zones shows one implementation: a SQL parser extracts the inputs and outputs of each query, a lattice-based evaluator checks each flow and whether a consent check ran, and training outputs inherit the workflow's annotation. A new policy runs in logging mode until its violations are fixed, then switches to enforcement mode, where unremediated flows are denied. The recorded flows also form the lineage graph from the previous post in this series. Enforcement still happens at run time, so a code change that violates a policy, or a policy change that blocks a legitimate flow, is found only when the job runs in production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 5, Verified before deployment.&lt;/strong&gt; Changes are evaluated before they ship. For a code change, the new queries are parsed and evaluated against current labels before merge. For a policy change, the evaluator replays recently recorded flows under the new policy and diffs the allow and deny results. The diff reports two failure classes: flows that would violate the policy, and allowed data that the new rule would drop. Meta's Policy Zones Manager does this for proposed annotations by simulating enforcement on downstream flows.&lt;/p&gt;

&lt;p&gt;Figure 1 shows the check that each level adds. At Levels 1 to 3, nothing checks the path from a source table to a derived table and then to a model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fan4c6zn7dfox6yntp7n3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fan4c6zn7dfox6yntp7n3.png" alt="Figure 1. Five levels of purpose enforcement" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scoring a pipeline
&lt;/h2&gt;

&lt;p&gt;A pipeline is at Level N when the checks for Levels 1 through N all pass. A check that passes above a failed level does not count. In the example below, labels propagate on write, but jobs run without a declared purpose, so the labels have nothing to be compared with. The pipeline stays at Level 2, and each comment points to the evidence for its check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;churn_features_daily&lt;/span&gt;
&lt;span class="na"&gt;checks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;L1_purposes_inventoried&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="s"&gt;pass&lt;/span&gt;   &lt;span class="c1"&gt;# records of processing, entry 14
&lt;/span&gt;  &lt;span class="na"&gt;L2_datasets_labeled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="s"&gt;pass&lt;/span&gt;   &lt;span class="c1"&gt;# catalog tags on all 6 inputs
&lt;/span&gt;  &lt;span class="na"&gt;L3_job_purpose_checked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="s"&gt;fail&lt;/span&gt;   &lt;span class="c1"&gt;# Spark jobs submit no purpose
&lt;/span&gt;  &lt;span class="na"&gt;L4_labels_propagate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;         &lt;span class="s"&gt;pass&lt;/span&gt;   &lt;span class="c1"&gt;# output tables inherit labels
&lt;/span&gt;  &lt;span class="na"&gt;L5_changes_tested_predeploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;fail&lt;/span&gt;   &lt;span class="c1"&gt;# no policy check in CI
&lt;/span&gt;&lt;span class="na"&gt;level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;          &lt;span class="c1"&gt;# highest N with L1..LN all passing
&lt;/span&gt;&lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;require a purpose at job submission&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Mapping to legal requirements
&lt;/h2&gt;

&lt;p&gt;No law prescribes a level. Each requirement below asks for a record, and the level shown is the first that produces it from the platform instead of a document.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GDPR Article 30 and NIST ID.IM-P5&lt;/strong&gt; ask for an inventory of purposes. Level 1 produces it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CCPA risk-assessment regulations&lt;/strong&gt; (in effect since January 1, 2026) state that the purpose of processing must not be described in generic terms, and make training automated decisionmaking technology for significant decisions a trigger for an assessment. First submissions to the CPPA are due April 1, 2028. A purpose declared per job and checked at read (Level 3) ties the purpose in the assessment to what the job is allowed to read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EU AI Act Article 10(2)(b)&lt;/strong&gt; requires data governance for high-risk training data to cover the origin of the data and, for personal data, the original purpose of collection. At Level 4, lineage records the origin and the propagated labels record the purpose. The Digital Omnibus moved the Annex III high-risk obligations to December 2, 2027.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FTC algorithmic-disgorgement orders&lt;/strong&gt;, such as Everalbum (2021) and Rite Aid (2023), required deletion of models and algorithms derived from the data in question. Finding those models requires lineage from source tables to models (Level 4).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing a target level
&lt;/h2&gt;

&lt;p&gt;As with the NIST tiers, not every pipeline needs the top level. The mapping above sets a floor of Level 4 for pipelines that feed model training or join sensitive categories, because the FTC orders and, for high-risk systems, the AI Act both depend on lineage into models. Level 2 or 3 is enough for the rest. Levels 4 and 5 need query-engine integration, label governance, and a fix for label creep, where one incidental read restricts every dataset derived from it. Meta's 2025 post describes a fix through governed reclassification. With the checklist kept per pipeline, the gap between each pipeline's level and its target becomes a list of failed checks that can be assigned and tracked.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Horstmann, S. A., et al. &lt;a href="https://arxiv.org/abs/2504.06697" rel="noopener noreferrer"&gt;"Sorry for bugging you so much." Exploring Developers' Behavior Towards Privacy-Compliant Implementation&lt;/a&gt;. IEEE Symposium on Security and Privacy, 2025.&lt;/li&gt;
&lt;li&gt;Saha, R. P., et al. &lt;a href="https://petsymposium.org/popets/2026/popets-2026-0089.pdf" rel="noopener noreferrer"&gt;From Lines of Code to Lines of Policy? Exploring Software Developers' Perceptions of Their Privacy Policy-Related Activities&lt;/a&gt;. Proceedings on Privacy Enhancing Technologies 2026(3).&lt;/li&gt;
&lt;li&gt;NIST. &lt;a href="https://nvlpubs.nist.gov/nistpubs/CSWP/NIST.CSWP.01162020.pdf" rel="noopener noreferrer"&gt;Privacy Framework Version 1.0&lt;/a&gt;. January 16, 2020.&lt;/li&gt;
&lt;li&gt;CPA Canada and AICPA. &lt;a href="https://www.cpacanada.ca/business-and-accounting-resources/other-general-business-topics/information-management-and-technology/publications/business-and-organizational-privacy-policy-resources/measuring-a-privacy-program" rel="noopener noreferrer"&gt;Privacy Maturity Model&lt;/a&gt;. 2011.&lt;/li&gt;
&lt;li&gt;Ethyca. &lt;a href="https://ethyca.github.io/fideslang/resources/policy/" rel="noopener noreferrer"&gt;Fideslang: Policy resource&lt;/a&gt; and &lt;a href="https://ethyca.github.io/fideslang/resources/system/" rel="noopener noreferrer"&gt;System resource&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Meta Engineering. &lt;a href="https://engineering.fb.com/2024/08/27/security/privacy-aware-infrastructure-purpose-limitation-meta/" rel="noopener noreferrer"&gt;How Meta enforces purpose limitation via Privacy Aware Infrastructure at scale&lt;/a&gt;. August 27, 2024.&lt;/li&gt;
&lt;li&gt;Meta Engineering. &lt;a href="https://engineering.fb.com/2025/07/23/security/policy-zones-meta-purpose-limitation-batch-processing-systems/" rel="noopener noreferrer"&gt;Policy Zones: How Meta enforces purpose limitation at scale in batch processing systems&lt;/a&gt;. July 23, 2025.&lt;/li&gt;
&lt;li&gt;California Privacy Protection Agency. &lt;a href="https://www.cppa.ca.gov/regulations/pdf/ccpa_updates_cyber_risk_admt_noa.pdf" rel="noopener noreferrer"&gt;Notice of approval: CCPA updates, cybersecurity audits, risk assessments, and ADMT regulations&lt;/a&gt;. September 2025.&lt;/li&gt;
&lt;li&gt;European Commission AI Act Service Desk. &lt;a href="https://ai-act-service-desk.ec.europa.eu/en/ai-act/article-10" rel="noopener noreferrer"&gt;Regulation (EU) 2024/1689, Article 10&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Jones Walker. &lt;a href="https://www.joneswalker.com/en/insights/blogs/ai-law-blog/yes-august-2-still-matters-the-eu-approved-a-high-risk-ai-delay-but-most-trans.html" rel="noopener noreferrer"&gt;Yes, August 2 Still Matters: The EU Approved a High-Risk AI Delay, but Most Transparency Obligations Remain&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gdpr-info.eu/art-30-gdpr/" rel="noopener noreferrer"&gt;Regulation (EU) 2016/679 (GDPR), Article 30&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>privacy</category>
      <category>security</category>
      <category>dataengineering</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Model Deletion Orders Require Training-Data Lineage</title>
      <dc:creator>Karan Shah</dc:creator>
      <pubDate>Sun, 15 Nov 2026 23:03:48 +0000</pubDate>
      <link>https://dev.to/krshah3/model-deletion-orders-require-training-data-lineage-4ocd</link>
      <guid>https://dev.to/krshah3/model-deletion-orders-require-training-data-lineage-4ocd</guid>
      <description>&lt;p&gt;In May 2021, the FTC finalized its order against Everalbum, the company behind the Ever photo app. Everalbum had to delete the facial recognition models it had built using its users' photos. The order carried no fine. The main remedy was deleting the models.&lt;/p&gt;

&lt;p&gt;Orders like this assume a company can find every model that touched the data in question. A team can usually point to the code and configuration that produced a model. Pointing to the exact records that went into it is harder, and that is what these orders require.&lt;/p&gt;

&lt;h2&gt;
  
  
  FTC orders that required model deletion
&lt;/h2&gt;

&lt;p&gt;The FTC has used this remedy at least five times since 2019:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cambridge Analytica (December 2019).&lt;/strong&gt; Ordered to delete the data collected through the GSRApp and any work product built from it, including algorithms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everalbum (May 2021).&lt;/strong&gt; Ordered to delete the facial recognition models and algorithms built using biometric data from Ever users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WW International and Kurbo (March 2022).&lt;/strong&gt; Ordered to delete data collected from children under 13 without parental consent, destroy any algorithms built from it, and pay &lt;strong&gt;$1.5 million&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amazon Alexa (May 2023).&lt;/strong&gt; Fined &lt;strong&gt;$25 million&lt;/strong&gt; and barred from using voice and geolocation data that users had asked to delete to build or improve its data products.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rite Aid (December 2023).&lt;/strong&gt; Banned from using facial recognition for surveillance for five years, and ordered to delete the images it collected and any models or algorithms built from them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Cambridge Analytica and Everalbum orders cover anything built from the data "in whole or in part." Read literally, a model trained on a dataset with a single covered record falls under the order.&lt;/p&gt;

&lt;h2&gt;
  
  
  What counts as a derived artifact
&lt;/h2&gt;

&lt;p&gt;Training produces more than a final model file. Starting from one source table, a pipeline can create:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dataset snapshots and feature tables, which copy or transform source rows&lt;/li&gt;
&lt;li&gt;model weights and training checkpoints, which are fitted to those rows&lt;/li&gt;
&lt;li&gt;fine-tuned models, which start from the weights of an earlier model&lt;/li&gt;
&lt;li&gt;embeddings and vector indexes, which store values the model computed from source records&lt;/li&gt;
&lt;li&gt;distilled student models, which are trained on the outputs of a teacher model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each item is a node in a lineage graph, and each one connects to the source through a different kind of edge. Lawyers decide which of these an order covers. To make that call, they need engineering to produce the full list for a given source.&lt;/p&gt;

&lt;h2&gt;
  
  
  The minimum lineage record
&lt;/h2&gt;

&lt;p&gt;That list has to come from records written at training time. Lineage rebuilt later from logs and notebooks misses runs, especially old ones. At minimum, each training run should emit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sources.&lt;/strong&gt; The tables and partitions it read, the table version at read time, and the filter predicate, including any consent condition. With a pinned version and a deterministic predicate, the exact row set can be recomputed later without storing row IDs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset snapshot ID.&lt;/strong&gt; An immutable version of the training set. Apache Iceberg, for example, assigns a snapshot ID to every commit, and &lt;code&gt;VERSION AS OF &amp;lt;snapshot-id&amp;gt;&lt;/code&gt; in Spark SQL returns the table as it was at that commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run metadata.&lt;/strong&gt; Run ID, code commit, and hyperparameters, plus the base model ID for a fine-tune or the teacher model ID for distillation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outputs.&lt;/strong&gt; A content hash, such as SHA-256, of every model, checkpoint, and embedding table the run produced. The hash ties the record to the exact bytes, not to a file path that can be overwritten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployments.&lt;/strong&gt; Every service and service version that loads those outputs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Querying the lineage graph
&lt;/h2&gt;

&lt;p&gt;Each record adds edges to a graph. Nodes are source tables, snapshots, training runs, artifacts, and deployments, and each edge points from an input to an output. A deletion request then becomes a traversal: start at the covered source and collect every node reachable from it. Figure 1 shows the result for one source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0qdnhoplw71nlsohwxsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0qdnhoplw71nlsohwxsl.png" alt="Figure 1. Lineage graph and deletion query for Source A" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Model M2 and Deployment D2 stay out of scope because Snapshot S2 never read Source A. Without the snapshot-level edges, there is no way to show that, and M2 would have to be treated as affected too.&lt;/p&gt;

&lt;p&gt;If the edges are stored in a table with columns &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;dst&lt;/code&gt;, a recursive query returns the full set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="no"&gt;RECURSIVE&lt;/span&gt; &lt;span class="nf"&gt;downstream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="s1"&gt;'source:A'&lt;/span&gt;
  &lt;span class="k"&gt;UNION&lt;/span&gt;
  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dst&lt;/span&gt;
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;lineage_edges&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
  &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;downstream&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;node_id&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;node_id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;downstream&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;UNION&lt;/code&gt;, unlike &lt;code&gt;UNION ALL&lt;/code&gt;, drops rows that are already in the result, so the recursion stops when no new nodes are found. The output is the list that legal review starts from.&lt;/p&gt;

&lt;h2&gt;
  
  
  What existing tools record
&lt;/h2&gt;

&lt;p&gt;OpenLineage models Jobs, Runs, and Datasets, emits a START and a COMPLETE event for each run, and accepts custom metadata as facets. MLflow, since version 2.4, records the datasets a run consumed through &lt;code&gt;mlflow.log_input()&lt;/code&gt;, with a digest of each dataset. Either can supply the source and run fields above. Neither has a standard field for the consent condition applied at read time, so that field needs a custom facet or tag. For sharing lineage outside the company, SPDX 3.0 and CycloneDX define bill-of-materials formats that cover datasets and models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retraining and unlearning
&lt;/h2&gt;

&lt;p&gt;Once the affected models are identified, each one is either deleted or retrained without the covered data. Retraining from scratch on the filtered snapshot removes the records exactly, but its cost scales with model size and training-set size.&lt;/p&gt;

&lt;p&gt;SISA training (Bourtoule et al., IEEE Symposium on Security and Privacy 2021) reduces that cost. It splits the training set into disjoint shards and trains one model per shard, then aggregates their predictions at inference time. Within each shard, training runs over slices of the data, with a checkpoint after each slice. Deleting a record means retraining only its shard, starting from the checkpoint taken before the slice that contained it. The authors report unlearning &lt;strong&gt;4.63×&lt;/strong&gt; faster on the Purchase dataset and &lt;strong&gt;2.45×&lt;/strong&gt; faster on SVHN than retraining from scratch.&lt;/p&gt;

&lt;p&gt;Guo et al. (ICML 2020) define certified removal: after the update, the model is statistically hard to distinguish from a model that never saw the removed records. Their method applies a Newton update to the parameters and comes with a proof for L2-regularized linear models with a convex loss, such as logistic regression. Approximate unlearning methods for deep networks do not have a comparable guarantee.&lt;/p&gt;

&lt;p&gt;Every one of these approaches still depends on lineage. Without it, the only safe scope for a deletion is every model trained while the covered data was in use.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://business.ftc.gov/system/files/documents/cases/d09389_comm_final_orderpublic.pdf" rel="noopener noreferrer"&gt;In the Matter of Cambridge Analytica, LLC. Final Order&lt;/a&gt;. December 2019.&lt;/li&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://www.ftc.gov/system/files/documents/cases/1923172_-_everalbum_decision_final.pdf" rel="noopener noreferrer"&gt;In the Matter of Everalbum, Inc. Decision and Order&lt;/a&gt;. May 2021.&lt;/li&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://www.ftc.gov/news-events/news/press-releases/2022/03/ftc-takes-action-against-company-formerly-known-weight-watchers-illegally-collecting-kids-sensitive" rel="noopener noreferrer"&gt;FTC Takes Action Against Company Formerly Known as Weight Watchers for Illegally Collecting Kids' Sensitive Health Data&lt;/a&gt;. March 2022.&lt;/li&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://www.ftc.gov/node/81093" rel="noopener noreferrer"&gt;FTC and DOJ Charge Amazon with Violating Children's Privacy Law&lt;/a&gt;. May 2023.&lt;/li&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://www.ftc.gov/node/82185" rel="noopener noreferrer"&gt;Rite Aid Banned from Using AI Facial Recognition&lt;/a&gt;. December 2023.&lt;/li&gt;
&lt;li&gt;Bourtoule, L., et al. &lt;a href="https://arxiv.org/abs/1912.03817" rel="noopener noreferrer"&gt;Machine Unlearning&lt;/a&gt;. IEEE Symposium on Security and Privacy, 2021.&lt;/li&gt;
&lt;li&gt;Guo, C., Goldstein, T., Hannun, A., and van der Maaten, L. &lt;a href="https://arxiv.org/abs/1911.03030" rel="noopener noreferrer"&gt;Certified Data Removal from Machine Learning Models&lt;/a&gt;. ICML, 2020.&lt;/li&gt;
&lt;li&gt;OpenLineage. &lt;a href="https://openlineage.io/docs/spec/object-model" rel="noopener noreferrer"&gt;Object Model&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;MLflow. &lt;a href="https://mlflow.org/docs/latest/ml/dataset/" rel="noopener noreferrer"&gt;Dataset Tracking&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Apache Iceberg. &lt;a href="https://iceberg.apache.org/docs/latest/spark-queries/" rel="noopener noreferrer"&gt;Spark Queries: Time Travel&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The Linux Foundation. &lt;a href="https://spdx.dev" rel="noopener noreferrer"&gt;SPDX Specification 3.0&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;OWASP Foundation. &lt;a href="https://cyclonedx.org" rel="noopener noreferrer"&gt;CycloneDX Bill of Materials Standard&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>privacy</category>
      <category>machinelearning</category>
      <category>dataengineering</category>
      <category>security</category>
    </item>
    <item>
      <title>Why Access Control Cannot Enforce Purpose Limitation in Data Pipelines</title>
      <dc:creator>Karan Shah</dc:creator>
      <pubDate>Thu, 05 Nov 2026 03:48:23 +0000</pubDate>
      <link>https://dev.to/krshah3/why-access-control-cannot-enforce-purpose-limitation-in-data-pipelines-2h0g</link>
      <guid>https://dev.to/krshah3/why-access-control-cannot-enforce-purpose-limitation-in-data-pipelines-2h0g</guid>
      <description>&lt;p&gt;In May 2022, the FTC and the U.S. Department of Justice fined Twitter &lt;strong&gt;$150 million&lt;/strong&gt;. Twitter collected phone numbers and email addresses from more than &lt;strong&gt;140 million&lt;/strong&gt; users for account security. Advertisers then used the same data to target ads. The collection purpose was stated to users, but it did not restrict which systems could read those fields.&lt;/p&gt;

&lt;p&gt;In most organizations, policy text and consent databases store the allowed purposes of each record. A pipeline that reads the record gets an access decision only. It does not get the allowed purposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirement: purpose limitation
&lt;/h2&gt;

&lt;p&gt;Purpose limitation means that you use personal data only for the purposes for which you collected it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GDPR Article 5(1)(b).&lt;/strong&gt; You collect data for specified purposes. You do not process it further in an incompatible way.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CCPA, Cal. Civ. Code § 1798.100(c).&lt;/strong&gt; Collection, use, retention, and sharing must be reasonably necessary and proportionate to the purpose of collection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FTC Act Section 5.&lt;/strong&gt; A use of data outside what a company told consumers can be a deceptive practice. (The Twitter case is an example)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The requirement applies to each record. A record can be allowed for fraud detection and not allowed for ad personalization. The allowed set changes when the user changes a consent setting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Access control and data use
&lt;/h2&gt;

&lt;p&gt;Data platforms enforce access control at the table, column, or row level. An access check evaluates the principal and the resource. It does not evaluate the purpose of the job or the allowed purposes of each record. After the read, the record goes through joins, feature transforms, copies, and training sets. These operations do not copy the collection purpose as metadata with the record. A downstream job has no field that shows that a phone-number column came from an account-security flow. Enforcement then depends on code review against the written policy and on audits after the data is used. Neither control runs automatically on each pipeline change before deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Published evidence
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Andow et al. (USENIX Security 2020) compared the privacy policies of &lt;strong&gt;13,796&lt;/strong&gt; Android apps with the data flows of those apps. Up to &lt;strong&gt;42.4%&lt;/strong&gt; of the apps disclosed their privacy-sensitive flows incorrectly or did not disclose them.&lt;/li&gt;
&lt;li&gt;A Kiteworks survey of 225 security, IT, and risk professionals (December 2025) reports that &lt;strong&gt;78%&lt;/strong&gt; of organizations cannot validate data before it enters a training pipeline. &lt;strong&gt;77%&lt;/strong&gt; cannot trace the source of their training data. These figures are self-reported survey answers from a vendor study. They are not independent measurements.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Impact on model training
&lt;/h2&gt;

&lt;p&gt;If a pipeline sends restricted data to a report, you fix the pipeline and delete the output. If a pipeline sends restricted data to a training job, the data becomes part of the model weights. You cannot remove it without retraining.&lt;/p&gt;

&lt;p&gt;The FTC has ordered companies to delete models that they trained on improperly obtained data: Everalbum (2021), WW International and Kurbo (2022), and Rite Aid (2023). A training set often joins many source tables, and one model can serve many products. A purpose violation in one source table propagates to each model trained on it and to each product that uses those models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimum enforcement design
&lt;/h2&gt;

&lt;p&gt;Denning published a lattice model of secure information flow in 1976. Information flow control applies that model to programs and operating systems. The requirement here is to apply it to production data platforms and training pipelines. The minimum design has four parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Purpose labels on data.&lt;/strong&gt; Each record or field carries its allowed purposes. Joins, transforms, and copies keep the labels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Declared purpose on jobs.&lt;/strong&gt; Each pipeline and training job declares its purpose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check at the point of use.&lt;/strong&gt; The system compares the job purpose with the data labels. It removes or blocks the records that are not allowed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-deployment testing.&lt;/strong&gt; You test each change to a pipeline or a policy before production. The test finds violations. It also finds allowed data that the change drops by mistake.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Figure 1 shows parts 1 to 3 in a training pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F418insnkt04d76rxqt9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F418insnkt04d76rxqt9k.png" alt="Figure 1. Access check and purpose check in a training pipeline" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-assessment
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;When a user withdraws consent for a purpose, which systems receive the change, and how fast?&lt;/li&gt;
&lt;li&gt;Can you list each training set and model that used a given dataset?&lt;/li&gt;
&lt;li&gt;Does a system, and not a person, compare the purpose of each job with the data that it reads?&lt;/li&gt;
&lt;li&gt;When a privacy policy changes, how does the change get into code?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the answer to a question is a manual process or a document, the system does not enforce that control.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Federal Trade Commission. &lt;a href="https://www.ftc.gov/node/79056" rel="noopener noreferrer"&gt;FTC Charges Twitter with Deceptively Using Account Security Data to Sell Targeted Ads&lt;/a&gt;. May 25, 2022.&lt;/li&gt;
&lt;li&gt;European Union. &lt;a href="https://eur-lex.europa.eu/eli/reg/2016/679/oj" rel="noopener noreferrer"&gt;Regulation (EU) 2016/679 (General Data Protection Regulation)&lt;/a&gt;, Article 5(1)(b).&lt;/li&gt;
&lt;li&gt;California Civil Code. &lt;a href="https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=CIV&amp;amp;sectionNum=1798.100" rel="noopener noreferrer"&gt;§ 1798.100(c)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Andow, B., et al. &lt;a href="https://www.usenix.org/conference/usenixsecurity20/presentation/andow" rel="noopener noreferrer"&gt;Actions Speak Louder than Words: Entity-Sensitive Privacy Policy and Data Flow Analysis with PoliCheck&lt;/a&gt;. 29th USENIX Security Symposium, 2020.&lt;/li&gt;
&lt;li&gt;Kiteworks. &lt;a href="https://www.kiteworks.com/sites/default/files/resources/kiteworks-report-data-security-compliance-risk-2026-forecast-report.pdf" rel="noopener noreferrer"&gt;2026 Data Security, Compliance and Risk Forecast Report&lt;/a&gt;. December 2025.&lt;/li&gt;
&lt;li&gt;Federal Trade Commission. In the Matter of Everalbum, Inc. (2021); &lt;a href="https://ftc.gov/news-events/press-releases/2022/03/ftc-takes-action-against-company-formerly-known-weight-watchers" rel="noopener noreferrer"&gt;United States v. Kurbo, Inc. and WW International, Inc.&lt;/a&gt; (2022); FTC v. Rite Aid Corporation (2023).&lt;/li&gt;
&lt;li&gt;Denning, D. E. &lt;a href="https://dl.acm.org/doi/10.1145/360051.360056" rel="noopener noreferrer"&gt;A Lattice Model of Secure Information Flow&lt;/a&gt;. Communications of the ACM 19(5), 1976.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>privacy</category>
      <category>security</category>
      <category>dataengineering</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
