副科级是什么级别| 人流后吃什么药| 劫色是什么意思| 聊表心意是什么意思| 跳蚤咬了擦什么药| 狗翻肠子什么症状| 十二指肠球炎是什么病| 上头了是什么意思| 三叉神经痛挂什么科| 智字五行属什么| 仓鼠为什么吃自己的孩子| 卧榻是什么意思| 三文鱼不能和什么一起吃| 缪在姓氏中读什么| 孕早期适合吃什么水果| 什么动物睡觉不闭眼睛| 丹参泡水喝有什么功效| 为什么子宫会隐隐作痛| 上日下文念什么| 三角形为什么具有稳定性| 儿童过敏性咳嗽吃什么药| 愚昧什么意思| 吃什么对肝脏有好处能养肝| 肌酐高是什么引起的| 压缩性骨折是什么意思| 猪横利是什么| 病毒由什么组成| 自由基是什么| 荔枝不能跟什么一起吃| 孕32周需要做什么检查| 01年属什么| 小腿发胀是什么原因| 帕斯是什么意思| 海虹是什么| 脸部麻木是什么的前兆| 受贿是什么意思| 头顶痛吃什么药效果好| 劳伦拉夫属于什么档次| 腋毛癣用什么药| 军校出来能干什么| 区间放量是什么意思| 筋是什么组织| 甲亢用什么药| 什么是逆向思维| 足底筋膜炎吃什么药| 肠胃属于什么科| 什么水果最甜| 贫血吃什么东西好| 积液是什么东西| 梦到吃螃蟹是什么意思| 擦边球是什么意思| 激光是什么| 什么是潮热| 梦见生孩子是什么征兆| 绝经是什么意思| 小产可以吃什么水果| 剁椒鱼头是什么鱼头| 打喷嚏流鼻涕属于什么感冒| 硫酸羟氯喹片治什么病| 经常嗓子哑是什么原因| 抽搐吃什么药| 低脂牛奶适合什么人喝| 左肾窦分离是什么意思| 仄怎么读什么意思| 欧诗漫适合什么年龄| 人为什么要工作| 三唑仑是什么| 吃完海鲜不能吃什么水果| 中专什么时候报名| 健康证都查什么传染病| 久卧伤气是什么意思| 什么样的疤痕影响当兵| 李子和什么不能一起吃| 乙肝表面抗体阴性是什么意思| 命硬的人有什么特征| 驴胶补血颗粒什么时候喝最好| 胰腺炎是什么症状| 吃什么容易胖起来| 精氨酸是什么| 出油多是什么原因| 胸有成竹什么意思| 什么的积雪| 71岁属什么| 失眠吃什么药最好| 绝情是什么意思| 黄糖是什么糖| 胀气吃什么食物好| 为什么水能灭火| 夏天有什么植物| 丑土代表什么| 观音菩萨属什么生肖| hpv什么症状| 咳嗽喉咙痒吃什么药| 公明仪属什么生肖| 什么的晚霞| 呼吸困难吃什么药| 心绪是什么意思| 梅毒是什么病| 经期吃芒果有什么影响| 牙龈萎缩是什么原因造成的| 身上经常出汗是什么原因| 什么是体制内的工作| 冬瓜和什么不能一起吃| 坚果什么时候吃最好| 指甲盖凹凸不平是什么原因| 顶格是什么意思| 什么是麦粒肿| 体检吃早餐有什么影响| 空气栓塞取什么卧位| 水痘用什么药| 缺钾是什么原因| 梦见老婆出轨是什么预兆| 一五行属性是什么| 子宫肌瘤吃什么食物好| 今年二十岁属什么生肖| e2是什么意思| 山竹不能和什么一起吃| 什么的鼻子填词形容词| 玉皇大帝叫什么名字| 周武王叫什么名字| 尿酸升高是什么原因| 3月份出生是什么星座| 10点是什么时辰| mi什么意思| 什么人容易中暑| 高同型半胱氨酸血症是什么病| 梦见来月经是什么意思| 唯心是什么意思| 开背是什么意思| 月经一直不干净是什么原因引起的| 压床娃娃有什么讲究吗| 可乐饼为什么叫可乐饼| 禄蠹是什么意思| 日柱代表什么| 清肺火肺热吃什么药最有效| 脚趾甲凹凸不平是什么原因| 梦见自己怀孕了是什么意思| 浣碧什么时候背叛甄嬛| 肺结节不能吃什么食物| 天上为什么有星星| 尘埃落定什么意思| 硒酵母胶囊对甲状腺的作用是什么| 出佛身血是什么意思| 夏天受凉感冒吃什么药| 赤色是什么颜色| 白细胞少什么原因| 疑心病是什么意思| 梦见弟媳妇是什么预兆| 早上头晕是什么原因| 为道日损什么意思| 芋圆是用什么做的| 心字底的字有什么| 泰坦尼克号女主角叫什么| 一天什么时候血压最高| 什么叫义齿| 阴虚吃什么药效果最好| 生殖器疱疹擦什么药| 玻璃心什么意思| 胆囊壁增厚吃什么药| 口臭是什么病| 车顶放饮料什么意思| 原则性问题是什么意思| 西梅不能和什么一起吃| 慢性萎缩性胃炎吃什么药可以根治| 细菌性阴道炎用什么药效果最好| 做尿常规挂什么科| 尿生化是查什么的| 脱脂牛奶适合什么人喝| 鼻炎有什么症状| 油性皮肤适合用什么护肤品| 精彩是什么意思| 西凤酒是什么香型| 三庭五眼是什么意思| 数不胜数的胜是什么意思| 曲拉是什么| 抹茶是什么茶叶做的| 女人腰酸背痛是什么病| 坎什么意思| hpv病毒是什么病毒| tap什么意思| 男属鸡的和什么属相最配| 喝什么茶能降低血糖| 白芷有什么作用| 手心出汗什么原因| 霉菌性阴道炎是什么症状| 淋巴细胞减少说明什么| 9月3号是什么纪念日| 头发湿着睡觉有什么害处| 三伏天晒背有什么好处| 血小板比积偏高是什么意思| 1959年属什么生肖| 芈怎么读什么意思| 为什么拉尿会刺痛| 排骨粥要搭配什么好吃| 坐月子什么意思| 人为什么会近视| 村支书是什么级别| 红豆吃多了有什么坏处| 癣用什么药膏| 意什么深什么| 三点水卖读什么| 卟啉病是什么病| 送礼送什么水果| 上火吃什么药最有效果| ul是什么单位| 男人时间短吃什么药| 狗狗拉虫子又细又长吃什么药| 透析到什么程度会死亡| 焦虑吃什么药| 眼科pd是什么意思| 热辐射是什么| 12点是什么时辰| 粘纤是什么材料| 八0年属什么生肖| 衣冠禽兽指什么生肖| 玻璃体混浊用什么药| 龙龟适合什么属相人| 磷高了会出现什么症状| 什么是意淫| 干什么最挣钱| 宇字属于五行属什么| 提手旁有什么字| 风湿属于什么科| 侃侃而谈什么意思| hpv检查挂什么科| 避孕套上的油是什么油| 点痣挂什么科室| o型血和a型血生的孩子是什么血型| 跑单是什么意思啊| 什么原因导致有幽门杆菌| 今天突然拉稀拉出血什么原因| 肝阴虚吃什么药| 口腔医学是干什么的| 命硬的人有什么特征| 什么的山野| 11.18是什么星座| 居里夫人发明了什么| 6月16号是什么星座| 山竹有什么功效| 送同学什么生日礼物好| 五福临门是什么生肖| 胃幽门螺旋杆菌吃什么药| 心脏看什么科室| 常见的贫血一般是缺什么| 猪吃什么食物| 旅长是什么级别| 备孕不应该吃什么| 小腹一直疼是什么原因| 少田宅痣是什么意思| 补牙为什么要分三次| 红玛瑙五行属什么| 拉大便肛门口疼痛什么原因| 1998年什么命| 什么帽不能戴| 什么精什么神| 看脱发应该挂什么科| 喝什么酒对身体好| 心电图伪差是什么意思| 玩世不恭是什么意思| 舒肝解郁胶囊治什么病| 准备要孩子需要注意什么| 美色是什么意思| pv是什么意思| 巧克力不能和什么一起吃| 百度

