Obfuscating user data via differential privacy
In some implementations, a device may receive a request for data, wherein the request is associated with one or more parameters. The device may obtain, based on receiving the request, the data. The device may generate, using the data, differentially private data via a differential privacy function that uses a privacy parameter to control a level of noise that is inserted into the data to generate the differentially private data, wherein the privacy parameter is based on the one or more parameters. The device may provide, in response to the request, the differentially private data.
1 . A system for obfuscating user data via differential privacy, the system comprising:
one or more memories; and
one or more processors, communicatively coupled to the one or more memories, configured to:
receive, from a data consumer, a request for data, wherein:
the request is associated with one or more parameters that specify one or more conditions for allowing access to the data,
the one or more parameters comprise a category associated with the data consumer and a purpose for accessing the data,
the category associated with the data consumer comprises a trusted entity or a non-trusted entity, and
the request indicates the purpose for accessing the data;
obtain, based on receiving the request, the data;
determine, based on the one or more parameters, a privacy parameter associated with defining an accuracy level of differentially private data as compared to the data;
obfuscate the data via a differential privacy function that uses the privacy parameter to control a level of noise that is inserted into the data to generate the differentially private data, wherein:
the differentially private data is different than the data and is representative of the data within the accuracy level, and
the trusted entity is allowed to access data with less inserted noise than the non-trusted entity; and
provide, in response to the request, the differentially private data.
2 . The system of claim 1 , wherein the one or more parameters include at least one of:
a request type associated with the request,
the category associated with the data consumer, or
a permission level associated with the data consumer.
3 . The system of claim 1 , wherein the data includes qualitative data, and wherein the one or more processors, to obfuscate the data, are configured to:
generate, using the qualitative data, qualitative differentially private data that is different than the qualitative data,
wherein a difference between the qualitative data and the qualitative differentially private data satisfies an accuracy threshold, and
wherein the accuracy threshold is based on at least one of the privacy parameter or the accuracy level.
4 . The system of claim 3 , wherein the qualitative data includes a location identifier, and
wherein the one or more processors, to obfuscate the data, are configured to:
perform, using the location identifier, a lookup operation to identify one or more candidate location identifiers,
wherein the one or more candidate location identifiers are associated with respective geographic locations, and
wherein a distance between the respective geographic locations and a geographic location associated with the location identifier satisfies the accuracy threshold; and
select a differentially private location identifier, from the one or more candidate location identifiers, to be included in the differentially private data.
5 . The system of claim 3 , wherein the qualitative data includes a vendor name, and
wherein the one or more processors, to obfuscate the data, are configured to:
determine a category associated with the vendor name; and
generate a generic name, associated with the category associated with the vendor name, to be included in the differentially private data in place of the vendor name.
6 . The system of claim 1 , wherein the request for the data includes a request for one or more statistical parameters associated with the data, and
wherein the one or more processors, to obfuscate the data, are configured to:
calculate, using the data, the one or more statistical parameters; and
obfuscate the one or more statistical parameters via the differential privacy function to generate one or more differentially private statistical parameters to be included in the differentially private data.
7 . The system of claim 1 , wherein the one or more processors are further configured to:
determine whether the request is permissible based on at least one of:
the one or more parameters,
information associated with the data consumer, or
one or more permissions associated with an owner of the data, and
wherein obtaining the data is based on determining that the request is permissible.
8 . The system of claim 1 , wherein the one or more processors, to provide the differentially private data, are configured to:
provide the differentially private data as an input to a machine learning model.
9 . The system of claim 1 , wherein:
the data consumer is permitted to access more accurate data for a first type of purpose than for a second type of purpose, wherein the first type of purpose comprises machine learning model training and the second type of purpose comprises credit checking.
10 . A method of obfuscating user data via differential privacy, comprising:
receiving, by a device, a request for data, wherein:
the request is associated with one or more parameters that specify one or more conditions for allowing access to the data,
the one or more parameters comprise a category associated with a data consumer and a purpose for accessing the data,
the category associated with the data consumer comprises a trusted entity or a non-trusted entity, and
the request indicates the purpose for accessing the data;
obtaining, by the device and based on receiving the request, the data;
generating, by the device and using the data, differentially private data via a differential privacy function that uses a privacy parameter to control a level of noise that is inserted into the data to generate the differentially private data, wherein:
the privacy parameter is based on the one or more parameters, and
the trusted entity is allowed to access data with less inserted noise than the non-trusted entity; and
providing, by the device and in response to the request, the differentially private data.
11 . The method of claim 10 , further comprising:
determining, based on the one or more parameters, the privacy parameter associated with defining an accuracy level of the differentially private data as compared to the data.
12 . The method of claim 10 , wherein the differentially private data is different than the data and is representative of the data.
13 . The method of claim 10 , wherein the one or more parameters include the purpose for accessing the data, and wherein the purpose for accessing the data comprises a purpose associated with a financial process.
14 . The method of claim 10 , wherein the data includes a location identifier associated with a geographic location, and
wherein generating the differentially private data comprises:
searching a location database using the location identifier to identify one or more candidate location identifiers,
wherein the one or more candidate location identifiers are associated with respective geographic locations,
wherein a distance between the respective geographic locations and the geographic location satisfies a distance threshold, and
wherein the distance threshold is based on the privacy parameter; and
selecting a differentially private location identifier, from the one or more candidate location identifiers, to be included in the differentially private data.
15 . The method of claim 14 , wherein the location identifier is a zone improvement plan (ZIP) code.
16 . The method of claim 10 , wherein the noise that is inserted into the data includes one or more modifications to the data.
17 . The method of claim 10 , wherein the data includes identifying information associated with a user or an entity, and
wherein generating the differentially private data comprises:
generating, based on a category associated with the identifying information, generic identifying information that identifies the category associated with the identifying information,
wherein the differentially private data includes the generic identifying information in place of the identifying information.
18 . A non-transitory computer-readable medium storing a set of instructions, the set of instructions comprising:
one or more instructions that, when executed by one or more processors of a device, cause the device to:
receive a request for data, wherein:
the request is associated with a data consumer and one or more parameters that specify one or more conditions for allowing access to the data,
the one or more parameters comprise a category associated with the data consumer and a purpose for accessing the data,
the category associated with the data consumer comprises a trusted entity or a non-trusted entity, and
the request indicates the purpose for accessing the data;
obtain, based on receiving the request, the data;
determine, based on the one or more parameters, a privacy parameter associated with defining an accuracy level of differentially private data as compared to the data; and
obfuscate the data via a differential privacy function that uses the privacy parameter to control a level of noise that is inserted into the data to generate the differentially private data, wherein:
the differentially private data is different than the data and is representative of the data within the accuracy level, and
the trusted entity is allowed to access data with less inserted noise than the non-trusted entity; and
provide, in response to the request, the differentially private data.
19 . The non-transitory computer-readable medium of claim 18 , wherein the data includes qualitative data, and
wherein the one or more instructions, that cause the device to obfuscate the data, cause the device to:
generate, using the qualitative data, qualitative differentially private data that is different than the qualitative data,
wherein a difference between the qualitative data and the qualitative differentially private data satisfies an accuracy threshold, and
wherein the accuracy threshold is based on at least one of the privacy parameter or the accuracy level.
20 . The non-transitory computer-readable medium of claim 18 , wherein the request for the data includes a request for one or more statistical parameters associated with the data, and
wherein the one or more instructions, that cause the device to obfuscate the data, cause the device to:
calculate, using the data, the one or more statistical parameters; and
obfuscate the one or more statistical parameters via the differential privacy function to generate one or more differentially private statistical parameters to be included in the differentially private data.