DL2: Training and Querying Neural Networks with Logic Ma Marc Fischer er , Mislav Balunovi ć , Dana Drachsler-Cohen, Timon Gehr, Ce Zhang, Martin Vechev github.com/eth-sri/dl2
differencing neural networks finding inputs that deactivates [Pei et al., 2017] neurons NN 1 dog 0 ? ? NN cat NN dog NN 2 cat finding adversarial examples finding adversarial examples [Szegedy et al., 2013] using a generator [Song et al., 2018] ? ? dog NN dog NN dog GEN ( , "cat")
differencing neural networks finding inputs that deactivates [Pei et al., 2017] neurons find i[32, 32, 3] find i[32, 32, 3] where i in [0, 1], where i in [0, 1], class (NN1(i)) = dog, NN(i).l3[17] = 0, class (NN2(i)) = cat, class (NN(i)) = cat, i – image ! < 2 i – image # < 100 finding adversarial examples finding adversarial examples [Szegedy et al., 2013] using a generator [Song et al., 2018] find i[224, 224, 3] find i[100] where i in [0, 1], where i in [-1, 1], class (NN1(i)) = dog, class (NN(GEN(i, cat))) = dog i – image " < 25 return GEN(i, cat)
differencing neural networks NN 1 dog ? find i[32, 32, 3] where i in [0, 1], class (NN1(i)) = dog, NN 2 cat class (NN2(i)) = cat, i – image ! < 2
differencing neural networks finding inputs that deactivates [Pei et al., 2017] neurons find i[32, 32, 3] find i[32, 32, 3] where i in [0, 1], where i in [0, 1], class (NN1(i)) = dog, NN(i).l3[17] = 0, class (NN2(i)) = cat, class (NN(i)) = cat, i – image ! < 2 i – image # < 100 finding adversarial examples finding adversarial examples [Szegedy et al., 2013] using a generator [Song et al., 2018] find i[224, 224, 3] find i[100] where i in [0, 1], where i in [-1, 1], class (NN1(i)) = dog, class (NN(GEN(i, cat))) = dog i – image " < 25 return GEN(i, cat)
differencing neural networks finding inputs that deactivates [Pei et al., 2017] neurons find i[32, 32, 3] find i[32, 32, 3] where i in [0, 1], where i in [0, 1], class (NN1(i)) = dog, NN(i).l3[17] = 0, class (NN2(i)) = cat, class (NN(i)) = cat, i – image ! < 2, i – image # < 100, NN1(i).p[dog] > 0.8, i[:8, :8, :] = image[:8, :8, :] NN1(i).p[cat] < 0.1 finding adversarial examples finding adversarial examples [Szegedy et al., 2013] using a generator [Song et al., 2018] find i[224, 224, 3] find i[100] where i in [0, 1], where i in [-1, 1], class (NN1(i)) = dog, class (NN1(GEN(i, cat))) = dog, i – image " < 25, class (NN2(GEN(i, cat))) = car i – image " > 5 return GEN(i, cat)
<latexit sha1_base64="CrZWmjgsGvR/zUZD9IXyGOaZzE=">ADH3icrVJLb9QwEHbCq4RHt3DkYrEC7aJ0lRQkOFY8BdKkdi20jpEjnc2tTZxUnuCuoryO7jSX8MNce2PQcLZLFBajoxk6/P3zYzH40nKTBoMglPHvXT5ytVra9e9Gzdv3V7vbdzZM0WlBYxFkRX6IOEGMqlgjBIzOCg18DzJYD+Zv2j1/U+gjSzUB1yUEOU8VXImBUdLxRuOx7hOc6nimiEcY7cj1rJpKJOKTjZDP4w+1mEQtIyp8rieL5XOX2TcGDAN41iUraLgiPmdNi3Spg3K+TFLZDp42NFZkUps4u6ws9MOvT61W94pgj/1z0cm+EwlnSTMe8/JPpToU8D2pY3jHv9YBQsjV4E4Qr0ycp2494PNi1ElYPCZRsmYVBiVHONUmTQeKwyUHIx5ylMLFQ8BxPVy09r6APLTOms0HYpEv2bETNc2MWeWI9c46H5rzWkv/SJhXOnkW1VGWFoER30azKBa0nQA6lRoEZgsLuNDS1krFIdcoJ0Tz2MvwT5Gw1ub+F0J2v6rflSvpqSxj0uZ3yLPs/0Kz3fnItjbGoWPR1vn/S3n686t0bukftkQELylGyTN2SXjIlwjpzPzhfnxD1xv7rf3O+dq+usYu6Sv8w9/Qkq7QRw</latexit> <latexit sha1_base64="CcFtO9a/hN1DG9LDZQUwxMEn/w=">ACVXicbZDfSxtBEMf3rtYf5+/6MvRUBAp4c4W9DGoD75ILTRGyAaZ28wlS3b3jt29kHjcH+Gr/mHiHyN0L0lL1Q4sfPczM8zMN8kFNzaKnj3/w9LH5ZXVtWB9Y3Nre2f307XJCs2wzTKR6ZsEDAqusG25FXiTawSZCOwko7M63xmjNjxTv+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H0x4gaEFzCMXIU8DHXQLNIwIdocuj8H6agDVfyHc5zOM1oKnCGUrnW2NwozimFRvql2winV+Zg/JEMSkBhiXhCaEyJkqKubPvN8x9wg0x9hCTcIirs63tYC9YLJp9Bpj2vW0dnd2wdhrFiRgUQmqDEnvSDH05Jq5ExA1Q0LAzlE5rCiTUlzcCclouCW85yVmvkgdVikihtfxLJQm2BNDNmnkWdCWbqz4nfs53UmBycFpymRcIktWBkIQVMR1lMRcA0PbnphTprnNn7Ax1ZSh7Xu3FSZSaoI0Mj7JCoFcq/PqCpAtU2jpbhK4TI0tXRg0gGWXNEtQmRaWGf5Bp9RfyrLIht/KJWElWpHhTODcwHDMkRMaMbFvFr5HzTbFkS46GZarqOTGB+rnTcQiJh86zCRCmUCsHwC1ieHkbJarMrDQyjOQxRF2uJMZW5UWidGlM9STWAXIueKQ2XGQztpSTKJzClwicJl7FPzsegwSdcvTJYrB8ogELX03G1RYEma2m8ZBFvEJauosU7Cx/TOmuBYuBgG4FtAlXW0GfLhkxXcqLtF7pfMJtV2t+SAtUK0/dDy4Nj+2t7OxW5e7DtRjW6T7VXJlh5HfdvPwGtjANb20v/8xBU1R6twypTjMuK/sFpaHvrG4YQxJOZ2UZRlk5q6pL5aJWLlYKqxW2UrBW0CndhWYfmPpasvkjO/7iUSRsL8rX796+qcreaDB4uV9HrRtl+kSHY0Go+DVNWh93Q3ZP3wR9A+vIbV9dRouftof9A+u4fJC52IZ/Nf9p4Modk1cUPZyHVhXsl7Xz4+Dqs1cFtEuapNrKmgVtEktsl8rZO4zLtdh+PsW9u7+rJuGu/7e73He/2/9refv2xe3TveT94v3o7X8wbec+1d+Qde8z75P3t/ev91/mx86zqvN7jd680ey57VW5+h/g10wfQ=</latexit> DL2 Querying query logical formula ϕ differentiable loss minimize loss L ( ϕ ) ≥ 0 0 1 100 ^ ϕ := ( − 1 ≤ i j ∧ i j ≤ 1) @ A find i[100] j =1 X arg min max � logit NN (GEN( i , cat)) i − where i in [-1, 1], i ∈ [ − 1 , 1] 100 k 2 classes class (NN(GEN(i, cat))) = dog ^ k 6 = dog logit NN (GEN( i , cat)) k ∧ logit NN (GEN( i , cat)) dog , 0 � return GEN(i, cat) k 2 classes k 6 = dog ! < logit NN (GEN( i , cat)) dog L ( ϕ ) = 0 if and only if ϕ is satisfied Theorem:
Recommend
More recommend