Coder Social home page Coder Social logo

pyvacy's People

Contributors

chriswaites avatar timgianitsos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pyvacy's Issues

Can pyvacy support GPT-like models?

I am recently finetuning a gpt-like model on some toy-dataset with fake personal data. I am trying to test differential privacy on this LLMs. I wonder if pyvacy will work for this task, or is there any other better options?

minibatch and microbatch

why microbatch can not equal to minibatch ?
when i set microbatch equal to minibatch , there are error as follow:
AttributeError: 'NoneType' object has no attribute 'data'

About the implementation of microbatches

The example implementation given here shows that data is broken down into minibatches and then into microbatches of 1 or few samples each. I was wondering instead of calculating loss like: -

 for X_microbatch, y_microbatch in microbatch_loader(TensorDataset(X_minibatch, y_minibatch)):
        optimizer.zero_microbatch_grad()
        loss = loss_function(model(X_microbatch), y_microbatch)
        loss.backward()
        optimizer.microbatch_step()
    optimizer.step()

what if I did: -

 for x_minibatch, y_minibatch in minibatch_loader(train_dataset):
        loss = [] #List of losses from each microbatch
        for microbatch in minibatch
               loss.update(loss_function(model(X_microbatch), y_microbatch))
        
        for loss_mini in loss:        
              optimizer.zero_microbatch_grad()
              loss_mini.backward(retain_graph = True)
              optimizer.microbatch_step()
    optimizer.step()

Would this implementation give different results?

Issue about Attribute Inference Attack/Defense in Privacy Field

Hi Chris,
Thank you for your codes in privacy algorithm implemented in Pytorch. I'm a new learner in Privacy field and I'm studying attribute inference / membership inference. TensorFlow Privacy repository mainly includes privacy algorithms in DP. However, it includes few codes about attribute inference privacy.

Could you upload some codes about attribute / membership inference in the future?

Thanks in advance!

unable to import sampling from pyvacy

Hi, thanks for your codes. I just ran the minist.py in the tutorial. But it said that
ImportError: cannot import name 'sampling' from 'pyvacy'

I want to know how to do with this.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.