Skip to content

Add intrinsic resampling with absorbing states for particle filtering #208

@georgosgeorgos

Description

@georgosgeorgos

Summary

Implement intrinsic resampling with absorbing states for the particle filtering algorithm in its_hub/algorithms/particle_gibbs.py.

Background

The current particle filter supports systematic and multinomial resampling (ResamplingMethod enum). However, it lacks absorbing states — a mechanism where particles that reach a terminal/stopped condition are permanently frozen and excluded from resampling. Currently, when a reference particle is resampled, its is_stopped flag is reset to False (line ~455), which allows "dead" trajectories to be revived.

Intrinsic resampling conditions resampling on the particle system's own state (e.g., ESS dropping below a threshold) rather than resampling at every step. Combined with absorbing states, this means:

  1. Particles that reach a stop condition (EOS, max steps, valid answer) enter an absorbing state — they keep their weight but are never resampled or propagated further
  2. Resampling only occurs among active (non-absorbed) particles when ESS drops below threshold
  3. The final population is a mix of absorbed particles (finished early with high confidence) and active particles (still being refined)

Current State

  • Particle.is_stopped exists but is used as a soft flag — stopped particles skip propagation but can be resampled and revived
  • ESS is computed (_effective_sample_size) but only used for entropic temperature annealing, not to gate resampling
  • No distinction between "stopped because done" and "stopped because resampled away"

Proposed Changes

  • Add ResamplingMethod.INTRINSIC or a separate resampling_trigger parameter
  • Enforce absorbing state semantics: once is_stopped = True, the particle is permanently frozen
  • Partition particles into absorbed/active pools before resampling
  • Only resample among active particles; absorbed particles pass through unchanged
  • Track absorbed particle count in traces for diagnostics

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions