Typesafe abstractions for tensor operations (short paper)

We propose a typesafe abstraction to tensors (i.e. multidimensional arrays) exploiting the type-level programming capabilities of Scala through heterogeneous lists (HList), and showcase typesafe abstractions of common tensor operations and various neural layers such as convolution or recurrent neural networks. This abstraction could lay the foundation of future typesafe deep learning frameworks that runs on Scala/JVM.

[1]  Gang Chen,et al.  Guarded recursive datatype constructors , 2003, POPL '03.

[2]  Christopher D. Manning,et al.  Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks , 2015, ACL.

[3]  Frederik Eaton,et al.  Statically typed linear algebra in Haskell , 2006, Haskell '06.

[4]  Jürgen Schmidhuber,et al.  Long Short-Term Memory , 1997, Neural Computation.

[5]  Richard A. Eisenberg,et al.  Experience report , 2014, Haskell.

[6]  Tim Sheard,et al.  A fold for all seasons , 1993, FPCA '93.

[7]  E. F. Codd,et al.  Extending the database relational model to capture more meaning , 1979, ACM Trans. Database Syst..

[8]  Nir Friedman,et al.  Probabilistic Graphical Models - Principles and Techniques , 2009 .

[9]  Judea Pearl,et al.  Reverend Bayes on Inference Engines: A Distributed Hierarchical Approach , 1982, AAAI.

[10]  P. R. Griffioen,et al.  Type inference for array programming with dimensioned vector spaces , 2015, IFL '15.

[11]  Andrew Kennedy,et al.  Generalized algebraic data types and object-oriented programming , 2005, OOPSLA '05.

[12]  John Salvatier,et al.  Theano: A Python framework for fast computation of mathematical expressions , 2016, ArXiv.

[13]  Gaël Varoquaux,et al.  The NumPy Array: A Structure for Efficient Numerical Computation , 2011, Computing in Science & Engineering.

[14]  Kevin Duh,et al.  DyNet: The Dynamic Neural Network Toolkit , 2017, ArXiv.

[15]  R. E. Wengert,et al.  A simple automatic derivative evaluation program , 1964, Commun. ACM.

[16]  Andreas Griewank,et al.  Evaluating derivatives - principles and techniques of algorithmic differentiation, Second Edition , 2000, Frontiers in applied mathematics.