Building Trust for Users and Regulators Alike: A Cost-Efficient PyTorch Pat... Raja Gopal Hari Vijay
За тази лекция
This talk focuses on the integration of compliance mechanisms within the Pyarch framework to address regulatory and governance needs in machine learning models. The speaker discusses the existing gaps in compliance workflows and introduces concepts such as comp governance and ecosystem, emphasizing the importance of aligning model development with regulatory frameworks. They present various Pyarch primitives that can be utilized to enhance compliance, including debugging, profiling, and audit trail capabilities. The speaker also outlines how to leverage these tools to enforce fairness and data protection measures through executable code, thereby improving transparency and auditability in model training and deployment processes. Additionally, they highlight specific implementations that help bridge compliance gaps while maintaining a focus on governance and data integrity.
Пълен транскрипт
Wjer good evening. This is actually not a legal talk. This is a code talk. So whatever I am discussing here I have already committed to um public repository. You can actually download and validate and then check and then get me uh few uh feedbacks as well. Uh first uh complaints has never been part of the workflow. Uh second today's pyarch model that's been cannot answer most of
the questions uh from the regulatory framework. Third always complaints has been treated as one time event. That's the that's the primary reason why today uh pyarch CTO Matt talked about um two terminologies that is comp governance and the second one is uh ecosystem. So he has actually shared a lot of good news about how do we how are we going to bring governance kind of um you
know um artifacts to the pyarch and more and more projects are ecosystem pyarch ecosystem. So actually it it helps uh pyarch practitioner to build models end to end and meet the complaints as well. So um on a lighter note uh two people are important to working class. One is manager and the second. So even both the people ask the same question how is it the project going
on then we need to actually provide two different answers to the manager what I have delivered so far or when I'm going to fully deliver to my wife I need to say what the project to me so both same questions two different people two different roles but two different answers two different approaches that we And there is a third angle to it right as a practitioners we
code regulators read but the user from the from our whatever models that we build. So three different roles, three different behaviors. I'm actually discussing about few poss practical possibilities. Can we unify all of those into a common language like we do like PIP install compliance? I'm from Zoho Corporation India and I thank sincerely thank uh sponsors and working committee to provide me this opportunity. So we already
have enough tools within pyarch primitives itself. So these are all the functions primitives that we have we are already familiar with use it for debugging profiling batching custom tensor and custom gradients right I'm trying to introduce a new lens to it but not the new frameworks not the new different approach it is just a new perspective how we look at the pyar primitives right so we already
have enough tools we we just to compliance for example we three different libraries. They provide real proofs but there are some gaps. So capam actually provide what it proves is which tokens drove this sentence prediction but can it make sure all the decision that are made by the fair across the groups. Opus actually let us know the no individual was expo exposed but whether which data is
entered into it whether the consent provided for processing the data is valid or not. Third krypton actually tells us data never left the encrypted but is it still safe the next month right or the next quarter after we deploy it. So all these three solve the protection and privacy problem but there is a gap that we see the governance and again I'm referring to Matt's talk today
morning he also talked about governance patter regulatory and complaints framework require both so I have taken EU act is just one example but uh to illustrate this idea and the implementation but it applies to it it can be scalable to lot of uh regulatory and compliance frameworks For example, this is an illustration. So these are the articles and from the EU act and what it demands with
respect to data quality, automate, event logging, transparency and all of it. This actually tells us what type of this right whether it is a governance or a protection area and this is the impact that if the model doesn't follow this, right? So basically we are trying to find out which applications can be encoded as runtime checks and artifacts or to generate an automated evidence. So pyarch helps
bridge the governance gap. I'm pyarch primitives only. So these are the kind of uh articles where we find the gap by using this pyarch primitive we can actually u fill that gap. Right? These are all the files that I have uh committed into my repo. You can actually download it and clone it and then understand it in deep. Fundamentally it is a zero new dependencies because we
are not introducing any new framework. We are actually reducing the complaints over it because uh we do not have to put extra mental energy to to think in terms of for the complaints because compliance was always an afterthought and it was difficult for us to come back and answer most of the questions. Right? But given that said, not every gap disappears. Right? There are gaps. But the
advantage is many gaps stop being invisible. So we will we will know we'll come to know a lot more u avenues to you know bridge the gap. So as I said we already had this this is a kind of primitives and we use it for debugging patching and what it actually means is we can use this forward hook to uh uh develop this fairness gate and drift
monitor and we can also use data set and lineage tracker and this custom obso. So the novelty here is interpreting familiar primitives as enforcement and evidence mechanisms. So basically libraries gives us features primitives give and the protection plus governance helps us to build the trust. The real insight is not that regulation exist but many of it is implementable as executable code. That's what important point. Okay, getting
into the three pyarch. Okay, I'm illustrating um the fact with the code and I'm not claiming this is the only way to do it but there are multiple ways to do it. I'm just discussing about one way of implementing it. Let's say uh register hook is helps us to understand at the module level and dispatcher helps us to understand at the operator and uh autograd helps us
to understand the gradient level. So three different ways and at three different granularities and three readiness level. That means all these vertical executions can be actually uh get into the different layers of abstractions and we can actually build uh complaints at layer. So basically it helps us to uh at the interception point it helps us to u observe a lot because that's a natural place we can
we can start observing the the data exchanges or the effects exchanges right and we can actually add uh the debug signals to support auditability and traceability because it can emit a lot more evidence. And these are all different mechanisms fit at different layers. So basically this is an architecture question So now that we have understood three complimentary mechanisms that uh we can actually get it from the
pyarchch now how do we orchestrate into a usable workflow so that we can deploy it for compliance right and this is where this t comply comes in. I have coded but this is not the only way of implementing it. There are multiple ways. I'll let you know how we can do it right in multiple ways. So basically this is a compliance engine that we can uh um
integrate lot more primitives and stuff and make it as a assembly layer and then we can actually add and kind of regulations that you wanted to check and then you can attach the model. So this is going to help us a lot and reduce a lot of work for the engineers right. So basically pyarch is the source of the power but this engine is just doing the
wiring and once we actually generate this kind of radar graph know okay what is the risk management and data governance DP from the DP aspect all of it. So this is actually generated by the code itself. So we'll have better insights. Right? So in another example uh about the checkpoint uh so standard checkpoint actually takes some kind of 40 plus MB and if you make it a
complaint or save it actually gives us a lot more traceability context like audit chain references fairness summaries hashes meta metadata and evidence links so that we can actually trace back to the code. we actually dump the the the checkpoint. We will have lot more details about this checkpoint. So I have actually taken resonate 18 as an example where you have put in hundreds of audit entries and
then trade it and it looks like it looks less like a raw weights but more artifact. So this is one script that actually uh connected all of it right because captain krypton and couple of other gates that fairness gates audit trail kind of explodes right and we when it m flow so this is a small example which I generated uh with with the it can also generate
PDF and a lot more details basically does not remove the manual review but it helps us to reduce the dependency on memory because when whenever the complaints department asks for the details we can actually pull it out from the on the run and then we can show it to them. Right? Basically it reduces a lot of work because we actually keep records in the scattered uh notebooks
and we do not have to think u after 6 months what we did before 6 months right so basically the best evidence is the evidence generated is actually happening. This is what auditors u appreciate a lot. And in this example, we just put a register forward hook on every level of uh bird and zero model changes. It actually uh sha 256 hash chained. You can actually so
article 12 refers to record keeping as an executable code. If you tamper one of these entry, the entire chain breaks. then we can actually show the complaints right so basically this is not just one uh 670 entries it is just one hook that 670 entries possible and uh I have not I have run it for only few seconds but if you run it for longer period of
time you'll get more data so that actually adds some kind of compute cost that can be reduced uh over a period of time so fairness gate Right? Any of the uh complaints failures come from stopping conditions. Right? If it does not have a stopping condition, it's like a circuit breaker. It can help us prevent any major incident or accident. Right? If uh so similarly, if we add
a fairness gate to our training uh using the primitive uh itself, right? For example, if I have a three or four groups of people data set, then um if if I get a positive answer for one specific group, then I am actually not doing fairness to the other three groups. So this the straining can be stopped at that point of time. Balance the data set and this
is another example. So consent as codes like uh if a patient consent uh his data to a diagnosis can I use the same data for du uh drug marketing. So uh that is actually not captured any of uh here so far and but this is a critical one that we need to answer. Basically this is the same data but it requires different purpose and different answer but
does not imply the same permission. So we can make sure that if such we can manage the consent at such a micro level strongest policy is the one the code cannot bypass accidentally basically it acts as a circuit breaker. So this is another example when the reset is trained on CIF CI410 and if it is trained on vehicles and uh once we deploy it when the animals
arrive the entropy rises and the hook fire because the model has changed on the day 50 uh because it started drifting and we saw that the drift threshold is actually uh started inducing some kind of bias right so and it it actually fails to meet the trust. So governance does not stop at model but the model continues aging in the real world. So we need to take
care of it till the end of its life. Right? I this is I have added this u GPT2 just to make sure that this I large models and we can actually deploy all of it uh across the model scales. It's not just a plain classifiers. It can also help address some of the LLMs. But I'm not claiming it is the completeness of LLM governance. But we need
to do some more things, right? Okay. So this is another compliance diff uh parameter which actually tells us uh help us to compare between the runs. For example, uh whether when does this fairness regression stopped? When does budget actually shot up? So we can actually snapshot every training run and make sure we save this complaints uh context say and then we can start comparing it then we
will come to know when it is actually creating the problem. So if a if we cannot uh control cannot catch things getting then it is actually not a real engineering problem So given that said uh there are 34 out of 37 EU act requirements addressed here but there are 113 articles. So 18 is full 16 partially and three is out of scope. Basically we are trying to
find out what are the code addressable duties and from the human accountability duties and then uh so that the teams can actually focus on uh focus on the required task or more rationally but it actually gives a different depth of coverage. So what is not covered? This is the three fundamental things. Basically the point here is software helps us to provide evidence and uh enables enforcement but
organization authority and responsibility so this helps us saves a lot of time and how do we advance this complaints right so there is a u extractor that I have actually put it in the repository so this is ontology based uh kind of uh mechanism that you can actually read the pyarch APIs as well as you can read the legal text and try to map it and then
come up come come up with our own uh t uh torch comply so that we can actually deploy to uh multiple products right and this is one way that uh we can actually uh adapt this uh idea to lot more legal frameworks and lot more products right I I've actually put in some of the code in the com in the GitHub. In case there is a challenge,
you please let me know. Thank you. Uh and one last point is so whatever code I have turned it committed uh in the GitHub, it is actually u a kind of spec that can use it for your own projects. For example, if you and then if you set a prompt to any of the thinking models saying that learn the pattern from the clone and then apply it
to my project. If this this single one prompt can help you to move uh develop all the torch comply for your own project and then it helps you build the uh your own comp. We thank you so much for your time and this is the GitHub link.
Още от това събитие
Виж всички 103 лекции →
What PyTorch Conference Europe 2026 Was Really Like – Official PyTorchCon EU Highlights | Paris
0:53
Lightning Talk: How DeepInverse Is Solving Imaging in Science and H... Andrew Wang & Minh Hai Nguyen
9:50
Why WideEP Inference Needs Data-Parallel-Aware Scheduling - Maroon Ayoub & Tyler Michael Smith
25:37
Write Once, Run Everywhere with Pytorch Transformers - Pedro Cuenca, Hugging Face
19:17