ContactFlowFilter

Mixture of Flow Matching and Particle Filter for Proprioception-Based Online Contact Estimation (IEEE T-RO 2026)

Mixture of Flow Matching and Particle Filter for Proprioception-Based Online Contact Estimation

Seo Wook Han  and  Min Jun Kim
Intelligent Robotic Systems Laboratory, School of Electrical Engineering, Korea Advanced Institute of Science and Technology (KAIST)
IEEE Transactions on Robotics (T-RO), 2026

Abstract

In this article, we propose ContactFlowFilter, a novel approach for contact estimation that determines the number of active contacts, their locations, and the associated force vectors. We consider a robot manipulator equipped with joint torque sensors and a base force/torque sensor; such a proprioceptive-only setup presents a challenging inverse problem characterized by (i) multi-modality from non-unique solutions, (ii) temporal dependencies in state evolution, and (iii) discrete contact events involving contact addition/removal. Existing approaches, such as particle filters (PFs) and learning-based methods, often struggle to address these challenges simultaneously. To overcome this, ContactFlowFilter integrates a generative model into the PF framework. The recursive structure of the PF captures temporal dependencies, while the flow matching model serves as an auxiliary proposal distribution to track multi-modal beliefs and detect contact events. Extensive validation in both simulation and real-world experiments confirms the effectiveness of the proposed method. In real-world settings, ContactFlowFilter achieves the lowest dissimilarity from the target distribution, with errors of only 0.36 cm and 0.88 cm for single- and dual-contact scenarios, respectively, while operating at 0.69 ms and 2.69 ms.

ContactFlowFilter: real-time inference demo on a 7-DOF Franka Emika Panda robot arm equipped with JTSs and a base-mounted F/T sensor. The estimation results for the first and second contacts are represented in magenta and blue, respectively.
0.36 cm
Real-world error, single-contact
0.88 cm
Real-world error, dual-contact
0.69 / 2.69 ms
Execution time (single / dual-contact)
0.75 %
Fault rate of particle set management (baseline 16.5 %)

Challenges

The objective is to estimate the contact state, which includes the contact locations on distinct links ($\mathbf{r}_i \in \mathbb{R}^3$), the corresponding 3D force vectors ($\mathbf{F}_i \in \mathbb{R}^3$), and the number of contacts (up to two), using proprioceptive sensors. This is an inverse problem characterized by:

  • Multi-modality (singularity): while the forward mapping (from contact to sensor reading) is deterministic, the inverse mapping is ambiguous; distinct contact states may correspond to identical sensor measurements, so the probability distribution of possible solutions becomes multi-modal.
  • Temporal dependency: leveraging past estimates provides a prior context for inferring the current state, for both discrete evolution (e.g., a new contact occurs) and continuous evolution (e.g., a contact slides).
  • Contact event detection: determining the number of active contacts requires identifying discrete transitions, specifically the addition or removal of contacts.
Key challenges in the contact estimation problem
Examples of key challenges in the contact estimation problem. (a) Multi-modality: Two distinct contact forces ($F_{1a}$ and $F_{1b}$) result in identical observations. (b) Temporal dependency: Current contact states depend on history, involving discrete changes in the number of contacts (e.g., when a new contact $F_2$ occurs, $t-2 \rightarrow t-1$) and continuous updates in locations or forces (e.g., when an existing contact $F_1$ slides, $t-1 \rightarrow t$). (c) Contact event detection: Determining the number of active contacts relies on identifying the exact timing of a transition and whether a contact is added or removed.

Limitations of existing approaches

While PF-based approaches are well-suited for addressing temporal dependency through recursive belief updates, they often fail to handle multi-modality due to particle starvation. In contrast, learning-based approaches excel at estimating multi-modal distributions; however, these feed-forward approaches are typically non-recursive and trained on temporally independent samples, thus lacking a native mechanism for leveraging temporal dependency. As for contact event detection, PFs rely on hard-to-tune thresholds to identify discrete transitions.

