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:
- 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
- Resampling only occurs among active (non-absorbed) particles when ESS drops below threshold
- 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
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 (
ResamplingMethodenum). 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, itsis_stoppedflag is reset toFalse(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:
Current State
Particle.is_stoppedexists but is used as a soft flag — stopped particles skip propagation but can be resampled and revived_effective_sample_size) but only used for entropic temperature annealing, not to gate resamplingProposed Changes
ResamplingMethod.INTRINSICor a separateresampling_triggerparameteris_stopped = True, the particle is permanently frozen