1 of 21

AI in [H]EX

A quick survey of Artificial Intelligence packages in Elixir

2 of 21

Who am I?

Robert Bates�Principal Engineer II @ Veloxiti AI Works

arpieb most everywhere online

Been tinkering with Elixir since 2015 with interests in ETL, ML, KBAI, and NLP

Participate in the EEF Machine Learning WG�https://erlef.org/wg/machine-learning

3 of 21

Flavors of “Artificial Intelligence”

Machine Learning (ML)

  • aka “statistical learning” or “connectionist AI”
  • Learns function approximations/curve fitting in multiple dimensions
  • Supervised, unsupervised, and reinforcement learning approaches

Knowledge Based AI (KBAI)

  • aka “symbolic AI”
  • Leverages heuristics, knowledge-based inference, symbolic relationships

4 of 21

Packages included in this survey

Packages that:

  • Implement ML or KBAI algorithms natively in Elixir
  • Are available on Hex
  • Are available as public repos
    • From recent blog posts, tweets, etc
    • From h4cc/awesome-elixir
  • Are part of a cross-platform/cross-language system

5 of 21

Packages we are not going to discuss

Packages that:

  • Only provide a client for an AI SaaS API
  • Simply wrap a NIF or port to a non-Elixir software system
  • Appear to be abandoned (repo gone, ignored issue queue, noted as such by author, etc)
  • Are incomplete or unusable (e.g. mix new; mix hex.publish)

6 of 21

Disclaimer

  • I do not have firsthand experience with most of these packages
  • I do not know the ongoing status of these packages or usability for a specific use case
  • YMMV

7 of 21

Machine Learning

8 of 21

Supervised Learning

Supervised learning is the machine learning task of learning a function that maps an input to an output based on example input-output pairs.

https://medium.com/@jorgesleonel/supervised-learning-c16823b00c13

9 of 21

Packages on Hex

annex

A composable deep learning framework in Elixir

decidex

A small and simple decision tree learning library

emel

A simple and functional machine learning library written in elixir

learn_kit

Elixir package for machine learning

neural_network

A neural network made up of layers of neurons connected to each other to form a relationship allowing it to learn

penelope

Natural Language Processing (NLP) and Machine Learning (ML) library for Elixir

tangram

Tangram is an all-in-one machine learning toolkit designed for programmers (freemium model)

10 of 21

Packages in the wild (aka GitHub)

fredwu/simple_bayes

A Naive Bayes machine learning implementation in Elixir.

mrdimosthenis/Synapses

A lightweight library for neural networks that runs anywhere

11 of 21

Reinforcement Learning

Reinforcement learning is an area of machine learning concerned with how intelligent agents ought to take actions in an environment in order to maximize the notion of cumulative reward.

https://www.arxiv-vanity.com/papers/1708.05866/

12 of 21

Packages

alex

ALEx lets you run the Arcade Learning Environment from Elixir

gyx

Gyx allows designing and training Reinforcement Learning tasks. It includes environment abstractions that allows interaction with Python based environments like OpenAI Gym.

13 of 21

Evolutionary Algorithms

An evolutionary algorithm (EA) is an optimization algorithm that has mimicked the biological mechanism such as mutation, recombination, and natural selection to find an optimal design within specific constraints.

https://cxl.com/blog/evolutionary-algorithms-optimization/

14 of 21

Packages

genex

Genex makes it easy to write Evolutionary Algorithms in Elixir�https://pragprog.com/titles/smgaelixir/genetic-algorithms-in-elixir/

neat_ex

This project provides the means to define, simulate, and serialize Artificial-Neural-Networks (ANNs), as well as the means to develop them through use of the Neuro-Evolution of Augmenting Toplogies (NEAT) algorithm created by Dr. Kenneth Stanley.

zampino/exnn

An Elixir Evolutive Neural Network framework à la G.Sher

15 of 21

Knowledge Based AI

16 of 21

Behaviors

A behavior tree is a mathematical model of plan execution used in computer science, robotics, control systems and video games.

https://docs.unrealengine.com/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/BehaviorTreesOverview/index.html

17 of 21

Rules

A production system (or production rule system) is a computer program typically used to provide some form of artificial intelligence, which consists primarily of a set of rules about behavior but it also includes the mechanism necessary to follow those rules as the system responds to states of the world.

https://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/

18 of 21

Packages

behavior_tree

A library for building AI's via composable behavior trees

rules_engine

A port of the EasyRules (rules engine) to Elixir

retex

Rete algorithm in Elixir

19 of 21

Looking ahead...

20 of 21

Emerging enabling technologies in the Elixir ecosystem are breaking ground for:

  • Deep Learning
  • Advanced graph algorithms
  • Scientific computing
  • Statistical computing
  • Numerical analysis (e.g. FEA)
  • Distributed HPC

Some are already in the works...

21 of 21

Thanks!

(Can’t have an AI talk without a gratuitous robot pic, amiright?)