Particle starvation
Particle starvation. (a) The results of the QP are visualized over the entire surface for a single contact ($F_1$) on link 2, where high-belief (low QP error) regions are observed on both links 1 and 2. (b) The conventional PF algorithm populates the particle set on only a single link in each execution (Trial 1 and Trial 2).
Particle drift
Particle drift. (a) The first particle set converges to the first contact point. (b) After the second contact ($F_2$) occurs, the delayed initialization of the second particle set causes the existing set to drift away from the first contact point.
Particle filter Diffusion model Ours
Contact Number Support ≥2 2 2
Multi-Modal Distribution × ○ ○
Temporal Reasoning ○ △ ○
Contact Force Estimation ○ × ○
Excerpt from Table I of the paper (comparison of different approaches based on key capabilities).

Key idea: mixture of flow matching and particle filter

Overview of the ContactFlowFilter framework
The proposed method samples particles from two complementary proposal distributions. Top: The PF's temporal prediction involves sampling from the previous time step, random position updates, and importance weighting. Bottom: The flow matching samples are transported along a probability path ($p^{[0]} \rightarrow p^{[1]}$) to represent the contact points. Right: These proposals are merged to integrate temporal context and multi-modality, forming the combined distribution for the subsequent recursive prediction.

To formally implement the mixture of two proposal distributions, we adopt the dual-sampling concept. The output of the flow matching model serves as a sample from the dual-proposal distribution, $\hat{\mathbf{X}}_t \sim p_\theta(\mathbf{X}_t \mid \mathbf{O}_t) \approx \bar{q}(\mathbf{r}_t)$. The weight of a dual particle is computed by evaluating the Gaussian probability density of the motion model:

$$ w^{(m)} \propto p\big(\mathbf{x}^{(m)}_{t,i} \mid \mathbf{x}^{(m)}_{t-1,i}\big), \qquad \mathbf{x}^{(m)}_{t-1,i} \sim \mathcal{X}_{t-1,i} $$

Intuitively, dual particles that are more consistent with the previous step's particle set receive higher weights. By preserving the PF's recursive structure, the proposed method captures temporal dependency, while the dual-sampling step enables the direct generation of samples in high-belief regions, even where the particles fail to populate.

Technical components

1. Data representation and transformer-based architecture

Observation with virtual wrench
(a) The observation for flow matching is defined as a sequence where each link's pose $\mathbf{T}_l$ is augmented with the virtual wrench $\mathcal{F}_{v,l}$. (b) $\mathcal{F}_{v,l}$ is obtained by projecting the spatially distributed external base wrench and the first $l$ elements of the external joint torque onto the corresponding frame $\{L_l\}$ via the adjoint transformation. A transformer encoder processes this sequence to extract cross-modal correlations.
Training sample for flow matching
The training sample $\mathbf{X}^{[1]} \in \mathbb{R}^{N_s \times 6}$ is constructed based on the number of contact points $n_c$: each row is $(\mathbf{r}_1, \mathbf{r}_1)$ for $n_c = 1$ and $(\mathbf{r}_1, \mathbf{r}_2)$ for $n_c = 2$. This paired-point representation captures $n_c$, thereby eliminating the need for a separate classifier.

2. Flow matching with few-step inference

Flow Matching vs DDIM
Comparison of generative processes implemented with our architecture, using (a) Flow Matching and (b) DDIM. (•-1): Sample trajectories over ODE time steps (128-step integration). (•-2): Accelerated generation paths with 2-step integration. (•-3): Resulting samples via the 2-step integration. The sample trajectories generated by Flow Matching are markedly more linear than the curved paths produced by DDIM, which preserves high consistency between the results of 2-step and 128-step ODE integration.

2-step Flow Matching achieves M-RMSE values of 0.17 cm (single-contact) and 0.72 cm (dual-contact), competitively matching or even surpassing methods utilizing 16 ODE steps, while being eight times faster (2.57 ms). The flow matching inference is executed asynchronously on a dedicated thread, separate from the main algorithm.

