Rickard Brännvall
Senior Forskare
Contact Rickard
When a company shares an AI model with customers or partners, as a copy or via a service, customer data and trade secrets may be extractable from it – even if the training data is never shared. How do you assess that risk before sharing? We asked Rickard Brännvall, senior researcher at RISE, how attack testing can help organisations decide.
– We start by looking at how the AI model was trained and what data was used, says Rickard Brännvall. That helps us decide whether we need to test leaks or whether the risk is already low. If we go ahead with attack testing, we look at what we can extract with the kind of access an attacker might have to the model.
– One test might try to establish whether a particular person’s data was included in the training set. That alone can reveal something sensitive. In another test, we go a step further and try to reconstruct some of the data itself.
– The attacker’s access to the model also matters. Someone with their own copy can examine the model in more ways than someone who can only access it through an API, where they submit data and get a response.
– First, you need to look at what kind of access it took to extract the information. If the test uses a copy of the model, the company can ask whether users really need their own copy. Access through an API might be enough, with the model staying on the company’s side. We can then test again using the kind of access an attacker would actually have and see whether the information is harder to extract.
– It’s also a cybersecurity issue. In the worst case, a model shared with suppliers or customers could be used for industrial espionage.
– If a test shows that someone with a copy can extract sensitive information, the company can retrain the model using privacy-enhancing technologies. That could mean generalising the data so it contains less detail, or using differential privacy, which adds noise to limit how much any individual record can influence the model. We then repeat the same attack test to see whether the information has become harder to extract. Comparing the two results helps the company decide whether it can share the new model or needs further safeguards.
– Then things can get more complicated. Imagine a company has trained an AI model on personal data and built it into an app. Someone whose data was used in training asks the company to delete it. The company deletes the data from its database, but the trained model is still in the app.
– We can test whether it’s still possible to tell that the person’s data was included in the training set or to reconstruct parts of it. The results give the company’s legal team technical evidence to consider when deciding how to handle the version users already have. Ideally, of course, you test the model before releasing it.
– Both the European Data Protection Board (EDPB) and the Swedish government inquiry into privacy-enhancing technologies (SOU 2026:44) highlight attack testing as a way to assess whether an AI model or dataset reveals personal data. The EU AI Act also requires high-risk AI systems to be resilient against attacks on confidentiality. A test can only tell you about the risk posed by the attacks you’ve tried, so the results still need to be interpreted.
– In the app example, the company needs to know what can be extracted from the model and what that means for how it should handle the model. At RISE, we work on both questions. We can also provide expertise in privacy-enhancing technologies, for example when a model needs to be retrained.
– RISE took part in the LeakPro project, which developed an open-source tool for testing whether AI models or synthetic data reveal sensitive information. In the follow-up project, LeakPro II, we’re expanding the range of tests and working on how the results can become part of robust risk management within organisations.
– In PPAI×REG, Privacy-Preserving AI under Regulatory Pressure, we’re exploring how organisations can use these test results in light of legal requirements and as part of their internal processes, for example when deciding whether and how to share models or data. The project brings together expertise in machine learning, cryptography, cybersecurity and law.
Read more about RISE’s support for systematic testing of AI systems.