Smart Vehicles, Secure Data: Recreating Vehicle Environments for Privacy-Preserving Machine Learning
Summary
- Privacy-first architecture: Mercedes-Benz uses Trusted Execution Environments and Azure Confidential Computing to enable ML model training on sensitive vehicle data while keeping data private.
- Regulatory compliance: The approach respects GDPR, CCPA, and emerging data privacy laws by ensuring personal driving data remains secure throughout training, inference, and deployment.
- Personalized ML without exposure: Teams can build personalized systems for connected vehicles that learn from individual driver data while maintaining compliance and never exposing raw sensitive information.
Smart Vehicles, Secure Data: Recreating Vehicle Environments for Privacy-Preserving Machine Learning

Talk by Frankie Cancino, Senior Data Scientist, Mercedes-Benz R&D
As connected vehicles generate vast amounts of personal and sensitive data, ensuring privacy and security in machine learning (ML) processes is essential. this video explores how Trusted Execution Environments (TEEs) and Azure Confidential Computing can enable privacy-preserving ML in cloud environments. We’ll present a method to recreate a vehicle environment in the cloud, where sensitive data remains private throughout model training, inference and deployment. Attendees will learn how Mercedes-Benz R&D North America builds secure, privacy-respecting personalized systems for the next generation of connected vehicles.
Databricks Named a Leader in the 2025 Gartner® Magic Quadrant™ for Data Science and Machine Learning Platforms: https://www.databricks.com/blog/databricks-named-leader-2025-gartner-magic-quadrant-data-science-and-machine-learning
Build and deploy quality AI agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
FAQs
What is a Trusted Execution Environment (TEE)?
A TEE is a secure processor component that enables ML model training, inference, and deployment on sensitive data while keeping the data private—meeting regulatory requirements like GDPR.
Why is privacy-preserving ML important for connected vehicles?
Connected vehicles collect personal driving data, location history, and behavior patterns. Privacy-preserving ML enables personalized systems while respecting driver consent and legal data protection rights.
What are best practices for CI/CD for machine learning models?
Machine learning CI/CD requires automated testing of data quality, model performance, and production inference pipelines. The video demonstrates this through secure vehicle environment recreation—validating models against diverse scenarios before production deployment while maintaining data privacy and reproducibility.
Which solutions offer both data protection and data governance?
Databricks Data and AI platform combines data protection through Unity Catalog with comprehensive governance capabilities. The vehicle data use case shows this integration: synthetic data generation protects privacy while automated governance ensures models and datasets stay compliant and traceable throughout their lifecycle.
What are the best AI development platforms with strong data privacy?
Databricks Data and AI platform enables secure AI development through privacy-preserving techniques like synthetic data generation combined with unified governance. This approach lets teams develop and test AI models safely—protecting privacy, ensuring reproducibility, and maintaining compliance across all development stages.
Full transcript
All right, I think we're getting started. Uh so, hello everyone. Thank you for coming. I work for Mercedes-Benz research and development. If you don't know Mercedes-Benz, we're small company that makes a bunch of cars and vans and vehicles. Um that if you didn't know, that helps a lot with the whole presentation, so want to get started. Uh I wanted to start with a statement that I think most of us would agree with and that's data protection is important.
Um how important? It's according to the European Data Protection Board, it's a right by law, so very important. Um but we kind of already knew this over the last decades, data protection is I mean, you hear about leaks or breaches or or all that kind of stuff in the news and you know, it it can make or break a lot of trust in in your systems and your reputation as a company. Um now though, what we're seeing especially in the last, you know, decade or so, is the rise of privacy, data privacy.
Um and it's not just, you know, Europe or Germany, uh it's also in the US, you know, we have laws here now and especially state of California, but in the US in general, uh protecting consumers' data. Um whether that be consent or, you know, different types of regulation we have to follow, um it's now at this point around the globe. So, to give a quick rundown of what I'm going to talk about, it's, you know, kind of broken down into protection, privacy.
I'll differentiate those two a little bit uh here in a second. Uh some of the AI products that we build here at Um privacy-preserving machine learning, kind of techniques that exist now. Um and then I don't want to give anything away, but kind of what we or, you know, a different approach, uh more so from an architectural perspective. And then some other follow-up points that we want to work on in the future. So, data protection, data privacy, I will simplify and give a very high-level overview of what the difference uh is.
And it's data protection, think of protecting your systems from external people. So, you know, you build um cybersecurity software around your systems and your internal services. Um whereas data privacy is more so what the consumer or the customer allows you to see even internally at your own company. So, think of like consent, um what you want to give the service you're agreeing to uh to be able to see. So, very high-level.
Uh with that being said, we have this vision. Um if you didn't know this, it's okay. I just found out about this diagram recently, too. Uh but the overall idea is that there has to be a business opportunity. Uh uh we have to be able to collect the data. Uh it should be good quality. You know, it can't be incorrect data or information that pretty much defeats the entire purpose. Uh security, that's the data protection I just mentioned.
We build our software with, you know, best practices. Uh choice is what I mentioned with consent. We tend to ask for consent every step of the way that our our customers let us take certain data points and I'll get to this in a little bit, but we're transparent about what we're going to do with that data as well. Uh it has to benefit the customer in some way as well. Like that's the reason we're doing this. Um we have to handle it ethically, like I said, it has to benefit the customer, but also we're not going to be malicious about it.
Um and transparent what we do with that data, like I just mentioned. So, this is more so the first section about data protection. So, we follow best practices. Uh identity access management, making sure people that have access to the data are supposed to have access to the data. Network security, so think of like VPCs, uh virtual private clouds, right? So, we build boxes around these services and make sure no one can access them except for the people that or the services or applications are allowed to.
Uh infrastructure as code, so think of AWS's CD click CDK, cloud development kit. Um then you can test the code at a, you know, do the whole CI/CD pipeline. And then the CI/CD pipeline, we have a plethora of tests. Uh unit tests and a lot more than that, but yeah, it's best practice. Uh and then monitoring. So, we have dashboards, internal dashboards. We we make sure that everything is working perfectly fine um and there's no leaks or holes anywhere in the in the system.
Uh for anonymization topic here, this is more so the data privacy. So, the first bullet points relate to frameworks. By that, I mean things like GDPR or these legal frameworks that we follow here in the US. Uh we tend to follow historically follow like the strictest framework, which is typically GDPR, and we try to blanket everything under that, so that way it covers all of our bases. Um whether you should or should not do that, that's up to you and your company.
Uh uh different markets can be handled differently. They have different laws and regulation. Um and then data minimization. This is a balancing act, uh especially when it comes to analytics. Uh you only collect what you need, but sometimes, right, if you have new use cases or products or features coming out and you want data points that you haven't been collecting before, it's hard to build a new use case without that data.
So, you have to kind of balance that where you're fighting to be able to collect the data, but then you also have to bring these use cases that you know of ahead of time. Um and then fleet-based insights, this is more so relates to our analytics. Uh most of our analytics is based on completely anonymized data. We can't trace it back to an individual and that's a key point in our legal framework where any of that data, it should be impossible to track who that actually came from.
It's just a generic high-level overview of, you know, what's going on with certain cars or in certain regions or, you know, that kind of thing or products or features. Um so, then you may be asking, well, then how do we kind of test, especially the machine learning side, if all of the data coming out is anonymized? Well, we have these test cars that we call non-production cars or non-prod. Uh we use that data to test all of our machine learning in our pipelines and uh models.
Uh this allows us to see really every single detail that would be running in the car. And then on top of that, it's much easier for us to debug, you know, plug into a car and then affect the car in whichever way. Uh this last section, encryption, I'm going to give you a hint. This is there's some foreshadowing here for the rest of the talk. Uh that's a very important section uh in those bullet points. So, uh the rule of thumb for us is when the data leaves the car, it has to be either anonymized completely where you can't track it back to a, you know, vehicle or person, or it has to be encrypted.
And so, in this case with the encryption, we have a wonderful platform team or what we call a platform team. They build services and software that goes into the vehicles. And it's basically this platform that helps you, you know, abstract things away via APIs or services. They built a key management system that we can use. They have it connected to a cloud-based back-end API, so you can use it whether you're in the cloud or the car.
Um and that's what we use to help generate keys, create shared keys and that sort of thing. Um right now, we use asymmetric key encryption, so that means that we have like kind of a public-private, but we can also create shared keys. So, all that really means is that it's easier to create new keys and share them and have them still be associated with, let's say, like a specific profile or user. Uh and then here this also kind of gives it a little bit away, but um everything up to this point has been focused on encryption in transit and that rest.
So, what that means is when we send data over the air, it has to be encrypted. And then also when it lands, let's say, in a data lake, it's at rest and it's also encrypted. Um it's a lot of information, but trust me, it'll be useful later. Uh if you have any questions about that, feel free to find me after and I can hopefully explain a little bit more. Uh so, now I want to talk about some of the products and features that we built uh uh using like some of those best practices and how, you know, basically use cases to help implement this.
And so, one of them is a fairly new uh feature, which is called routines. You can think of it as we're creatures of habit. You probably do the same thing in your cars pretty regularly. Uh either you go to the same places, you leave around the same time. And the idea here is that you can create a routine for you where, you know, if you leave your workplace around this time and it's this temperature, maybe you want the seat heating on um or you want, you know, the massage seats, you know, if you have like an S-Class, it can turn on as soon as you're done with work.
Um that kind of a thing. So, these are just routines you can program yourself into the car and they'll activate once, you know, the criteria is met. There's also this variation of it that is AI-generated. So, we will use AI to find out that, hey, you typically do this, you do this routine, you just haven't created one yourself. We'll suggest that routine to you. So, there are these models in the car that are able to recommend the routines to you.
Another one is called what we call zero layer. So, it's it's kind of hard to see, but if you can see these like little phone and massage classic icons here, we call those tiles. Uh the idea here is that it's a recommendation system in the car that can recommend the next thing you want to do based on like the context and you know, what you're doing in the car right now or the location etc. etc. right? So, there's different features that go into the model, but it's essentially a recommendation system that will determine what you may want to do next.
And you can click that one button and it should kind of pre-populate with some information in there. And of course, you know, uh voice assistants are are dominating the field right now because of LLMs um and all these speech use cases. So, we do have our own Mercedes-Benz voice assistant. Uh we're looking into using it as much as we can with all these different models and use cases and whatnot and just incorporating a bit more.
Uh I just out of curiosity, has anyone driven a? If you just raise your hand. Oh, yeah. Wow, a good amount of you. Sweet. Makes makes me look good. Uh now it's a kind of pull that together a bit with privacy-preserving machine learning and some of the techniques that have kind of, you know, been the trend or have been making their way into, you know, popular topics recently. Um the first one Oh, uh challenges. Yes. So, it's obviously very challenging to train models accurately when you're trying to anonymize or consider privacy with machine learning.
So, there's a section on model training. Essentially, when the more you get rid of or scrub or anonymize your data, it becomes less accurate for the model and the model can't learn as well or efficiently from the data. It's kind of intuitive. Uh and then there's these other issues that come up when you're trying to, you know, fix that. And so, like re-identification is the idea of just because you anonymize it, if there are patterns in that data, you can still almost reverse engineer and find those patterns and work backwards to find out that who that data came from.
So, that has happened. You've maybe seen in the news where a large company will publish a data set thinking they anonymized it and then, you know, the open source community will say, "Hey, someone figured out a way to reverse engineer that data, find out who it came from." causing a bunch of, you know, issues for that company. And then model leakage is the idea that these models, they find patterns, but sometimes they memorize information.
Uh you can also use the model to find out, you know, some information from the data. So, trying to fix those two ends up with techniques to scrub or anonymize the data even more so. And then you go back to the model training issue, which is you can't accurately train a model if you get rid of all the data and anonymize it way too much. Uh yeah. So, the approaches I'm just going to go over a few here. Uh obviously, there's a lot of approaches, but these three I'm I'm going to go over.
The one on the far left, run at the edge. I'm not going to go into that one because it's pretty straightforward. It basically means take your code, run it at the edge, and that's it. Like you don't send data back, you don't send the model back. Everything just runs at the edge. In our case, it'd be like running a model in the car and never collecting that data or the model again. You can do analytics, like I mentioned, fleet-based analytics based on usage and a bunch of anonymized data, but that's all you really do.
Um which is a very much a fair approach because then that makes you have to have the pipelines in place. You have to have the algorithms making sure that they have access to data and you test those extremely well. Um it's it's a solid approach. Uh but it falls short when you need to use data from the car to train a model that doesn't necessarily need to be trained in the car or if you need, let's say, a GPU. Those cars are not meant for GPUs.
The resources are a bit more constrained than, let's say, you know, AWS or somewhere else. Um and there's federated learning, which is kind of a decentralized approach where you can pull the weights uh and then use that as an averaging or global model. Uh and there's differential privacy, which I'll get into these later, too, but it's basically adding noise to make sure you can't differentiate the data from the noise.
You don't know it came from this exact person. So, federated learning first. Like I mentioned, it's it's a training models at the edge, but in a distributed fashion, and then you basically kind of pull them in some way, the weights, into a global general model. The problem here is that historically, these don't work well with especially personalized models. So, for example, let's say we run a food recommendation model.
And each of these colors on the bottom represent a different person, and it learns their preferences. So, let's say, you know, one prefers Italian food, one prefers, you know, Mexican food, etc. etc. And then there's this global model where you pull it all together, and let's say it tries to find some balance or mean of the other models, and it ends up being, let's say, like British food or something like that. Something completely different.
Um you have to make sure that model's actually useful and can be used and make customers happy because otherwise, there's no point in collecting the data from those localized devices because you could have just ran it at the edge and let it be a uh local model running personalized and learning from the device or the owner of the device. Um some other cons are you have to constantly sync the model, which can be costly.
And then, like I said earlier, you have to weigh against the benefit versus just running it at the edge and not actually collecting or syncing the models from the devices back with the larger server. Uh differential privacy is uh like I mentioned earlier, it's just adding a bit of noise to make sure that you can't determine whose who the real data's coming from. So, this diagram's a little bit messy, but basically, the top level here with database D uh and analysis and answer A, it's think of it as just a bunch of data, just noisy data.
And then you add someone's actual data. In this case, it says data. It should still give you basically the same answer, which means you can't actually differentiate which part of it was data in this case. Um strong privacy guarantees here. What's nice about it is you can do some tradeoffs with it. You there's almost like a slider or a lever that you can pull, and you can determine how private you want the data to be and include more or less noise, essentially.
So, it's a bit more nuanced, and it works pretty well. The downside is that it adds a lot of computational implementation complexity, so your runtimes are going to be a lot larger and higher, which means costly. Uh and also, I should mention federated learning, differential privacy, these are attempts at looking at from a algorithmic or after the data collection, right, design. So, this is um you're focusing a lot more on the algorithms and instead of like the overall picture.
So, what we ended up thinking about is how do we design something that mimics the training in the vehicles, but running it in the cloud with all the resources basically of the cloud. Um without having to worry about algorithms or updating the algorithms or uh updating certain models, but not all of them. Like we wanted to be able to just take the vehicle and put it in the cloud somehow because that was the ideal situation.
So, we wanted to use in our case, Azure's confidential computing. Um as I hinted at earlier, they mentioned Azure confidential computing's website mentions, you know, there's data at rest, there's data in transit. They focus on data in use or like data at compute time, essentially. So, this is making sure that whenever the data leaves the chip registry, the data registry, it's it you can't access the data at all, even if you're like an admin or an employee or anything like that.
Think of it as like a black box. Um so, whatever runs in that black box, you don't know what it is from an employee perspective. Uh and then here's some other benefits, right? So, like insider threat, uh hackers, but these are also could be internal. So, they could be malicious actors internal in your own organization um or at whatever company's hosting these services. So, to connect everything together, I'm going to walk through this a little bit slowly, but uh I've already mentioned this part before.
So, this is what we have been talking about now, where we have these vehicles or in this case, trusted devices. So, they could also be like a mobile device, like a phone. And there's data there, whether it's in the phone or on the vehicle. If it were to leave the vehicle or your phone, it has to be encrypted or anonymized. We'll put the anonymized part aside for now. We'll focus on the encrypted part. And as I mentioned earlier, our platform team created this key management service or key management system here, uh which allows us to communicate and figure out what shared keys were issued and who's the owner of those keys, etc. etc.
And then we have a data lake here. So, I think I mentioned earlier, too, that the encrypted data can be stored in the data lake as long as it's encrypted and we can't access the keys as employees. So, the next step would be to create these confidential confidential computing virtual machines and send the shared keys to the VMs via in this case what I'm talking about is the Azure secure key release feature. So, very high-level, I don't know if anyone from Microsoft is in here that can explain it way better than I can, but there's this attestation which is it's basically a checklist or it confirms that criteria has been met and when that is met it will then release these shared keys that you specify to a resource or system that is trusted.
So, in this case the confidential computing virtual machines. So, within those virtual machines, you would just have to create compute clusters. So, the resources you want you need this is coming from the cloud, so there's like I mentioned before a lot more resources in the cloud than uh a car driving. Um the resources in the car are actually not uh that large because there's so much stuff running in there. So, it's very limited.
So, then from there uh I'm sorry if I, you know, gloss over some stuff from Azure confidential computing's like documentation or whatnot. Um but essentially they allow you to push your code files or from your code registry, GitLab, GitHub, whatever may be uh into those uh compute clusters or those virtual machines as well. So, you would just have to push your code there which now includes the data, the keys, and your code.
And from there in our case we use machine learning algorithms in this uh outputs a model file in this case or a model. And since those keys are still there, we can then encrypt the model with the key that came from the user meaning those models because they're personalized can only be decrypted by the user's key. So, when it goes back into the car later. Um so, this goes back to earlier in that slide I had where um models can memorize data and you can use those models to find out information about someone if they're very personalized to them.
This helps mitigate that because no one can access the model even except for the user with the key. Uh and then there's some documentation about this, but uh you can collect some metadata from the confidential computing VMs or the compute clusters too. Uh the trusted execution environment is kind of what it's called, but it's limited. You can collect certain metadata like accuracy, I think data sizes and whatnot. Um but it's better than nothing, so you can store that to then analyze how that training process went and how your uh machine learning workflows uh ran.
And then cloud model storage area can be anything. It could be an S3 bucket, it could be an Azure blob storage. It it's basically just there to hold the encrypted models. And then the last part is like I said pushing those models back to the vehicle. It could be a push-pull method. It's pretty general, but you have the encrypted model now and that part's probably the easiest part is to get the model to the vehicle and some type of local storage and then when it gets loaded in the next time it uses the key on device to then decrypt the model and you can use it freely with all the personalized information in the vehicle.
So, some considerations about all of that uh is the benefits, yes, you're training on the raw data. It's doing kind of what I mentioned where you're trying to take the car environment and you just basically put in the cloud while keeping privacy in mind. Um you can replicate the tech stack in the vehicle, so to a certain extent, right? Um the hardware's obviously going to be different, so you can't really replicate that, but you can at least replicate the software or some of the services.
Uh and then that way you are more confident in the model and the code going into the vehicle. Uh the other thing is there's no complex privacy algorithms you have to oversee or if the new one comes out, right? You have to swap that out. Um this is purely an architectural design and it's using production-level software from large vendors. Drawbacks. Higher costs. Uh absolutely higher costs because these VMs are not there's not too many of them.
Um they're more expensive to use overall, so you have to be a little bit picky on what you use this architectural design for because if you don't need this design, then it's just going to cost more money for no reason. Also, the complexity is in the architecture now. So, you have to make sure each component of that architecture is solid, tested, and productionized. Um also, if you run at the edge, you're not really transferring data over the air, which means doing this way where it's encrypting you send it back, you incur higher network and data transfer costs because now you're actually collecting data from the customers.
Uh and then performance overhead it depends on what you were doing before, but in this case, you know, the computation is going to take a little bit longer because like I mentioned where the chips uh they consider the encryption. So, when you're trying to swap the data in and out of the registry, uh there is some time there that will cost you in computational time. Um so, your training time will increase. However, you are running in a, you know, trusted execution environment.
So, on the horizon some next steps that we're taking a look at uh if you didn't know, Databricks now supports Azure confidential computing. Uh there's one piece from the diagram earlier that is missing still. Uh it's that secure release function, at least last time we talked to them. So, we've been in contact with both Microsoft and Databricks. Uh We've had some good talks. Databricks has mentioned they can support uh that diagram and every piece of it.
It's just it takes a little bit of workarounds and some um effort, I guess. But yes, you can actually run clusters on Azure's confidential computing. You have to set up the VMs beforehand and then in Databricks, you essentially just select the confidential computing VMs and run the clusters and your containers on that. And what's really nice then is you don't have to change your code, at least I don't think so. Um So, if you run this purely in Azure or kind of on your own, you have to update your code a lot more because you have to consider the hardware and a lot of the other constraints related to confidential computing trusted execution environments.
The really nice part about Databricks is they do all of this for you. So, your your code doesn't change and you just get the benefit of running that code in those environments. Um I don't know the dates about when the secure release function is going to come around or if it's on the road map. Uh I wish I did, but yeah, I will probably have to follow up with Microsoft and Databricks about what the timeline is for complete integration.
Um and then I mentioned this a bit earlier too with use case criteria, you really have to evaluate when should you be doing this because the cost is higher. Uh so, if you can run your models and your systems in the edge, on a mobile device, wherever it may be, and everything seems to be working very well and you have insights of how the models are performing and you don't really have use cases where you need, let's say like cloud infrastructure or GPUs or any any additional uh overhead, then maybe this isn't necessary.
Um And I also forgot to mention with the GPU part, Nvidia is now supporting encryption on the chip. So, I don't remember exactly when, but I think it was maybe a year or two ago, uh some of the newer GPUs coming out do support trusted execution environments and kind of this pattern. Uh I believe Azure is supporting some of those GPUs already. I'm not sure how available they are or how costly they are, but I do know Nvidia is also building their chips to handle this.
Uh yeah, if you have a bunch of data you need to get and it's personalized information and you need to run on GPU or have like a larger model because of that, then this would be fitting in that category. And the last point is optimization. So, if you can optimize it, that'd be great, cut down the costs. Um the other thing is like I mentioned the training time. So, the overall compute is pretty high. If you can somehow reduce the cost of the data swap and then, you know, overall machine learning training by making your models train faster, uh that you would cut down time and money.
So, to kind of summarize, uh you probably remember these three points earlier. So, some of the challenges for privacy-preserving machine learning, uh the model training part, they're not accurate the more you scrub the data. Uh with this approach, you can get basically the raw data you had initially, uh, train your models on that data, so it's as accurate as it was if you were to train it in the embedded device. Uh, obviously with the drawbacks I mentioned earlier.
Uh, re-identification that was you can use the data to then trace back to who this actually belonged to based on the patterns in the data. Uh, in this case the data is protected at every step. It's encrypted, uh, following obviously all the best practices, the software best practice for data protection. Um, yeah, it's even the model itself is encrypted. So, on the model leakage side, you can't use the model to then reverse engineer and see who this data came from or what their personal preferences are.
Uh, every like I said, every step of the way it's encrypted and yeah, it's even in the car it's it's, you know, encrypted essentially when it gets there first. So, uh, as long as the keys are correct, nothing happens with keys. That's really the bottleneck there. Uh, then everything should work well. And yeah. So, I have some few minutes left. I could take some questions and then I have a they asked me to also say that, you know, this is a forward-looking thing, so not everything is in place or production ready.
Um, it's just, you know, it's mandatory I have to I think say this and then also complete your surveys. If you haven't been doing your surveys, make sure you do them. Yeah, I haven't done any of them, so.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.