S3E: Semantic Symbolic State Estimation¶
S3E estimates the truth values of grounded PDDL predicates from images using
vision-language models (VLMs). Given a planning domain, a problem, and one or
more images of a scene, it returns a probability (optionally calibrated) for every
grounded predicate (e.g. on(a,b)) and a symbolic state that can be handed
back to a planner.
Statement of need¶
Research that grounds symbolic planners in perception (task planning, task-and-motion planning, embodied AI, neuro-symbolic reasoning) keeps re-implementing the same pipeline: enumerate grounded predicates, phrase a question for each, prompt a particular model API with images, and turn the output into truth values. Parsing generated text throws away the model’s uncertainty, and hard-wiring one provider makes cross-model comparisons and calibration studies laborious. S3E packages this pipeline as a backend-agnostic library with probabilities as a first-class output: answer-token probability scoring, an optional explicit “unknown” answer, multi-view averaging, and offline calibration, over HuggingFace, vLLM, and OpenAI models. Its query engine also works without PDDL, for anyone who needs probabilistic yes/no or multiple-choice answers from a VLM.
Design¶
S3E is built as independently usable layers:
Backends (s3e.backends): a uniform
VLMBackendinterface over HuggingFace, OpenAI, and vLLM models.Engine (s3e.engine):
QueryEngineturns images + free-form queries + an answer space into predictions. No PDDL involved.Calibration (s3e.calibration): fit a Platt-scaling calibrator on labeled examples, offline and VLM-free after data collection.
State-estimation facade (s3e.estimator):
SemanticStateEstimatortakes grounded predicates (an explicit list, or grounded from a PDDL domain/problem byfrom_pddl), translates them into queries, and drives aQueryEngine.
The developer guide explains how the layers fit together and how to extend each one.
Using S3E
- Getting started
- Tutorial
- Package Overview
- 1. Start from a planning problem
- 2. Create an image observation
- 3. The PDDL-free core: a
QueryEngineand a deterministic backend - 4. Answer spaces: yes/no is just the default
- 5. Build the estimator: predicates in, state out
- 6. Calibrating probabilities with held-out examples
- 7. Choosing a translator strategy
- 8. Multiple scenes, averaging, and batching
- 9. Swapping to a new planning problem
- 10. Real HuggingFace integration with a small instruct model
- 11. Thinking models: reasoning before answering
- 12. Scaling up with vLLM: many GPUs, one estimator
- 13. Auto-generating translators and caching them
- 14. Handing the estimated state back into planning code
- 15. Other backend options
- Takeaways
- User guide
- Examples
- API reference
Links¶
Source code and issue tracker: https://github.com/CLAIR-LAB-TECHNION/s3e
Package: https://pypi.org/project/s3e/
Run the tutorial notebook in Google Colab: https://colab.research.google.com/github/CLAIR-LAB-TECHNION/s3e/blob/main/docs/s3e_walkthrough.ipynb