Monad-bayes: Probabilistic programming in haskell, tutorial & implementation

schedule Nov 16th 03:00 - 03:20 PM place Ball Room 1 people 64 Interested

We take a dive into probabilistic programming, beginning with a high-level explanation of what probabilistic programming is. We then continue to see how to use the monad-bayes library for performing tasks such as regression in a bayesian formalism. We also look into the implementation of the library, which involves performing an interesting sampling method (markov-chain-monte-carlo) on a very unique space (the space of computational traces of the program). We finally end with next-steps for the haskell community to improve in the probablistic programming space, ala pyro for python

Here is our tiny re-implementation of monad-bayes, boiled down to the essentials: https://github.com/bollu/shakuni

Paper on which the talk is based on: http://mlg.eng.cam.ac.uk/pub/pdf/SciGhaGor15.pdf

 
 

Outline/Structure of the Case Study

Begin by motivating bayesian reasoning and probabilistic programming. Show monad-bayes as an API for solving bayesian inference problems. Describe the implementation of the library, markov-chain-monte-carlo methods, and the space of computations that we will be sampling on. Close with further thoughts on where this library can be taken.

Learning Outcome

Learn about probabilistic programming, markov chain monte carlo, implementing probabilistic programming with conditioning, and the monad-bayes API

Target Audience

Those with an interest in performing data science and bayesian methods with haskell

Prerequisites for Attendees

Attendees should be comfortable with some basic probability theory (the notion of a probability distribution), and should be comfortable with haskell to an intermediate level.

schedule Submitted 3 months ago

Public Feedback

comment Suggest improvements to the Speaker
  • Deepti Tomar
    By Deepti Tomar  ~  2 months ago
    reply Reply

    Hello Siddharth,

    Thanks for your proposal! This is an interesting topic.

    In order to help the program committee to understand your presentation style, can you please upload a video of your past presentations? If you don't have one, can you record a small 1 mins trailer of your talk and share the link to the same? 

     

    Thanks,

    Deepti


    • Liked Anupam Jain
      keyboard_arrow_down

      Anupam Jain - Typesafe Functional SQL

      45 Mins
      Talk
      Intermediate

      We'll discuss how to use strongly typed functional programming to build a typesafe and highly declarative DSL to generate SQL, that allows better abstractions and minimises runtime errors. We'll focus on type systems, and build an intuition for row types and how it guarantees correctness for SQL. I'll cover some parts of actual SQL generation.

      A similar talk was given at IIIT Delhi earlier, however that was more geared towards beginners to Functional Programming (link below). I plan to give a more intermediate level talk this time.

    • Liked Alexander Granin
      keyboard_arrow_down

      Alexander Granin - Hierarchical Free Monads and Software Design in Functional Programming

      Alexander Granin
      Alexander Granin
      Sr. Haskell Developer
      Juspay
      schedule 4 months ago
      Sold Out!
      45 Mins
      Talk
      Advanced

      Functional Programming is going through the same process of rethinking as Object Oriented Programming has passed already. FP today is not only something mystical, something barely applicable for day-to-day tasks, but rather a whole philosophy of building big, complex applications, with own tools, approaches and methodologies. We can see a lot of ideas about software design and architecture emerging from the FP community: talks, books, articles. We’re actively discussing Final Tagless, Free Monads, effect systems and other approaches, but it seems the theme not yet covered and we don’t know about possibilities we have.

      In this talk, I’ll tell you about the power of Free Monads in building complex applications in Haskell and PureScript. These applications will be satisfying the requirements like maintainability, testability, simplicity. You’ll know how to create a safe concurrent application state, how to divide the application into layers and how to keep the code sane. In fact, you can do the same with Final Tagless or extensible effects, but the approach with hierarchical Free Monads has some specific properties making it the best tool to separate concerns and create a very interesting eDSLs with different semantics.

      The talk is based on the ideas I’m describing in my book “Functional Design and Architecture”. I also gave several talks about this theme earlier (you can find all my talks here).

      I’ve used these ideas to build software for different companies, including Juspay (Bengaluru), Restaumatic (Poland), Enecuum (Hong Kong). We’ve created several interesting technologies that were not possible to make without Free Monads. Some of them are open sourced.

    • Liked Harendra Kumar
      keyboard_arrow_down

      Harendra Kumar - Streamly: Declarative Concurrency and Dataflow Programming in Haskell

      Harendra Kumar
      Harendra Kumar
      Founder
      Composewell Technologies
      schedule 3 months ago
      Sold Out!
      45 Mins
      Talk
      Intermediate

      Overview: Streamly is a Haskell library for writing programs in a high level, declarative data flow programming paradigm. It provides a simple API, very close to standard Haskell lists. A program is expressed as a composition of data processing pipes, generally known as streams. Streams can be generated, merged, chained, mapped, zipped, and consumed concurrently – enabling a high level, declarative yet concurrent composition of programs. Programs can be concurrent or non-concurrent without any significant change. Concurrency is auto scaled based on consumption rate. Programmers do not have to be aware of threads, locking or synchronization to write scalable concurrent programs. Streamly provides C like performance, orders of magnitude better compared to existing streaming libraries.

      Motivation: Haskell has a beautiful abstraction capability. Haskell lists, several streaming and concurrency libraries are some examples of good programming abstractions. The problem is that concurrency is not handled elegantly and declaratively by these libraries. Moreover, the lack of good performance gives rise to special purpose performance centric libraries like text and bytestring creating more confusion. Streamly unifies, lists, streaming, concurrency, logic programming and reactive programming with unparalleled performance. We can finally have a unified string handling.

      Audience: Streamly is designed to express the full spectrum of programs. Do not think that if you are writing a small and simple program it may not be for you. It expresses a small program with the same efficiency, simplicity and elegance as a large scale concurrent application. It unifies many different aspects of special purpose libraries into a single yet simple framework. It is especially suitable for high performance and scalable backend data processing systems. If you use or plan to use any real time streaming or data flow programming frameworks including Apache Flink, Apache Spark or asynchronous/reactive programming frameworks like ReactiveX/RxJs then you may be interested in Streamly.

    • Liked Anupam Jain
      keyboard_arrow_down

      Anupam Jain - Supercharged Web Application development with Purescript

      45 Mins
      Workshop
      Beginner

      UPDATE: Please setup https://github.com/ajnsit/purescript-react-starter (follow the instructions in the README) on your laptops as a **prerequisite**.

      Purescript is a purely functional, strongly typed language, that compiles to Javascript.

      It provides several high quality libraries for frontend development, and comes with excellent tooling and editor support that makes writing code a snap!

      In this talk I will provide a quick introduction to some basics of Purescript, and then dive into an interactive demonstration of building a non-trivial web application from scratch. I will show how to interface with React bindings, and how to interface with some existing Javascript libraries (a React UI component lib).

      The presentation will be interactive and similar to an inpromptu talk I gave which is linked below. However, I will also demonstrate live coding of an actual purescript application which people can follow along.

      Bring your laptop to follow along.

    • Liked Anish George
      keyboard_arrow_down

      Anish George - Demystifying Function Sub-typing

      Anish George
      Anish George
      UI Developer
      ThoughtWorks
      schedule 5 months ago
      Sold Out!
      20 Mins
      Talk
      Intermediate

      What is a Type for a function? When can you say that a function is a sub-type of another function? Why should you even bother?

      Function sub-typing is one of the most confusing areas of FP. In this talk, I'll take a deep dive and explain the core concepts of function types which applies to many different languages. More than just explaining the mere rules, I will be deriving those rules in a step-by-step fashion till the eureka moment so that you will never be confused again.

      The topics covered:

      1. Sub-typing basics
      2. Covariance & Contravariance
      3. Function sub-typing
      4. Implementation gotchas in different languages (Java, Scala, Haskell, JavaScript)
    • Liked Ankit Jain
      keyboard_arrow_down

      Ankit Jain - Designing powerful real-time systems using Scala and Akka

      45 Mins
      Talk
      Intermediate

      Sky BML (Beat/Meet/Lose) is a streaming system that produces real time Competitive Intelligence about our Lodging Supply.

      This competitive information is being used, among others, for Market Managers to negotiate with hotels for better rates and avail. Competitiveness is proportional to the share of BML Losses that Expedia incurs. This is why Market Managers focus their energies on minimising losses.

      However, it is not easy to understand why losses occur and consequently their resolution takes proportionately long.Our system tries to simplify this and hence accelerate resolution of losses.

      To develop this system, we fully leveraged the power of different functional features of Scala and used Structured Spark Streaming as the processing engine in combination with Clustering(for better app supervision and lifecycle management of the nodes).

      Similarly, some of the complex challenges are solved very naturally using functional programming features of easily. We had this complex problem of traversing a decision tree (based on conditional expressions) and then evaluating the child nodes(which are also expressions) with different lookup services responsible for mapping the symbols used in Expressions.

      I will be discussing in detail on how we tactically use Functional Programming concepts like Implicits, currying, High-Order Functions to get rolling with this problem with ease.

      Similarly, I will discuss on the way we have apply OOP principles to handle different kinds of inputs(streaming/batch) with minimal code duplication.

      Overall, it will be lot of fun to discuss the way to think about our problems and how our thinking is shaped by different concepts available in Scala.

    • Liked Harmeet Singh
      keyboard_arrow_down

      Harmeet Singh - Type System: The Beauty And The Beast

      45 Mins
      Talk
      Intermediate

      The type system plays an important role in building type-safe applications that reduce runtime exceptions and developer mistakes. This sophisticated system is leveraged by Scala’s most famous functional libraries, such as Scala-Cats and ScalaZ. This feature-rich system allows implementing pure functional programming on the JVM. It is a beast due to its complex syntax, as it prevents developers from exploring its beautiful aspects like partially applying types in Scala. In this talk, we will tame the beast and use its beauty to solve real-life issues faced during coding. Our examples will be based on generics, constraints, type lambdas, and the kind projector plugin.

      The following are the learning objectives of this talk:

      1. Practical use cases of the type system using real-life coding.

      2. Implementing custom higher kinded types and handling partially applied types via type lambdas and the kind projector plugin.

    • Liked ganesan arunachalam
      keyboard_arrow_down

      ganesan arunachalam - What the hell is monad? Why should you care?

      ganesan arunachalam
      ganesan arunachalam
      Developer
      ThoughtWorks
      schedule 3 months ago
      Sold Out!
      45 Mins
      Talk
      Intermediate

      Real world applications are hard to imagine without side effects such as writing to a DB or UI. IO-monads were introduced into the Haskell language to write programs in a robust way. And we have been using monads in our day to day job without even knowing those are monads such as IEnumerable/IObservable in languages like C#, Java.

      This talk is to give a basic understanding about monads and why should we care about that, and a little bit about onion/clean architecture.