Skip to content
OpenTrain AIFor AI Companies

From high-level inference algorithms to efficient code

Rajan Walia, Praveen Narayanan, Jacques Carette, Sam Tobin-Hochstadt, Chung-chieh ShanPublished May 17, 2018
arXiv PDF
Researcher verdict
Starting point
Use as implementation starting point
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
2
Review before use

Abstract

Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.

Probabilistic programming languages are valuable because they allow domain experts to express probabilistic models and inference algorithms without worrying about irrelevant details. However, for decades there remained an important and popular class of probabilistic inference algorithms whose efficient implementation required manual low-level coding that is tedious and error-prone. They are algorithms whose idiomatic expression requires random array variables that are latent or whose likelihood is conjugate. Although that is how practitioners communicate and compose these algorithms on paper, executing such expressions requires eliminating the latent variables and recognizing the conjugacy by symbolic mathematics. Moreover, matching the performance of handwritten code requires speeding up loops by more than a constant factor. We show how probabilistic programs that directly and concisely express these desired inference algorithms can be compiled while maintaining efficiency. We introduce new transformations that turn high-level probabilistic programs with arrays into pure loop code. We then make great use of domain-specific invariants and norms to optimize the code, and to specialize and JIT-compile the code per execution. The resulting performance is competitive with manual implementations.

Results and benchmarks

Freshness tier: hot
Probabilistic programming languages are valuable because they allow domain experts to express probabilistic models and inference algorithms without worrying about irrelevant details.

Implementation

Best maintained implementation now

Recommended
Confidence: High
Reproducibility: Limited

A probabilistic programming language

319 stars · 28 forks · Last push Mar 31, 2026 · BSD-3-Clause license

  • License
  • CI
  • Dependencies
  • Docker

Official implementation from Papers with Code · Community adoption signal (319 stars)

Why this implementation
Confidence: high

hakaru-dev/hakaru is the strongest maintained implementation based on ranking signals. License is declared (BSD-3-Clause).

Open hakaru-dev/hakaru
Reproduction risks
  • No CI workflows detected
  • Dependency manifest is missing
  • Selected hakaru-dev/hakaru as the strongest maintained implementation for new work.
  • Repository activity is within the last 24 months.
  • Official repository is preserved separately as historical context.

Compare implementation paths

Compare maintenance quality, reproducibility coverage, and evidence confidence before choosing a reproduction baseline.

hakaru-dev/hakaru
best maintained
Maintenance
Recently updated
Confidence
High
Reproducibility
Limited
Stars
319
Last push
Mar 31, 2026 (147d)

Official implementation from Papers with Code · Community adoption signal (319 stars)

  • No CI pipeline detected
  • No tagged releases
  • No Docker setup
rjnw/sham
historical official
Maintenance
Stale
Confidence
Medium
Reproducibility
Moderate
Stars
69
Last push
May 31, 2022 (1547d)

Official implementation from Papers with Code · Community adoption signal (69 stars)

  • No push in 12+ months
  • No tagged releases
  • No Docker setup
Maintenance
Stale
Confidence
Medium
Reproducibility
Limited
Stars
2
Last push
Apr 29, 2019 (2674d)

Official implementation from Papers with Code · Repository appears stale (>24 months since last push)

  • No push in 12+ months
  • No CI pipeline detected
  • No tagged releases

Reproduction readiness

Time to first repro: days
Last checked: Aug 23, 2026

Major work

No dependency manifest, manual reconstruction required

  • hakaru-dev/hakaru has no requirements.txt, environment.yml, pyproject.toml, or Dockerfile.
  • You will need to reverse-engineer dependencies from import statements in the source code.
Open hakaru-dev/hakaru

Hardware requirements

  • Expect multi-day setup/compute for meaningful reproduction based on current guidance.

Repositories and ecosystem

Official

Community

No additional community repositories detected yet.

Hugging Face artifacts

No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.

Datasets

No trustworthy datasets matches right now.

Search datasets on Hugging Face

Spaces

No trustworthy spaces matches right now.

Search spaces on Hugging Face

Research context

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX

Data includes links from Papers with Code ( CC-BY-SA-4.0 ).