小明

保持饥饿,保持傻x 😄


  • 首页

  • 关于

  • 归档

  • 分类

  • 标签

  • 留言

  • 搜索

CDP-video

发表于 2020-09-02 | 分类于 Blog | 热度 ℃

大佬Steinke讲CDP的视频,https://www.youtube.com/watch?v=U2PoAi5WHLM。看了记录下。

  • Why need a new definition?

    Puer-DP is mathematically elegant, but too restrictive in mayn settings.

    可能在小概率事件上卡住?

    组合性质比它应该能达到性能quadratically worse.

​ Approximate-DP is more permissive, it has better privacy-utility tradeoff.

​ 可以忽略概率小于等于$\delta$的事件;

​ 对于high level的组合性可以得到更好的bounds;

​ However, mathematically inelegant. key composition property is very messy.

​ Doesn’t sharply capture what’s going on. Pay $\log(\frac{1}{\delta})$ factors in analysis.

​ 所以,是否有两全的办法?

  • 组合性质

大佬在这里说,sorry, it is not very intuitive..

  • Composition for $(\varepsilon,\delta)$-DP is not “associative”.

    举例子,四个不同的随机算法组合在一起和四个不同的随机算法两两组合然后再组合,是不一样的。

    End up paying a $\sqrt{\log(\frac{1}{\delta})}$ factor for each level of composition

  • CDP的组合性

  • 标准CDP算法

  • Understanding Concentrated DP

$PrivLoss\sim N(\varepsilon^2,2\varepsilon^2)$

矩生成函数$\mathbb{E}[e^{(\alpha-1)PirvLoss}] \leq e^{\alpha(\alpha-1)\varepsilon^2}$,这个和$\varepsilon^2$-CDP是等价的。

完全没懂。。

CDP是介于pure-DP和approximate-DP之间的,但是又拥有advanced composition等特性,可以通过高斯机制实现。(是说通过更少的噪声实现同样的保护吗?)

  • Limitations

结论

不是很懂!

阅读全文 »

DP-EM Differentially Private Expectation Maximization (skimming)

发表于 2020-08-30 | 分类于 Blog | 热度 ℃

Park, M., Foulds, J., Chaudhuri, K., & Welling, M. (2017). DP-EM: Differentially private expectation maximization. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, AISTATS 2017, 54.

是篇C。但应该还不错,大佬17年科普DPML的slides中做了引用。

提出practical private EM algorithm。为DP-EM提出了一种moment perturbation formulation;利用moments accountant和zCDP来bound privacy cost。

阅读全文 »

(Near) Dimension Independent Risk Bounds for Differentially Private Learning skimming

发表于 2020-08-28 | 分类于 Blog | 热度 ℃

Jain, P., & Thakurta, A. (2014). (Near) dimension independent risk bounds for differentially private learning. 31st International Conference on Machine Learning, ICML 2014, 1, 728–739.

回答了“是否可以高效地计算DPERM,risk bounds不明确地依赖于维度,同时也不需要结构性的假设,比如严格凸“这一问题。本文表明,在一定的假设下,输出扰动和目标扰动算法都可以不明显的依赖于维度,risk依赖于L2-norm of the true risk minimizer and that of training points.

然后,提出了一种新颖的隐私保护算法,用于广义线性模型中的单纯形风险最小化,其中损失函数是一个双微分凸函数。假设训练集的边界为$L_{\infin}$-范数,我们的算法提供的风险边界仅对p有对数依赖性。 还将这一技术应用到在线学习环境中,并获得了对p具有类似对数依赖关系的regret。之前的工作是$O(\sqrt{p})$。

阅读全文 »

Convex Factorization Machine for Toxicogenomics Prediction notes (Skmming)

发表于 2020-08-25 | 分类于 Blog | 热度 ℃

Yamada M, Lian W, Goyal A, et al. Convex factorization machine for toxicogenomics prediction[C]//Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2017: 1215-1224.

凸FM用在毒理基因组预测上的文章。