Developer Tools

Open Source

来源是什么意思

百度 工委副书记王书林、芮士成,市级机关纪工委书记李文娟出席会议;来自工委各所属单位党委、各直属机关党组织的机关党委专职副书记参加会议。

August 31, 2020

We are releasing Opacus, a new high-speed library for training PyTorch models with differential privacy (DP) that’s more scalable than existing state-of-the-art methods. Differential privacy is a mathematically rigorous framework for quantifying the anonymization of sensitive data. It’s often used in analytics, with growing interest in the machine learning (ML) community. With the release of Opacus, we hope to provide an easier path for researchers and engineers to adopt differential privacy in ML, as well as to accelerate DP research in the field.

Opacus provides:

  • Speed: By leveraging Autograd hooks in PyTorch, Opacus can compute batched per-sample gradients, resulting in an order of magnitude speedup compared with existing DP libraries that rely on microbatching.

  • Safety: Opacus uses a cryptographically safe pseudo-random number generator for its security-critical code. This is processed at high speed on the GPU for an entire batch of parameters.

  • Flexibility: Thanks to PyTorch, engineers and researchers can quickly prototype their ideas by mixing and matching our code with PyTorch code and pure Python code.

  • Productivity: Opacus comes with tutorials, helper functions that warn about incompatible layers before your training even starts, and automatic refactoring mechanisms.

  • Interactivity: Opacus keeps track of how much of your privacy budget (a core mathematical concept in DP) you are spending at any given point in time, enabling early stopping and real-time monitoring.

Opacus defines a lightweight API by introducing the PrivacyEngine abstraction, which takes care of both tracking your privacy budget and working on your model’s gradients. You don’t need to call it directly for it to operate, as it attaches to a standard PyTorch optimizer. It works behind the scenes, making training with Opacus as easy as adding these lines of code at the beginning of your training code:

model = Net()
optimizer = torch.optim.SGD(model.parameters(), lr=0.05)
 
privacy_engine = PrivacyEngine(
   model,
   batch_size=32,
   sample_size=len(train_loader.dataset),
   alphas=range(2,32),
   noise_multiplier=1.3,
   max_grad_norm=1.0,
)
privacy_engine.attach(optimizer)
# That's it! Now it's business as usual

After training, the resulting artifact is a standard PyTorch model with no extra steps or hurdles for deploying private models: If you can deploy a model today, you can deploy it after it has been trained with DP without changing a single line of code.

The Opacus library also includes pre-trained and fine-tuned models, tutorials for large-scale models, and the infrastructure designed for experiments in privacy research. It’s open-sourced here.

Achieving high-speed privacy training with Opacus

Our goal with Opacus is to preserve the privacy of each training sample while limiting the impact on the accuracy of the final model. Opacus does this by modifying a standard PyTorch optimizer in order to enforce (and measure) DP during training. More specifically, our approach is centered on differentially private stochastic gradient descent (DP-SGD).

The core idea behind this algorithm is that we can protect the privacy of a training dataset by intervening on the parameter gradients that the model uses to update its weights, rather than the data directly. By adding noise to the gradients in every iteration, we prevent the model from memorizing its training examples while still enabling learning in aggregate. The (unbiased) noise will naturally tend to cancel out over the many batches seen during the course of training.

However, adding noise requires a delicate balance: Too much noise would destroy the signal and too little would not guarantee privacy. To determine the right scale, we look at the norm of the gradients. It’s important to limit how much each sample can contribute to the gradient because outliers have larger gradients than most samples. We need to ensure privacy for those outliers, especially because they are at the greatest risk of being memorized by the model. To do this, we compute the gradient for each individual sample in a minibatch. We clip the gradients individually, accumulating them back into a single gradient tensor and then add noise to the total sum.

This per-sample computation was one of the biggest hurdles in building Opacus. It’s more challenging compared with the typical operation with PyTorch, where Autograd computes the gradient tensor for the entire batch as this is what makes sense for all other ML use cases, and it optimizes performance. To overcome this, we used an efficient technique to obtain all the desired gradient vectors when training a standard neural network. For the model parameters, we return the gradient of the loss for each example in a given batch in isolation, as such:

发生错误
播放视频时出错请先升级网页浏览器,然后观看视频。

Here’s a diagram of the Opacus workflow in which we compute per-sample gradients.

By tracking some intermediate quantities as we run our layers, we can train with any batch size that fits in memory, making our approach an order of magnitude faster compared with the alternative micro-batch method used in other packages.

The importance of privacy-preserving ML

The security community has encouraged developers of security-critical code to use a small number of carefully vetted and professionally maintained libraries. This “don’t roll your own crypto” principle helps minimize attack surface by allowing application developers to focus on what they know best: building great products. As applications and research of ML continue to accelerate, it’s important for ML researchers to access easy-to-use tools for mathematically rigorous privacy guarantees without slowing down the training process.

We hope that by developing PyTorch tools like Opacus, we’re democratizing access to such privacy-preserving resources. We’re bridging the divide between the security community and general ML engineers with a faster, more flexible platform using PyTorch.

Building community

Over the last few years, there’s been a rapid growth in the privacy-preserving machine learning (PPML) community. We’re excited by the ecosystem that’s already forming around Opacus with leaders in PPML.

One of our key contributors is OpenMined, a community of thousands of developers who are building applications with privacy in mind. The OpenMined community already contributes to CrypTen and leverages many of the PyTorch building blocks to underpin PySyft and PyGrid for differential privacy and federated learning. As part of the collaboration, Opacus will become a dependency for the OpenMined libraries, such as PySyft.

We look forward to continuing our collaboration and growing the community further.

Opacus is part of Facebook AI’s broader efforts to spur progress in developing secure computing techniques for machine learning and responsible AI. Overall, this is an important stepping stone in shifting the field toward building privacy-first systems in the future.

Written By

Davide Testuggine

Applied Research Scientist

Ilya Mironov

Applied Research Scientist

凝血功能障碍是什么病 魔芋丝是什么做的 鬼冢虎什么档次 月经来吃什么好 八月二十是什么星座
复古红是什么颜色 什么眼霜去皱效果好 芥子是什么意思 性格内敛是什么意思 吃什么中药能降血压
查肾功能需要做什么检查 老公护着婆婆说明什么 天煞是什么意思 喉咙痛吃什么药效果好 早上睡不醒是什么原因
考试前紧张吃什么药最好能缓解 送老师什么礼物好 吃桂圆干有什么好处和坏处 慢生活是什么意思 大佬什么意思
名什么中什么hcv9jop2ns3r.cn 桑葚和什么泡酒壮阳hebeidezhi.com 蚊子最怕什么东西gysmod.com 性病是什么病hcv9jop4ns6r.cn 美国为什么叫美国hcv8jop5ns3r.cn
什么叫轻度脂肪肝hcv7jop9ns6r.cn 马桶堵了用什么疏通hcv9jop6ns8r.cn 夏天喝什么解暑chuanglingweilai.com 喝茶心慌的人什么体质wuhaiwuya.com 西安有什么好吃的特产hcv7jop5ns5r.cn
胳肢窝疼痛是什么原因hcv8jop9ns2r.cn 血常规24项能查出什么病hcv8jop6ns0r.cn 腮腺炎不能吃什么hcv7jop7ns3r.cn 黄骨鱼是什么鱼hcv8jop2ns6r.cn 什么有助于睡眠hcv7jop7ns1r.cn
aoa是什么意思hcv9jop2ns9r.cn 锦是什么面料hcv9jop5ns6r.cn 学生近视配什么镜片好hcv9jop4ns9r.cn hla是什么意思hcv9jop1ns4r.cn 牙龈肿胀吃什么药hcv9jop7ns3r.cn
百度