AI Glossary / Statistics and probability / Advanced
Stable model
Definition
A stable model is a formally defined interpretation of a logic program with default negation. For a ground normal logic program, a candidate set of true atoms is stable when it equals the least model of the program's reduct relative to that candidate. Stable models are also called answer sets in this setting and underpin answer set programming. Here, stable refers to a logical consistency condition, not to a machine-learning model's robustness, numerical behavior or accuracy over time.
What it means
Rules with default negation express conclusions that apply when something is not established. Such rules can create alternative self-consistent possibilities or no acceptable possibility at all. Stable-model semantics specifies which sets of conclusions are justified by the rules rather than allowing unsupported assumptions to make themselves true. A program can have zero, one or several stable models. Multiple models represent alternatives allowed by the encoding; they are not automatically equally likely outcomes or competing statistical estimates.
How it works
For a finite ground normal program and candidate set M, construct the Gelfond-Lifschitz reduct. Remove any rule containing a default-negated body atom that belongs to M. Remove the remaining default-negated body literals from the surviving rules. The resulting positive normal program has a least model, obtainable by repeatedly applying its rules from no derived atoms. M is stable exactly when that least model is M. This explanation concerns the normal-program setting; extensions such as disjunction and aggregates require their own defined semantics.
Three practical examples
Example 1: A scheduling system represents alternative assignments subject to explicit rules and constraints. Example 2: A configuration system reasons about compatible component choices and defaults. Example 3: An AI planning application searches for action sequences represented by answer sets. The usefulness depends on the encoding: a solver finds models of the supplied program, not missing real-world requirements. Checking whether a solution satisfies the intended operational constraints remains essential even when the formal computation is correct.
Think of it this way
Think of proposing a set of conclusions and then checking whether the rules still rebuild exactly that set after its default assumptions have been evaluated. A proposal fails if it relies on an unsupported conclusion or if the rules force something it omitted. This is more demanding than simply finding a collection of statements that does not immediately contradict a rule.
Worked example
Consider four ground rules: local if not remote; remote if not local; ready if local; ready if remote. For candidate M = {local, ready}, the first rule becomes the fact local, and the second is removed because local belongs to M. The remaining positive rules derive ready from local. Their least model is exactly {local, ready}, so M is stable. By symmetry, {remote, ready} is also stable. The empty candidate leaves both choice rules as facts in its reduct, producing all three atoms and therefore failing equality. The candidate containing all three atoms removes both choice rules; the remaining rules derive nothing from the empty starting set, so it also fails. Checking all eight subsets confirms exactly two stable models. Neither alternative has a probability unless an additional probabilistic framework is supplied.
Illustrative case study
In this fictional case study, Juniper Scheduling encodes two permitted ways to staff a support session. The solver returns alternative answer sets that satisfy the formal rules. A reviewer discovers that one organisational requirement was never encoded, adds it and checks the revised solution set. The team records whether a property holds in every answer set or only in some. Managers receive permitted alternatives under a documented rule system rather than an assertion that the solver has discovered the uniquely correct real-world plan.
Common misconceptions and mistakes
Common mistakes include confusing default negation with ordinary classical negation, assuming every program has exactly one stable model, and treating any satisfying interpretation as stable. Unsupported circular justification can be excluded by stable-model semantics even when a weaker notion accepts it. Another mistake is calling a stable model an optimal solution: optimization requires an additional objective. Results also depend on facts and constraints. Adding information can withdraw previous conclusions, reflecting the nonmonotonic nature of default reasoning.
Business use
Businesses may use answer set programming when feasible alternatives can be described through discrete rules and constraints. It can support auditable scheduling, configuration and planning, but the rules must accurately express the intended domain. Separate feasibility from preference and specify whether the task is to find one solution, enumerate alternatives or establish a property across all solutions. A timeout is different from proving that no stable model exists. Operational explanations should identify relevant rules without presenting formal validity as evidence that the input data are complete or correct.
People also ask
Does stable mean resistant to data drift?
No; this term concerns logic-program semantics.
Can two stable models exist?
Yes.
Does no stable model necessarily mean the business problem is impossible?
No; the encoding or supplied facts may be wrong or incomplete.
Is every stable model optimal?
No.
Does an atom appearing in one answer set hold in all alternatives?
Not necessarily; that distinction matters for interpreting solver results.
Check your understanding
How many stable models does the worked program have?
Answer: Two.
Why does the all-three-atoms candidate fail?
Answer: Its reduct has an empty least model, not the proposed set.
Is ready in both stable models?
Answer: Yes.
Is local in both?
Answer: No.
What would be needed to rank the two alternatives by preference?
Answer: An additional objective or preference specification.
Related terms
- Reduct
- Related terms include answer set programming
- default negation
- least model
- nonmonotonic reasoning
- grounding and constraint solving
Learn next
Learn next how positive rules generate a least model and how default negation changes the interpretation. Compare consequences that hold in some answer sets with those that hold in every answer set. Then examine constraints, optimization and grounding limits in a concrete solver while keeping the encoding separate from the real-world problem.
More in Statistics and probability
- Sphericity - Sphericity is a covariance condition used in the conventional univariate analysis of repeated measures.
- Spillover (experiment) - A spillover in an experiment occurs when a unit's outcome is affected by treatment assigned to another unit.
- Squared ranks test - The squared ranks test, often called the Conover squared ranks test, is a rank-based procedure for comparing dispersion across independent groups.
- Staged tree (mathematics) - A staged tree is a probabilistic event tree whose nonterminal situations are grouped into stages when they share the same conditional distribution over...
- Standard deviation - Standard deviation is a measure of spread obtained by taking the square root of variance.
- Standard error - The standard error is the standard deviation of an estimator's sampling distribution.
Sources
Sources: Vladimir Lifschitz, Twelve Definitions of a Stable Model, Section 5, https://www.cs.utexas.edu/~vl/papers/12defs.pdf, gives the reduct definition for traditional normal programs. University of Texas at Austin, Answer Set Programming research history, https://www.cs.utexas.edu/~vl/tag/tag_austin.html, provides background and applications. The originally listed journal source, https://doi.org/10.1145/3447508, was inaccessible during review. The local/remote program is original, with all eight candidate interpretations independently checked; the scheduling case is fictional.
Previous: Stability Next: Stack search