3. Motion model with pre-computed geodesic distances

Proposed motion model
The proposed motion model consists of two steps: (a) For the given particle, the geodesic distances to all other faces are retrieved from a pre-computed lookup table. (b) Weights are assigned based on the geodesic distances, and the particle for the current time step is sampled from the resulting distribution. This approximates Gaussian sampling directly on the robot surface, requiring approximately 0.6 µs to update a single particle.

4. Flow-guided particle set management

For robust contact event detection, the conventional QP-based criterion is augmented by integrating generative estimates from the dual-proposal distribution. Increasing condition: satisfied only when the QP condition is met and the dual particles are widely spread, i.e., when their standard deviation within a set exceeds that of the motion model. Decreasing condition: a particle set is a candidate for removal if it is not assigned any dual particles during sample allocation, and it is removed if the QP-based condition supports this removal.

Results

Contact event detection (Experiment B)

Experiment B snapshots
Experiment B: Sequential snapshots comparing the baseline and proposed methods. (a) The baseline method suffers from erroneous set initialization due to local minima caused by particle starvation. (b) The proposed method effectively performs contact event detection without such false positives.
Method Suc. Rate (%) ↑ Adj. Delay (ms) ↓ Fau. Rate (%) ↓
Phase 1 Phase 2 Phase 1 Phase 2 Overall
Proposed 99.60 99.65 3.21 26.74 0.75
Baseline 97.30 91.55 2.89 51.46 16.50
Table III of the paper. 2000 trials; in each 3-second trial, a second contact force is added at t = 1 s (Phase 1) and removed at t = 2 s (Phase 2). The execution time of the baseline is set to be identical to that of the proposed method.

Real-world experiment (Experiment D)

For dual-sampling, the flow matching model trained in simulation was directly transferred to the physical robot. A dedicated evaluation dataset was collected using a specialized tool to acquire ground-truth contact locations and forces (a 6-axis F/T sensor for force tracking and OptiTrack markers for pose tracking). A total of 200 trials were conducted across 20 distinct robot configurations.

Comparative analysis: multi-modality. Only the proposed method represents multi-modality (experiments with real-world evaluation data).
Comparative analysis: local minima. CPF fails to estimate the 2nd contact (experiments with real-world evaluation data).
Method Single-Contact ($n_c = 1$) Dual-Contact ($n_c = 2$)
M-RMSE (cm) ↓ PLS ↓ EMD ↓ M-RMSE (cm) ↓ PLS ↓ EMD ↓
ContactFlowFilter (Ours) 0.36 8.85 1.14 0.88 12.52 3.18
CPF 1.36 12.36 2.62 5.49 34.89 7.93
MCP-EP 0.77 30.10 3.14 2.44 19.96 4.75
Dual-Particle only 0.51 16.76 2.15 1.04 17.11 3.42
Excerpt from Table V of the paper (Experiment D, mean values). The Particle log-Likelihood Score (PLS) and the Earth Mover's Distance (EMD) quantify the dissimilarity between the particle distribution and the target distribution; EMD measures the transport cost, so particles must populate all modes to minimize this metric.

Additional real-world scenarios

Dynamic contact: discrete evolution of contact state. Flow-guided particle set management for robust contact event detection.
Sliding contact: continuous evolution of contact state. The recursive structure of the proposed method effectively handles sliding contact.
Contact estimation under robot motion. The proposed method operates under robot motion (single-contact and dual-contact scenarios).

Full video

BibTeX

@article{han2026mixture,
  author={Han, Seo Wook and Kim, Min Jun},
  journal={IEEE Transactions on Robotics},
  title={Mixture of Flow Matching and Particle Filter for Proprioception-Based Online Contact Estimation},
  year={2026},
  pages={1--20},
  doi={10.1109/TRO.2026.3723975}
}