|
6 | 6 | [](https://app.codecov.io/gh/JuliaDecisionFocusedLearning/DecisionFocusedLearningBenchmarks.jl) |
7 | 7 | [](https://github.com/JuliaDiff/BlueStyle) |
8 | 8 |
|
9 | | -This repository contains a collection of benchmark problems for decision-focused learning algorithms. |
10 | | -It provides a common interface for creating datasets, associated statistical models and combinatorial optimization maximizers for building decision-focused learning pipelines. |
11 | | -They can be used for instance as benchmarks for tools in [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl), but can be used in any other context as well. |
12 | | - |
13 | | -Currently, this package provides the following benchmark problems (many more to come!): |
14 | | -- `SubsetSelectionBenchmark`: a minimalist subset selection problem. |
15 | | -- `FixedSizeShortestPathBenchmark`: shortest path problem with on a graph with fixed size. |
16 | | -- `WarcraftBenchmark`: shortest path problem on image maps |
17 | | -- `PortfolioOptimizationBenchmark`: portfolio optimization problem. |
18 | | -- `StochasticVehicleSchedulingBenchmark`: stochastic vehicle scheduling problem. |
19 | | - |
20 | | -See the [documentation](https://JuliaDecisionFocusedLearning.github.io/DecisionFocusedLearningBenchmarks.jl/stable/) for more details. |
| 9 | +## What is Decision-Focused Learning? |
| 10 | + |
| 11 | +Decision-focused learning (DFL) is a paradigm that integrates machine learning prediction with combinatorial optimization to make better decisions under uncertainty. Unlike traditional "predict-then-optimize" approaches that optimize prediction accuracy independently of downstream decision quality, DFL directly optimizes end-to-end decision performance. |
| 12 | + |
| 13 | +A typical DFL algorithm involves training a parametrized policy that combines a statistical predictor with an optimization component: |
| 14 | +```math |
| 15 | +\xrightarrow[\text{Instance}]{x} |
| 16 | +\fbox{Statistical model $\varphi_w$} |
| 17 | +\xrightarrow[\text{Parameters}]{\theta} |
| 18 | +\fbox{CO algorithm $f$} |
| 19 | +\xrightarrow[\text{Solution}]{y} |
| 20 | +``` |
| 21 | + |
| 22 | +Where: |
| 23 | +- **Instance** $x$: input data (e.g., features, context) |
| 24 | +- **Statistical model** $\varphi_w$: machine learning predictor (e.g., neural network) |
| 25 | +- **Parameters** $\theta$: predicted parameters for the optimization problem |
| 26 | +- **CO algorithm** $f$: combinatorial optimization solver |
| 27 | +- **Solution** $y$: final decision/solution |
| 28 | + |
| 29 | +## Package Overview |
| 30 | + |
| 31 | +**DecisionFocusedLearningBenchmarks.jl** provides a comprehensive collection of benchmark problems for evaluating decision-focused learning algorithms. The package offers: |
| 32 | + |
| 33 | +- **Standardized benchmark problems** spanning diverse application domains |
| 34 | +- **Common interfaces** for datasets, statistical models, and optimization components |
| 35 | +- **Ready-to-use pipelines** compatible with [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl) and the whole [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) ecosystem |
| 36 | +- **Evaluation tools** for comparing algorithm performance |
| 37 | + |
| 38 | +## Benchmark Categories |
| 39 | + |
| 40 | +The package organizes benchmarks into three main categories based on their problem structure: |
| 41 | + |
| 42 | +### Static Benchmarks (`AbstractBenchmark`) |
| 43 | +Single-stage optimization problems with no randomness involved: |
| 44 | +- [`ArgmaxBenchmark`](@ref): argmax toy problem |
| 45 | +- [`Argmax2DBenchmark`](@ref): 2D argmax toy problem |
| 46 | +- [`RankingBenchmark`](@ref): ranking problem |
| 47 | +- [`SubsetSelectionBenchmark`](@ref): select optimal subset of items |
| 48 | +- [`PortfolioOptimizationBenchmark`](@ref): portfolio optimization problem |
| 49 | +- [`FixedSizeShortestPathBenchmark`](@ref): find shortest path on grid graphs with fixed size |
| 50 | +- [`WarcraftBenchmark`](@ref): shortest path on image maps |
| 51 | + |
| 52 | +### Stochastic Benchmarks (`AbstractStochasticBenchmark`) |
| 53 | +Single-stage problems with random noise affecting the objective: |
| 54 | +- [`StochasticVehicleSchedulingBenchmark`](@ref): stochastic vehicle scheduling under delay uncertainty |
| 55 | + |
| 56 | +### Dynamic Benchmarks (`AbstractDynamicBenchmark`) |
| 57 | +Multi-stage sequential decision-making problems: |
| 58 | +- [`DynamicVehicleSchedulingBenchmark`](@ref): multi-stage vehicle scheduling under customer uncertainty |
| 59 | +- [`DynamicAssortmentBenchmark`](@ref): sequential product assortment selection |
| 60 | + |
| 61 | +## Getting Started |
| 62 | + |
| 63 | +In a few lines of code, you can create benchmark instances, generate datasets, initialize learning components, and evaluate performance, using the same syntax across all benchmarks: |
| 64 | + |
| 65 | +```julia |
| 66 | +using DecisionFocusedLearningBenchmarks |
| 67 | + |
| 68 | +# Create a benchmark instance for the argmax problem |
| 69 | +benchmark = ArgmaxBenchmark() |
| 70 | + |
| 71 | +# Generate training data |
| 72 | +dataset = generate_dataset(benchmark, 100) |
| 73 | + |
| 74 | +# Initialize policy components |
| 75 | +model = generate_statistical_model(benchmark) |
| 76 | +maximizer = generate_maximizer(benchmark) |
| 77 | + |
| 78 | +# Training algorithm you want to use |
| 79 | +# ... your training code here ... |
| 80 | + |
| 81 | +# Evaluate performance |
| 82 | +gap = compute_gap(benchmark, dataset, model, maximizer) |
| 83 | +``` |
| 84 | + |
| 85 | +## Related Packages |
| 86 | + |
| 87 | +This package is part of the [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) organization, and built to be compatible with other packages in the ecosystem: |
| 88 | +- **[InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl)**: differentiable optimization layers and losses for decision-focused learning |
| 89 | +- **[DecisionFocusedLearningAlgorithms.jl](https://github.com/JuliaDecisionFocusedLearning/DecisionFocusedLearningAlgorithms.jl)**: collection of generic black-box implementations of decision-focused learning algorithms |
0 commit comments