a semantic loss function for deep learning with symbolic
play

A Semantic Loss Function for Deep Learning with Symbolic Knowledge - PowerPoint PPT Presentation

A Semantic Loss Function for Deep Learning with Symbolic Knowledge Jingyi Xu, Zilu Zhang , Tal Friedman , Yitao Liang, Guy Van den Broeck Goal : Constrain neural network outputs using logic 1 Multiclass Classification 0.8 0.3 0.9 2 2


  1. A Semantic Loss Function for Deep Learning with Symbolic Knowledge Jingyi Xu, Zilu Zhang , Tal Friedman , Yitao Liang, Guy Van den Broeck

  2. Goal : Constrain neural network outputs using logic 1

  3. Multiclass Classification 0.8 0.3 0.9 2 2

  4. Multiclass Classification 𝒚 𝟐 ¬𝒚 𝟑 ¬𝒚 𝟒 ∨ 0.8 0.3 0.9 Want exactly one class: ¬𝒚 𝟐 𝒚 𝟑 ¬𝒚 𝟒 ∨ ¬𝒚 𝟐 ¬𝒚 𝟑 𝒚 𝟒 3 3

  5. Multiclass Classification 𝒚 𝟐 ¬𝒚 𝟑 ¬𝒚 𝟒 T F T ∨ 0.8 0.3 0.9 Want exactly one class: ¬𝒚 𝟐 𝒚 𝟑 ¬𝒚 𝟒 ∨ ¬𝒚 𝟐 ¬𝒚 𝟑 𝒚 𝟒 No information gained! 4 4

  6. Why is mixing so difficult? Deep Learning Logic • Continuous • Discrete • Smooth • Symbolic • Differentiable • Strong semantics 5 5

  7. Multiclass Classification 𝒚 𝟐 ¬𝒚 𝟑 ¬𝒚 𝟒 ∨ 0.8 0.3 0.9 Want exactly one class: ¬𝒚 𝟐 𝒚 𝟑 ¬𝒚 𝟒 ∨ ¬𝒚 𝟐 ¬𝒚 𝟑 𝒚 𝟒 Probability constraint is satisfied 6 6

  8. Use a probabilistic interpretation! 7

  9. Multiclass Classification 𝒚 𝟐 ¬𝒚 𝟑 ¬𝒚 𝟒 ∨ 0.8 0.3 0.9 Want exactly one class: ¬𝒚 𝟐 𝒚 𝟑 ¬𝒚 𝟒 ∨ ¬𝒚 𝟐 ¬𝒚 𝟑 𝒚 𝟒 Probability constraint is satisfied 𝒚 𝟐 𝟐 − 𝒚 𝟑 𝟐 − 𝒚 𝟒 + 𝟐 − 𝒚 𝟐 𝒚 𝟑 𝟐 − 𝒚 𝟒 + 𝟐 − 𝒚 𝟐 𝟐 − 𝒚 𝟑 𝒚 𝟒 = 𝟏. 𝟐𝟗𝟗 8 8

  10. Semantic Loss • Continuous, smooth, easily differentiable function • Represents how close outputs are to satisfying the constraint • Axiomatically respects semantics of logic, maintains precise meaning – independent of syntax 9

  11. How do we compute semantic loss? 10

  12. Logical Circuits • In general: #P-hard • Linear in size of circuit = - log( ) L(α, p ) = L( , p ) 11

  13. Supervised Learning • Predict shortest paths • Add semantic loss representing paths Is output Is output Does output a path? the true shortest path? have true edges? 12

  14. Semi-Supervised Learning • Unlabeled data must have some label 13

  15. Semi-Supervised Learning • Unlabeled data must have some label • Exactly-one constraint increases confidence 14

  16. 15

  17. Main Takeaway • Deep learning and logic can be combined by using a probabilistic approach • Maintain precise meaning while fitting into the deep learning framework 16

  18. Thanks! 17

Recommend


More recommend