提出Convex FM,采用线性+平方的模型。对线性项进行l2正则,平方项进行trace norm正则。然后将CFM优化公式化为半定规划问题,并提出了采用Hazan算法的高效优化程序。CFM相对于现有FM的关键优势在于,它可以找到全局最优解,而FM可能无法获得理想的局部最优解,因为FM的目标函数是非凸的。另外,所提出的算法简单而有效,并且易于实现。

通过合成的和传统上使用的movielens数据集,我们首先表明,提出的CFM获得了与FM竞争的结果。 然后,我们在毒物基因组学预测任务中表明,CFM可以比最先进的张量因子分解方法更好地预测药物集合的毒性结果。

阅读全文 »

Unknown typne name 'tls_protocol_version_t'

发表于 2020-07-27 | 分类于 Blog | 热度 ℃

iOS app提交时不支持旧版本的xcode,为了升级xcode,被迫升级了mac OS 10.15.6。

怕什么来什么,果然写好的代码编译出了问题。纯记录当前工程是怎么解决的,不深究原因。

Unkown type name ‘tls_protocol_version_t’

Google半天,最靠谱的是https://www.jianshu.com/p/5abbcf9601bd。

按照他的说法,是引入security.framework时出现了问题。检查了一下,果然security.framework是工程目录下的,并没有tls_protocol_version_t所需要的<Security/SecProtocolTypes.h>这个头文件。

于是在target->General->Framewroks, Libraries and Embedded Content下删掉security.framework。

在Build Phases->Link Binary With Libraries下加入系统自带(iOS 13.6)的security.framework。

重新编译后,Unkown type name ‘tls_protocol_version_t’,Could not build module ‘xxx’问题没有了。

新问题是

Library not found for -lstdc++.6.0.9

参考:https://www.codenong.com/cs105358811/

(想起来了,上次升级了xcode好像也遇到了这个问题,这种旧的依赖其实应该换掉,但为了节省时间,先找旧的拷贝至相应位置)

在以下路径拷贝libstdc++.6.0.9.tbd文件:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

将libstdc++.6.0.9.dylib,libstdc++.6.dylib,libstdc++.dylib文件拷贝到以下路径:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib

文件获取链接直接用参考给出的:https://pan.baidu.com/s/1evpM29cusH5KwWecwE1I8g 密码:r445

再放一个xcode 10的:https://github.com/CoderJYZhu/libstdc-/tree/master/libstdc%2B%2B

UIKit.framework: bundle format unrecognized, invalid, or unsuitable Command CodeSign failed with a nonzero exit code

把报错的相应地framework从Build Phases的embedded framework中去掉。(这个是我手贱,把target->General->Framewroks, Libraries and Embedded Content 的库都给改成了Embed&Sign,后来发现,把embedded framework中去掉以后,这里会变成”Do Not Embed”)

好不容易编译通过了,结果安不到手机了。。

Unable to install “xxx”

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402653103

完整的错误是:

Unable to install “***”

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402653103

--

Could not inspect the application package.

Domain: com.apple.dt.MobileDeviceErrorDomain

Code: -402653103

User Info: {

DVTRadarComponentKey = 282703;

MobileDeviceErrorCode = “(0xE8000051)”;

“com.apple.dtdevicekit.stacktrace” = (

0 DTDeviceKitBase 0x000000011dbd081a DTDKCreateNSErrorFromAMDErrorCode + 233

1 DTDeviceKitBase 0x000000011dc11f70 _90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]block*invoke + 155

​ 2 DVTFoundation 0x00000001050b3f35 DVTInvokeWithStrongOwnership + 73

​ 3 DTDeviceKitBase 0x000000011dc11ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654

​ 4 IDEiOSSupportCore 0x000000011da88e91* 118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]block*invoke.352 + 4165

​ 5 DVTFoundation 0x00000001051e75d4 DVT*

CALLINGCLIENTBLOCK

+ 7

