miltos1 https miltos allamanis com
play

miltos1 https://miltos.allamanis.com Microsoft Research Cambridge - PowerPoint PPT Presentation

miltos1 https://miltos.allamanis.com Microsoft Research Cambridge http://www.eclipse.org/recommenders/ https://visualstudio.microsoft.com/services/intellicode/ Predicting Program Properties from Code Deep Learning Type Inference V. Raychev,


  1. miltos1 https://miltos.allamanis.com Microsoft Research Cambridge

  2. http://www.eclipse.org/recommenders/ https://visualstudio.microsoft.com/services/intellicode/

  3. Predicting Program Properties from Code Deep Learning Type Inference V. Raychev, M. Vechev, A. Krause. 2015 V. Hellendoorn, C. Bird, E.T. Barr, M. Allamanis. 2018 http://jsnice.org/

  4. Defined Types string string

  5. Resea earch h in ML+Cod +Code

  6. Target Task

  7. Programs as Graphs: Key Idea int int int int int int int int for (int i = 0; i < lim; i++) for (int i =0; < ; ++) if (arr[i] > 0) if ( [ ]>0) sum += arr[i]; += [ ]; return return

  8. Programs as Graphs: Syntax ExpressionStatement Assert.NotNull(clazz); Next Token InvocationExpression AST Child MemberAccessExpression ArgumentList ( … Assert . NotNull

  9. Programs as Graphs: Data Flow (x, y) = Foo(); Last Write while (x > 0) Last Use Computed From x = x + y;

  10. Programs as Graphs int int int int for (int i =0; < ; ++) if ( [ ]>0) += [ ]; return ~900 nodes/graph ~8k edges/graph

  11. A B C D Graph Representation for Variable Misuse E G F

  12. A B C D Graph Representation for Variable Misuse E G F

  13. Vector Space Representations

  14. Graph Neural Networks A A B B C C D D E E G G F F Li et al (2015). Gated Graph Sequence Neural Networks. Gilmer et al (2017). Neural Message Passing for Quantum Chemistry.

  15. Graph Neural Networks: Message Passing A B C D E G F D F E

  16. Graph Neural Networks: Message Passing A B C D E G F D F E Li et al (2015). Gated graph sequence neural networks.

  17. Graph Neural Networks: Unrolling

  18. Graph Neural Networks: Unrolling Li et al (2015). Gated graph sequence neural networks.

  19. Graph Neural Networks: Unrolling • node selection • node classification • graph classification Li et al (2015). Gated Graph Sequence Neural Networks. Gilmer et al (2017). Neural Message Passing for Quantum Chemistry. https://github.com/Microsoft/gated-graph-neural-network-samples

  20. Quantitative Results – Variable Misuse Accuracy (%) BiGRU BiGRU+Dataflow GGNN Seen Projects 50.0 73.7 85.5 Seen Projects: 24 F/OSS C# projects (2060 kLOC): Used for train and test 3.8 type-correct alternative variables per slot (median 3, σ = 2.6)

  21. Quantitative Results – Variable Misuse Accuracy (%) BiGRU BiGRU+Dataflow GGNN Seen Projects 50.0 73.7 85.5 Unseen Projects 28.9 60.2 78.2 Seen Projects: 24 F/OSS C# projects (2060 kLOC): Used for train and test Unseen Projects: 3 F/OSS C# projects (228 kLOC): Used only for test 3.8 type-correct alternative variables per slot (median 3, σ = 2.6)

  22. bool string string out string var while null if return true null return false What the model sees…

  23. UI/UX ML Capabilities Metrics Low resources

  24. Learning Signals target prediction input data 𝑦 𝑔 𝜄 (𝑦) model of problem Given dataset • 𝑦 1 , 𝑧 0 , … , 𝑦 𝑂 , 𝑧 𝑂 1 Minimize Loss ℒ 𝜄 = • 𝑂 σ 𝑗 𝑀 𝑔 𝜄 𝑦 𝑗 , 𝑧 𝑗

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend