Pages and contents
Pages
- Non-Generative World Model Research
- Literature Review
- Literature Notes
- Attention
- Memory
- Planning
- Reviews
- Reinforcement Learning
- Decision Transformer
- Efficient Zero V2
- Compositional Transduction
- Schema Networks
- Universal Value Function Approximators
- World Model Papers
- Biological
- World Models
- Representation
- Training
- Template
- Important Concepts
- Models
- Resources
Schema Networks
https://arxiv.org/pdf/1706.04317 2017
The Problem
Deep reinforcement learning can learn strong policies for individual environments, but those policies often fail when the environment changes even if the underlying physical dynamics remain the same. For example, a policy trained on ordinary Breakout may fail if the paddle is moved or a wall is inserted, despite the facts that balls still bounce, paddles still control balls, and ball-brick collisions still produce rewards.
The authors argue that robust transfer requires learning the causal structure of the environment, rather than directly learning a policy tied to a particular state distribution. They introduce Schema Networks, an object-oriented generative model that learns reusable local cause-effect rules. Because these rules describe dynamics rather than a particular task layout, the same learned model can be used to plan in new environments without additional training.
The Method
Entity-Based State
Rather than representing the environment as one unstructured state vector, the world is represented as a collection of entities. Each entity has a common set of attributes.
For entity , its state at time is
where is a binary variable representing whether attribute is active for entity .
The complete state is
Actions and rewards are also represented using binary variables.
The important assumption is that dynamics can be described using local interactions between entities and their attributes, rather than a monolithic transition function over the entire state.
Schemas
A schema is a local cause-effect rule. It predicts that some attribute will become active at the next timestep when a set of preconditions is satisfied.
A grounded schema can be written as
where the terms are entity-attribute preconditions and is an optional action condition.
For example, a schema might approximately represent
or
A schema therefore resembles a learned logical implication, although the complete model is represented as a probabilistic graphical model.
The paper defines probabilistic versions of Boolean AND and OR:
The OR operation is particularly important because multiple different schemas may independently cause the same effect.
For example,
and
can coexist, giving
This explicit representation of multiple causes is one of the main differences between Schema Networks and ordinary learned transition models.
Grounded and Ungrounded Schemas
The model distinguishes between ungrounded schemas and grounded schemas.
An ungrounded schema is a reusable template:
The variables describe entity roles rather than particular entities.
The same schema can then be instantiated for different entities, positions, and times to produce grounded schemas.
For example, the abstract rule
can be instantiated for many different objects.
This is the main source of compositional transfer: the learned dynamics are attached to reusable relational templates rather than particular locations or states.
Combining Causes into Dynamics
An entity attribute at becomes active if any schema predicts it.
If schemas predict attribute , then
where is a self-transition representing persistence when no schema causes the attribute to change.
The complete transition distribution factorizes over entity attributes:
This gives the Schema Network a sparse, structured world model made from independently reusable causal mechanisms.
Learning Schemas
Learning becomes a supervised structure-learning problem.
For a particular target attribute, the authors construct a binary input matrix
containing candidate attributes of an entity and its nearby entities. The target is
representing whether the desired future attribute became active.
The model seeks a set of schemas such that
where each column of
represents one schema. Nonzero entries specify which preconditions belong to that schema.
The learning objective balances predictive accuracy against schema complexity:
The first term penalizes prediction error. The second encourages sparse schemas with few preconditions.
Finding the exact optimum is NP-hard, so the authors use a greedy procedure based on linear-programming relaxations. Schemas are added one at a time, with each new schema required to have perfect precision while increasing recall. The result is a small collection of sparse rules explaining the observed transitions.
Planning as Inference
Once the dynamics have been learned, the agent does not learn a separate policy. Instead, action selection is performed by inference through the causal model.
The Schema Network is unrolled across future timesteps:
with schemas connecting possible causes to their future effects.
Planning asks for an assignment of future action variables that makes a desired reward possible. This becomes approximately a MAP inference problem in the factor graph.
Conceptually,
The authors approximately solve this using max-product belief propagation.
Planning proceeds first forward to determine which future rewards appear feasible, then backward from the selected reward through the schemas that could have caused it.
Thus the system can reason approximately as
The ability to move backward through explicit causes is called regression planning.
Multiple causation is particularly important here. If several schemas can cause an effect, reasoning backward must determine which cause is consistent with the rest of the desired trajectory. The graphical-model representation also supports explaining away, where evidence for one cause reduces the need to invoke another.
The overall architecture can therefore be summarized as
rather than learning
directly.
The strongest results depend on substantial structure being supplied to the model. Schema Networks do not learn directly from raw pixels: a vision system provides tracked entities and attributes, and spatial position receives special treatment. The experiments are also much simpler than realistic environments: states, actions, attributes, and rewards are discretized into binary variables, the dynamics are deterministic, and entity states are fully observed. The schema-learning algorithm assumes that contradictory examples have been removed, which becomes problematic in genuinely stochastic environments. Structure learning is also combinatorial and the exact objective is NP-hard, requiring a greedy approximation. The paper therefore demonstrates the usefulness of explicit causal structure more convincingly than it demonstrates a scalable general solution for learning that structure from perception.
Schema Networks are closely related to Object-Oriented MDPs and Relational MDPs, which similarly attempt to factor environments into reusable objects and relations. They are also related to Interaction Networks and Neural Physics Engines, which learn object-centered relational dynamics. The authors argue that Schema Networks differ because they explicitly separate alternative causes of an effect and form a generative graphical model, permitting backward inference and regression planning. Compared with model-free methods such as A3C and transfer methods such as Progressive Networks, Schema Networks transfer the learned dynamics rather than transferring a policy or neural features. This is what allows zero-shot transfer when the layout changes but the underlying causal mechanisms remain the same.