Aleator.AutoDiff 0.3.0-preview.1

This is a prerelease version of Aleator.AutoDiff.
dotnet add package Aleator.AutoDiff --version 0.3.0-preview.1
                    
NuGet\Install-Package Aleator.AutoDiff -Version 0.3.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aleator.AutoDiff" Version="0.3.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aleator.AutoDiff" Version="0.3.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Aleator.AutoDiff" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aleator.AutoDiff --version 0.3.0-preview.1
                    
#r "nuget: Aleator.AutoDiff, 0.3.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aleator.AutoDiff@0.3.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aleator.AutoDiff&version=0.3.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Aleator.AutoDiff&version=0.3.0-preview.1&prerelease
                    
Install as a Cake Tool

Aleator.AutoDiff

Gradient-based inference stack of Aleator — capabilities that go beyond the original Scala Figaro:

  • Reverse-mode autodiff tape (Tape, Var, AdMath) with stable log-sigmoid / log-sum-exp primitives, unconstraining transforms (exp / interval / stick-breaking), and differentiable log-densities.
  • JointModel builder + UniverseJointBuilder bridge from Aleator elements to a differentiable joint target.
  • Samplers — HamiltonianMonteCarlo, NoUTurnSampler (dual averaging, mass-matrix adaptation).
  • Variational inference — MeanFieldAdvi, FullRankAdvi, SteinVariationalGradientDescent.
  • Gaussian processes — composable kernels (RBF, Matérn, linear, …), marginal-likelihood hyperparameter learning through reverse-mode Cholesky, FITC sparse approximation.
var model = new JointModel();
var mu = model.Real("mu");
var target = model.Build(s =>
{
    var logp = LogDensities.Normal(s[mu], 0.0, 10.0);
    foreach (var y in data)
        logp += LogDensities.Normal(s.Const(y), s[mu], 1.0);
    return logp;
});
var nuts = new NoUTurnSampler(target, random: new DefaultRandomSource(42));
var draws = nuts.Sample(numSamples: 2000, warmup: 1000);

HMC and NUTS require a finite initial target value and gradient. Non-finite proposals are rejected as divergences; inspect draws.Divergences after sampling. UniverseJointBuilder rejects element evidence because observations, conditions, and constraints must be represented explicitly in its differentiable likelihood callback.

Public result metadata is exposed through read-only snapshots: kernel hyperparameters, GP optimisation history, and variational means, histories, Cholesky rows, and particle rows cannot be changed through an IList cast. UniverseJointBuilder.Latents is instead a live read-only view, so a retained view reflects subsequent Add calls. For compatibility, PosteriorSamples.Draws keeps its IReadOnlyList<double[]> signature; because each row is still a mutable array, every property access returns a fresh deep defensive copy. Cache that returned value when traversing the same draws repeatedly; changing it never affects Mean, Variance, Map, or other sampler diagnostics.

Zero third-party dependencies.

Docs and examples: github.com/deecalov/Aleator.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aleator.AutoDiff:

Package Downloads
Aleator.Torch

TorchSharp bridge for Aleator — wraps a TorchSharp tensor program inside an IDifferentiableTarget so HMC/NUTS/ADVI/SVGD can consume neural-network log-densities and amortised encoders.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0-preview.1 73 9/6/2026