6 DVTFoundation 0x00000001051e9216 _DVTDispatchAsyncblock*invoke + 1194

​ 7 libdispatch.dylib 0x00007fff675e66c4* dispatchcallblockandrelease + 12

8 libdispatch.dylib 0x00007fff675e7658 dispatchclient*callout + 8

​ 9 libdispatch.dylib 0x00007fff675ecc44* dispatchlaneserial*drain + 597

​ 10 libdispatch.dylib 0x00007fff675ed5d6* dispatchlaneinvoke + 363

11 libdispatch.dylib 0x00007fff675f6c09 dispatchworkloopworkerthread + 596

12 libsystempthread.dylib 0x00007fff67841a3d pthread*wqthread + 290

​ 13 libsystem*pthread.dylib 0x00007fff67840b77 start_wqthread + 15

);

}

这个问题查了半天,还在苹果开发者论坛发了下。后来有个别人的回答,从控制台看手机的相关输出是什么样的。

于是从控制台的手机输出上找了半天,忘了是什么了,然后改了下就能装到手机了。

但是会闪退。报的错是

dyld: Library not loaded: @rpath/libswiftCore.dylib

1
Reason: image not found 

这个问题找了有一周了。期间把上一版本的代码搞下来跑也不行。但是换了xcode10.3就可以了。

输出是和我用的开源库countrypickerview有关的,所以升级了这个库。

好像是升级了这个库然后可以安装了,但是一登录就闪退,而且页面变成了卡片式。

卡片式改成全屏

这个问题就参考了iOS 13 的 present modally 變成更方便的卡片設計!

想要改成全屏的只要修改相应controller view的Presentation属性。

结果还是不行。原来是代码里也写死了这个属性。。

1
cv.modalPresentationStyle = UIModalPresentationFullScreen;

然后全局搜索了modalPresentationStyle这个属性,发现果然很多地方都是设置成了UIModalPresentationFormSheet。修改成全屏属性,搞定。

仍然闪退

此时app已经可以正常启动了,但是输入账号密码登录后就闪退。

仔细观察崩溃日志,错误提示是

iflyMSC.framework “The file “Info.plist” doesn’t exist

还报过这个错,后来证明和这个无关。当时我把这个库相关的都注释了。

结论

复现一下出现问题的过程:

升级了最新版本的mac OS 10.15.6和xcode11.6。

原来可以跑通的代码先是蹦出了’libBaiduMobStatSimulator.a’缺arm64架构

The linked library ‘libBaiduMobStatSimulator.a’ is missing one or more architectures required by this target: arm64.

因为本身模拟器的库,要什么arm架构,而且我们的项目要用蓝牙,必须是真机调试的,所以我直接把这个库删掉了。

然后就报最开始的那个错,替换了security.Framework就可以。

后来就变成了我用的那个countrypickerview的开源库,image not found.

然后升级了这个库,结果还是有问题。

阅读全文 »

Convex Factorization Machines (Skimming)

发表于 2020-06-02 | 分类于 Paper Reading | 热度 ℃

Blondel M, Fujino A, Ueda N. Convex factorization machines[C]//Joint European Conference on Machine Learning and Knowledge Discovery in Databases. Springer, Cham, 2015: 19-35.

FM结合了特征工程,因此取得了不错的效果。但是,FM涉及到了非凸优化问题,可能收敛到不太好的局部极值点上。本文基于核范数提出了FM的凸表达式。这种表达对于模型的限制更小,因此比原来的表达更为通用。为了解决对应的优化问题,本文提出了有效的globally-convergent two-block coordinate descent algorithm。在四个推荐任务上表现的都和原始表达式差不都或者更好,并且扩展到了千万级的数据上。

阅读全文 »
1 2 3 … 11
小明

小明

Semper Fortis.

65 日志
4 分类
82 标签
GitHub 知乎 Email
0%
© 2017 - 2022 小明
本站访客数:
由 Jekyll 强力驱动
主题 - NexT.Pisces