Federated Learning and Privacy in Social Security Health Data
This page is a translation of the original Portuguese text, provided for convenience. It deals with Brazilian law. If there is any discrepancy, the Portuguese version prevails. Read the original in Portuguese
Federated learning is emerging as a promising way to process sensitive health data in the social security context without compromising the privacy of insured individuals.
What Federated Learning Is and Why It Matters to the INSS (Brazil’s National Social Security Institute)
Federated learning is an artificial intelligence technique that trains machine learning models in a decentralized way, so the raw data never has to leave the place where it was originally stored. Instead of gathering all the information on a central server, the model is sent out to the different collection points. It learns locally from the data available there, then shares only the updated parameters (weights and gradients) with the coordinating server. The data itself never leaves its source.
When we apply this concept to social security, the implications are enormous. Consider that Brazil’s National Social Security Institute (INSS) processes millions of disability benefit applications every year. Each application carries extremely sensitive medical information: expert medical reports, CIDs (ICD codes, from the International Classification of Diseases), hospitalization histories, lab results, and treatment reports. When this information is centralized in single databases, it creates a high risk of a privacy breach in the event of a leak or unauthorized access.
Federated learning offers a way to improve the algorithms used to analyze and screen social security claims with real health data, without moving that data out of hospitals, INSS offices, or medical examination systems. This article examines how the technology could reshape the relationship between administrative efficiency and data protection in Social Security Law. For more information, see our firm’s article on Cybersecurity at the INSS.
Social Security Health Data and Brazil’s Regulatory Framework
Brazil’s General Data Protection Law (LGPD, Law 13.709/2018) classifies health data as sensitive personal data and gives it a heightened level of protection. Processing this data requires a specific legal basis and proportionally stricter security measures. In the social security context, health data is processed for purposes that include granting disability benefits (the temporary incapacity benefit, auxílio por incapacidade temporária, and retirement for permanent incapacity, aposentadoria por incapacidade permanente), conducting medical examinations (perícias médicas), monitoring vocational rehabilitation programs, and detecting fraud.
The INSS, as a federal agency, acts as the controller of a massive volume of sensitive data. Digitized medical certificates, electronic expert medical reports (produced in the SABI system), information from the National Social Information Registry (CNIS) tied to sick leave, and records of Work Accident Reports (CAT) together make up a significant information ecosystem. Concentrating this information in centralized databases, even when protected by encryption and access controls, creates single points of vulnerability.
Articles 46 through 49 of the LGPD require data processing agents to adopt technical and administrative security measures capable of protecting personal data from unauthorized access and from accidental or unlawful destruction, loss, alteration, or disclosure. Federated learning aligns directly with this requirement, because it reduces the exposure of the data by eliminating the need to centralize it to train artificial intelligence models.
Beyond the LGPD, Brazil’s Internet Civil Rights Framework (Marco Civil da Internet, Law 12.965/2014) and the Code of Medical Ethics itself add further layers of protection for health data. Internationally, regulations such as Europe’s GDPR expressly recognize the concept of “data protection by design and by default,” a principle that federated learning fits naturally.
How Federated Learning Works in Social Security Practice
To see how this works in practice, imagine the following scenario: the INSS wants to develop an artificial intelligence model that can identify patterns in expert medical reports that point to a high likelihood of a disability benefit being granted. Under the traditional (centralized) method, it would need to gather thousands of reports from different offices, hospitals, and affiliated clinics into a single repository, process them, and train the model. That would mean sending sensitive medical data across networks, storing it on central servers, and significantly increasing the risk of exposure.
With federated learning, the process works in a radically different way. The initial model (untrained or partially trained) is distributed to each participating node: INSS offices, hospitals in the SUS (Brazil’s Unified Health System) network that perform medical examinations, and vocational rehabilitation centers. Each node trains the model locally on its own data. After local training, only the gradients (the model’s mathematical updates) are sent to the central server, which aggregates them to produce an improved global model. The cycle repeats until the model reaches a satisfactory level of accuracy. Learn more about Health Data and Telemedicine.
There are important technical variations on this process. Federated Averaging (FedAvg), proposed by Google researchers in 2017, is the most widely used algorithm. In it, each node runs multiple rounds of local training before sending its gradients, which reduces the amount of communication needed. Other approaches, such as Federated SGD (Stochastic Gradient Descent), send updates after each batch of processed data. This produces more stable convergence, but at a higher communication cost.
Secure Aggregation and Differential Privacy
Federated learning alone does not guarantee absolute protection. Research shows that, under certain conditions, it is possible to infer information about the original data from the shared gradients (gradient inversion attacks). That is why complementary techniques are essential. Secure Aggregation uses cryptographic protocols to ensure that the central server receives only the aggregated result of the gradients, with no way to access each node’s individual gradients. Differential Privacy, in turn, adds controlled statistical noise to the gradients before they are sent, making it mathematically improbable that the original data could be reconstructed.
Federated learning lets the INSS improve its analysis models without ever centralizing insured individuals’ medical data, turning privacy from an obstacle into an architectural principle.
When we combine federated learning with secure aggregation and differential privacy, we get a robust system in which insured individuals’ medical data never leaves the local environment, individual gradients are protected by encryption in transit, and even if an attacker manages to intercept the gradients, the added noise prevents the original information from being reconstructed.
Concrete Applications and Implementation Challenges
The potential applications of federated learning in the social security context are varied and significant. The most promising are examined below.
Intelligent Screening of Applications
Models trained through federated learning can help with the initial screening of disability benefit applications. They can flag cases with a high likelihood of approval based on patterns drawn from earlier reports. This does not replace the medical examination, which remains an act reserved exclusively to the medical examiner, but it can streamline the queue by prioritizing more serious cases or those with greater clinical urgency. Federated training would allow hospitals and health facilities to contribute their clinical data to improve the model without revealing any individual patient’s information.
Detecting Inconsistencies and Fraud
Another field of application involves detecting anomalous patterns that may indicate social security fraud. Federated models trained on data from multiple sources (INSS offices, Receita Federal, Brazil’s federal tax authority, employers, health plan providers) could identify inconsistencies between, for example, the medical reports submitted and the insured person’s work history, without those databases ever having to be cross-checked directly in a single environment. Also see our firm’s content on Health Wearable Data.
Personalized Vocational Rehabilitation
Vocational rehabilitation programs could benefit from predictive models that estimate the likelihood of success of different therapeutic approaches based on the insured person’s clinical and occupational profile. Federated training would make it possible to incorporate data from rehabilitation centers across the country while respecting patient privacy and each center’s institutional autonomy.
Technical and Institutional Challenges
Implementing federated learning at the INSS is not trivial. The main challenges include: the heterogeneity of the information systems used by the different participating institutions (SUS hospitals, INSS offices, affiliated clinics), which operate with varied data formats and technological infrastructures; the need for a minimum level of computing capacity at each participating node to run the local training; the governance of the process (who sets the model’s parameters, who audits the results, and how to ensure the model is fair across different populations); and the need for specific regulation authorizing and governing the use of these techniques by the government.
There is also the challenge of statistical heterogeneity in the data. The health data available at an INSS office in São Paulo differs qualitatively from what is found at an office in the interior of Amazonas, both in volume and in the distribution of prevalent diseases. This heterogeneity (technically called “non-IID data”) can undermine the convergence of the federated model and call for specific algorithmic adaptations.
Regulatory Outlook and the Future of Social Security Privacy
Brazil’s regulatory landscape is moving toward greater protection of health data, and federated learning is a tool that fits that trend. Brazil’s National Data Protection Authority (ANPD) has published guidance documents that stress the importance of technical protection measures. Adopting technologies such as federated learning can be seen as concrete evidence of compliance with the necessity principle (Article 6, item III, of the LGPD), which limits processing to the minimum necessary to achieve its purposes.
Internationally, initiatives such as the MELLODDY project (Machine Learning Ledger Orchestration for Drug Discovery) in Europe already use federated learning for pharmaceutical research with sensitive data from multiple companies. In health care, hospital consortia in the United States and the European Union apply the technique to train diagnostic imaging models without sharing patients’ scans. These experiences offer valuable precedents for implementation in the Brazilian social security context.
We expect the natural evolution of this field to involve the creation of specific regulatory frameworks for the government’s use of federated artificial intelligence. Algorithmic transparency, model auditability, and a guarantee of non-discrimination will be fundamental pillars. In the social security context, this means that any AI model used to help grant or deny benefits will have to be explainable, auditable, and fair, regardless of the training technique used.
Federated learning is not a magic solution, but it is a significant step toward reconciling administrative efficiency with the protection of fundamental rights. For Social Security Law, which deals every day with the medical information of millions of Brazilians, adopting this technology could mark a new paradigm: the idea that it is possible to innovate without sacrificing privacy.
Frequently Asked Questions
Can federated learning replace the INSS medical examination?
No. Federated learning is a decision-support tool, not a substitute for the medical examination, which is an act reserved exclusively to the medical examiner. Models trained with this technique can help screen applications, identify patterns, and prioritize cases, but the final decision on granting disability benefits remains a human one, grounded in an individualized clinical assessment.
How does federated learning protect insured individuals’ health data?
The protection comes from the fact that insured individuals’ medical data never leaves the local environment where it was collected. Instead of transferring reports, test results, and medical histories to a central server, the artificial intelligence model is sent to each collection point, learns locally, and shares only mathematical parameters (gradients) with the coordinating server. When combined with techniques such as differential privacy and secure aggregation, the system makes it practically impossible to reconstruct the original data from the shared information.
Does the LGPD authorize the INSS to use federated learning?
The LGPD does not specifically mention federated learning, but its principles are compatible with the technology. The necessity principle (Article 6, item III) requires that data processing be limited to the minimum necessary, and federated learning meets that requirement by avoiding unnecessary centralization of sensitive data. However, actual adoption by the INSS would depend on complementary regulation by the ANPD and on a data protection impact assessment, as provided in Article 38 of the LGPD.
Base legal citada
Leia o texto integral e atualizado no CM Legis:
Receba novidades por e-mail
Cadastre-se gratuitamente para receber nossos novos artigos.
Seus dados estão protegidos conforme a LGPD.
Ficou com dúvidas? Fale com um advogado especialista.
📱 Falar pelo WhatsAppAs informações deste artigo são de caráter informativo e não substituem consulta jurídica individualizada. Cada caso possui particularidades que exigem análise específica.






