Skip to content

Action Conditioning kernel #29

Description

@superposition

Description

Inject actions into latent dynamics for embodied world models.

Operations

# FiLM-style conditioning: scale and shift latent by action embedding
conditioned = film_condition(latent, action_embed)  # latent * gamma + beta

# Additive action injection
conditioned = action_inject(latent, action_embed, mode='add')

# Concatenate and project
conditioned = action_concat_project(latent, action_embed, proj_weight)

Implementation

  • FiLM: learn gamma, beta from action → element-wise transform
  • Support for discrete and continuous actions
  • Fused projection + conditioning

Tests

  • FiLM produces correct scale/shift
  • Additive injection correct
  • Concat+project matches manual implementation
  • Gradient flows to both latent and action
  • Works with batched actions
  • Handles action sequences (B, T, action_dim)

Used In

Genie, Dreamer, IRIS, TD-MPC, action-conditioned world models

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions