bvmlib

Bayes Vulnerability for Microdata Library.

https://github.com/nunesgh/bvm-library

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords

bayes-vulnerability microdata python qif quantitative-information-flow
Last synced: 6 months ago · JSON representation ·

Repository

Bayes Vulnerability for Microdata Library.

Basic Info
  • Host: GitHub
  • Owner: nunesgh
  • License: lgpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 447 KB
Statistics
  • Stars: 4
  • Watchers: 4
  • Forks: 0
  • Open Issues: 3
  • Releases: 2
Topics
bayes-vulnerability microdata python qif quantitative-information-flow
Created about 4 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

BVM library

DOI (v1.0)

Quantitative Information Flow assessment of vulnerability for microdata datasets using Bayes Vulnerability.

DOI (v1.0): 10.5281/zenodo.6533704.

This repository provides an implementation of the paper Flexible and scalable privacy assessment for very large datasets, with an application to official governmental microdata (DOI: 10.56553/popets-2022-0114, arXiv: 2204.13734) that appeared in PoPETs 2022, and of the masters thesis A formal quantitative study of privacy in the publication of official educational censuses in Brazil (DOI: hdl:1843/38085). Please refer to the folder examples for the Notebooks containing the actual results for the experiments performed.

Installation

Use the package manager pip to install bvmlib.

bash pip install bvmlib

Usage

Warning: Please fill NA and NaN values!

A fix will be provided in a later version.

Meanwhile, consider using the pandas .fillna() method before calling the BVM() class, e.g. when creating the pandas DataFrame, as shown below.

Single-dataset

```python import pandas from bvmlib.bvm import BVM

Create a pandas DataFrame for your data.

For instance:

df = pandas.read_csv(file.csv).fillna(-1)

Create an instance.

I = BVM(df)

Assign quasi-identifying attributes.

I.qids(['attribute1','attribute2'])

Assign sensitive attributes (optional).

I.sensitive(['attribute2','attribute3'])

Perform vulnerability assessment.

I_results = I.assess()

Print re-identification results.

print(Iresults['reid'])

Print attribute-inference results (only if computed).

print(Iresults['attinf']) ```

Additional examples

Please refer to the folder examples for additional usage examples, including attacks on longitudinal collections of datasets.

Note on the results

For privacy assessment of Collective Re-identification (CRS / CRL), for each list of quasi-identifying attributes (QID), the following results are computed: - dCR: corresponds to the deterministic metric; - pCR: corresponds to the probabilistic metric; - Prior: corresponds to the adversary's prior knowledge in a probabilistic attack; - Posterior: corresponds to the adversary's posterior knowledge in a probabilistic attack; - Histogram: corresponds to the distribution of individuals according to the chance of re-identification.

For privacy assessment of Collective (sensitive) Attribute-inference (CAS / CAL), for each list of quasi-identifying attributes (QID) and for each sensitive attribute (Sensitive), the following results are computed: - dCA: corresponds to the deterministic metric; - pCA: corresponds to the probabilistic metric; - Prior: corresponds to the adversary's prior knowledge in a probabilistic attack; - Posterior: corresponds to the adversary's posterior knowledge in a probabilistic attack; - Histogram: corresponds to the distribution of individuals according to the chance of attribute-inference.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU LGPLv3.

To understand how the various GNU licenses are compatible with each other, please refer to the GNU licenses FAQ.

Owner

  • Name: Gabriel H. Nunes
  • Login: nunesgh
  • Kind: user
  • Location: Belo Horizonte, MG, Brazil

Cotutelle Doctoral candidate in Computer Science at the Federal University of Minas Gerais (UFMG), Brazil, and at Macquarie University, Australia.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it using the metadata from this file."
title: "Bayes Vulnerability for Microdata Library"
abstract: >-
  "The Bayes Vulnerability for Microdata Library is a Quantitative Information Flow tool for the assessment of vulnerability for microdata datasets using Bayes Vulnerability."
license: "GNU LGPLv3"
version: 1.0.0
doi: 10.5281/zenodo.6533704
type: "software"
authors:
  - family-names: "Nunes" # nunesgh
    given-names: "Gabriel H."
    orcid: "https://orcid.org/0000-0002-7823-3061"
url: "https://github.com/nunesgh/bvm-library"
repository-code: "https://github.com/nunesgh/bvm-library"
repository-artifact: "https://pypi.org/project/bvmlib"

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 2
  • Average time to close issues: 2 days
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 3
  • Total pull request authors: 2
  • Average comments per issue: 3.33
  • Average comments per pull request: 0.5
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ramongonze (1)
  • luigidcsoares (1)
  • nunesgh (1)
Pull Request Authors
  • luigidcsoares (2)
  • nunesgh (2)
Top Labels
Issue Labels
bug (2)
Pull Request Labels
bug (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 1
pypi.org: bvmlib

Bayes Vulnerability for Microdata library

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 15 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.8%
Stargazers count: 23.1%
Average: 26.9%
Forks count: 29.8%
Downloads: 50.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy *
  • pandas *