Skip to content

Add CVaR model checking for sparse MDP rewards - #983

Draft
pjtimm wants to merge 67 commits into
stormchecker:masterfrom
pjtimm:feature/cvar-mdp
Draft

Add CVaR model checking for sparse MDP rewards#983
pjtimm wants to merge 67 commits into
stormchecker:masterfrom
pjtimm:feature/cvar-mdp

Conversation

@pjtimm

@pjtimm pjtimm commented Aug 6, 2026

Copy link
Copy Markdown

Summary

This PR adds scalar CVaR model checking for reward-reachability queries on sparse MDPs. It allows users to analyze the tail of a reward or cost distribution.

The weighted-reachability backend uses an LP for terminal-reward models. SSP minimum-cost and maximum-reward queries use Pareto front value iteration.

Scope

Queries have the form

R{"reward"}min/max=? [ F "target" ]

together with --cvar <alpha>, where 0 < alpha < 1.

The current implementation supports sparse MDPs with one initial state. Each backend checks its own assumptions on rewards, target states, and SSP structure and rejects unsupported models.

Testing

Created tests in CvarQueryTest pass. They cover query parsing and validation, the weighted-reachability and SSP backends, cost and reward interpretations, preprocessing, exact rational inputs, and rejection of unsupported models.

pjtimm added 30 commits April 14, 2026 11:18
pjtimm added 29 commits May 7, 2026 11:06
Bucket terminal rewards, cache transposes and prefix sets, prune impossible thresholds via reachability checks, and extract schedulers only for the winning LP.
Cache choice-cost offsets and reachable state lists, reserve action-front storage, use binary-search frontier lookup, and avoid vector erase during hull pruning.
Remove a redundant target-state check and add a fused scaled Minkowski operation so SSP action-front computation avoids creating temporary scaled frontiers.
Merge sorted action frontiers, canonicalize already-sorted point sets without resorting, and compact duplicate, dominated, and convex-redundant points in place.
Use convex-chain Minkowski sums, reuse frontier-layer scratch storage, and switch sorted Pareto-front union merging to a heap-based merge.
Move SSP Pareto layer application into a dedicated operator with backend-style action reduction, keeping the CVaR helper focused on frontier-window initialization, cost-bound iteration, and candidate extraction.
# Conflicts:
#	src/storm/environment/SubEnvironment.cpp
#	src/storm/environment/modelchecker/AllModelCheckerEnvironments.h
#	src/storm/environment/modelchecker/ModelCheckerEnvironment.cpp
#	src/storm/environment/modelchecker/ModelCheckerEnvironment.h
@tquatmann
tquatmann marked this pull request as draft August 18, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant