SmartChoices: Hybridizing Programming and Machine Learning

We present SmartChoices, an approach to making machine learning (ML) a first class citizen in programming languages which we see as one way to lower the entrance cost to applying ML to problems in new domains. There is a growing divide in approaches to building systems: on the one hand, programming leverages human experts to define a system while on the other hand behavior is learned from data in machine learning. We propose to hybridize these two by providing a 3-call API which we expose through an object called SmartChoice. We describe the SmartChoices-interface, how it can be used in programming with minimal code changes, and demonstrate that it is an easy to use but still powerful tool by demonstrating improvements over not using ML at all on three algorithmic problems: binary search, QuickSort, and caches. In these three examples, we replace the commonly used heuristics with an ML model entirely encapsulated within a SmartChoice and thus requiring minimal code changes. As opposed to previous work applying ML to algorithmic problems, our proposed approach does not require to drop existing implementations but seamlessly integrates into the standard software development workflow and gives full control to the software developer over how ML methods are applied. Our implementation relies on standard Reinforcement Learning (RL) methods. To learn faster, we use the heuristic function, which they are replacing, as an initial function. We show how this initial function can be used to speed up and stabilize learning while providing a safety net that prevents performance to become substantially worse -- allowing for a safe deployment in critical applications in real life.

[1]  Yuval Tassa,et al.  Continuous control with deep reinforcement learning , 2015, ICLR.

[2]  Samy Bengio,et al.  Neural Combinatorial Optimization with Reinforcement Learning , 2016, ICLR.

[3]  Dan Grossman,et al.  EnerJ: approximate data types for safe and general low-power computation , 2011, PLDI '11.

[4]  Christoforos E. Kozyrakis,et al.  Learning Memory Access Patterns , 2018, ICML.

[5]  Zhi-Li Zhang,et al.  DeepCache: A Deep Learning Based Framework For Content Caching , 2018, NetAI@SIGCOMM.

[6]  W. B. Roberts,et al.  Machine Learning: The High Interest Credit Card of Technical Debt , 2014 .

[7]  Yoram Singer,et al.  Data-Driven Online to Batch Conversions , 2005, NIPS.

[8]  Mustafa Cenk Gursoy,et al.  A deep reinforcement learning-based framework for content caching , 2017, 2018 52nd Annual Conference on Information Sciences and Systems (CISS).

[9]  Wouter Kool,et al.  Attention Solves Your TSP, Approximately , 2018 .

[10]  Louis F. Williams,et al.  A modification to the half-interval search (binary search) method , 1976, ACM-SE 14.

[11]  Michail G. Lagoudakis,et al.  Algorithm Selection using Reinforcement Learning , 2000, ICML.

[12]  Scott A. Brandt,et al.  Adaptive Caching by Refetching , 2002, NIPS.

[13]  David A. Padua,et al.  Optimizing sorting with genetic algorithms , 2005, International Symposium on Code Generation and Optimization.

[14]  Thomas A. Henzinger,et al.  Probabilistic programming , 2014, FOSE.

[15]  John Langford,et al.  A Credit Assignment Compiler for Joint Prediction , 2014, NIPS.

[16]  Nando de Freitas,et al.  Playing hard exploration games by watching YouTube , 2018, NeurIPS.

[17]  Tom Schaul,et al.  Learning from Demonstrations for Real World Reinforcement Learning , 2017, ArXiv.

[18]  Herke van Hoof,et al.  Addressing Function Approximation Error in Actor-Critic Methods , 2018, ICML.

[19]  Philip Bachman,et al.  Deep Reinforcement Learning that Matters , 2017, AAAI.

[20]  Sergei Vassilvitskii,et al.  Competitive caching with machine learned advice , 2018, ICML.

[21]  Demis Hassabis,et al.  Mastering the game of Go with deep neural networks and tree search , 2016, Nature.

[22]  Tim Kraska,et al.  The Case for Learned Index Structures , 2018 .

[23]  David Silver,et al.  Deep Reinforcement Learning with Double Q-Learning , 2015, AAAI.

[24]  Mohamed Medhat Gaber,et al.  Imitation Learning , 2017, ACM Comput. Surv..

[25]  Lior Wolf,et al.  Learning the Multiple Traveling Salesmen Problem with Permutation Invariant Pooling Networks , 2018, ArXiv.

[26]  Andrew Zisserman,et al.  Kickstarting Deep Reinforcement Learning , 2018, ArXiv.