Facebook Building Automatic Differentiation System for Kotlin Programming Language

Synced
SyncedReview
Published in
3 min readNov 19, 2020

Facebook AI is building an automatic differentiation system for the Kotlin programming language and developing a system for tensor typing. The work will assist in further exploration of Software 2.0, where software essentially writes itself, the researchers explain in a blog post. “By enabling intuitive and performant differentiable programming in Kotlin, we’re empowering developers to create powerful, flexible programs that take advantage of problem structure while seamlessly maintaining type safety and keeping debugging simple.”

Developed by Czech software company JetBrains and first released in 2011, Kotlin is a statically-typed, general-purpose programming language with type inference for JVM, Android, and web development. Last year, Google made Kotlin its preferred programming language for Android app developers.

The researchers say their work with differentiable programming — a paradigm that enables programs to optimize themselves — is part of Facebook AI’s broader efforts to build more advanced tools for machine learning (ML) programming.

Most differentiable programming frameworks construct a graph consisting of the control flow and data structures in a program. Both arbitrary user and library code can be incorporated into more comprehensive models, and developers can leverage gradients to automatically optimize parameterized programs that aren’t written using ML libraries.

With the aim of extending the Kotlin compiler to make differentiability a first-class feature of the Kotlin language, the Facebook AI team has developed a framework for defining custom differentiable data types and leveraged it to also provide a differentiable Tensor class. They say this will enable users to differentiate through traditional ML models expressed in Kotlin as well as through arbitrary Kotlin code.

The tensor typing system is designed to provide developers with compile-time shape inference and checking. Tensor typing also allows for better code documentation and clarity, and developers can use type annotations as documentation to record what types of tensor inputs are acceptable and expected. Type aliases and generics can be used to further improve code comprehensibility, sharing, and reuse.

To boost research efforts in differentiable programming, Facebook AI will also be releasing a user library that takes maximum advantage of automatic differentiation and tensor typing systems and enables engineers and developers to easily transition from any ML framework onto the Kotlin system.

More information on the Kotlin programming language is available on the official website.

Reporter: Yuan Yuan | Editor: Michael Sarazen

Synced Report | A Survey of China’s Artificial Intelligence Solutions in Response to the COVID-19 Pandemic — 87 Case Studies from 700+ AI Vendors

This report offers a look at how China has leveraged artificial intelligence technologies in the battle against COVID-19. It is also available on Amazon Kindle. Along with this report, we also introduced a database covering additional 1428 artificial intelligence solutions from 12 pandemic scenarios.

Click here to find more reports from us.

We know you don’t want to miss any news or research breakthroughs. Subscribe to our popular newsletter Synced Global AI Weekly to get weekly AI updates.

--

--

Synced
SyncedReview

AI Technology & Industry Review — syncedreview.com | Newsletter: http://bit.ly/2IYL6Y2 | Share My Research http://bit.ly/2TrUPMI | Twitter: @Synced_Global