---
title: Contextual Farthest-Point Anchoring (CFPA)
url: https://www.emergentmind.com/topics/contextual-farthest-point-anchoring-cfpa
type: topic
---

# Contextual Farthest-Point Anchoring (CFPA)

Contextual Farthest-Point Anchoring (CFPA) is a farthest-point-based anchoring paradigm in which anchor selection is conditioned by an explicit notion of context rather than by separation alone. In the literature represented here, the term is used most explicitly for the skeleton-preservation module of GeoTrace, where it retains exact visual tokens that are salient, context-consistent across a local temporal chunk, and high-coverage in feature space [2607.09080]. Related uses map the same anchoring logic to exact farthest-neighbor retrieval under geodesic \(L_1\) distance in the presence of rectangular obstacles [2203.03198], to anchor-based approximation of graph geodesics via farthest point sampling (FPS) [1311.4665], and to geometry-aware anchor subset selection and certification for range-based localization under unknown-but-bounded errors [2603.14263]. Across these settings, the common structure is the use of anchors chosen under a max–min or spread-seeking principle, with the surrounding notion of context supplied by temporal coherence, obstacle-aware reachability, graph geodesics, or localization geometry.

## 1. Conceptual scope and common structure

The term does not denote one universal algorithm in the supplied literature; rather, it denotes a family of anchor-selection procedures in which a farthest-point principle is modulated by application-specific constraints. In GeoTrace, the relevant context is chunk-local video semantics, encoded through saliency and chunk-level context agreement. In obstacle-aware geometry, context is induced by free space, rectangular obstacles, and directional reachability. In graph-geodesic approximation, anchors are FPS sources through which approximate distances are routed. In range-based localization, context is a region \(\mathcal R\) or coarse estimate \(x_c\), together with geometry-only scores derived from the centered scatter matrix \(S(A)\) [2607.09080].

A recurrent misconception is to identify CFPA with classical farthest-point sampling. That identification is incomplete. Classical FPS iteratively selects the point farthest from the already selected set in the underlying metric. By contrast, the GeoTrace formulation multiplies feature-space separation by saliency and chunk-context consistency on the candidate side; the localization formulation augments farthest dispersion with E- and D-type geometry criteria; and the obstacle formulation uses exact geodesic \(L_1\) farthest-neighbor structure rather than a greedy sampling routine. This suggests that “contextual” in CFPA is not rhetorical terminology but the part of the method that changes the admissible anchor set, the objective, or the certification mechanism.

The notion of an anchor also changes with the domain. In Video LLM compression, anchors are retained skeleton tokens copied verbatim from encoder outputs. In graph and geometric routing, anchors are sources or sites used to answer farthest-neighbor or approximate-distance queries. In localization, anchors are physical ranging nodes whose geometry controls directional width, diameter, and volume surrogates of the certified feasible set. The farthest-point principle is therefore stable across domains, but what is preserved, queried, or certified differs substantially.

## 2. CFPA as skeleton preservation in GeoTrace

In GeoTrace, CFPA is the skeleton-preservation module of a training-free spatiotemporal token compression framework for Video LLMs. A video chunk consists of \(L\) frames, and the visual encoder outputs tokens \(\mathbf{X}=\{\mathbf{x}_{t,i}\in\mathbb{R}^{d}\}_{t=1,i=1}^{T,N}\). Chunking is local rather than global: adjacent-frame similarity is computed from frame descriptors
\[
\bar{\mathbf{x}}_{t}=\frac{1}{N}\sum_{i=1}^{N}\mathbf{x}_{t,i},\qquad
s_t=\cos(\bar{\mathbf{x}}_{t},\bar{\mathbf{x}}_{t+1}),
\]
and cuts at low \(s_t\) form chunks \(\{\mathcal C_m\}\). Within each frame \(t\) in a chunk, CFPA selects a set \(I_s^t\subseteq\{1,\ldots,N\}\) with \(|I_s^t|=K_s\), and the resulting skeleton features \(\mathcal S^t\) are exact copies of encoder outputs rather than fused features [2607.09080].

The module addresses two failure modes identified for prior compression methods. First, saliency-only selection can collapse the retained budget around a few entities and fail to capture a global frame skeleton. Second, heuristic token merging can mix disparate residual tokens and drift off the original feature manifold, weakening discriminability. CFPA responds by preserving exact anchor tokens that jointly cover the chunk-level visual structure and remain consistent with chunk context. The anchors are therefore required to be salient, context-consistent, and high-coverage in feature space.

Its scoring ingredients are explicit. If [CLS] attention is available, CFPA uses it directly; otherwise, token saliency is derived from self-attention:
\[
\mathbf{H}_{t}=\operatorname{Softmax}\left(\frac{\mathbf{Q}_{t}\mathbf{K}_{t}^{\top}}{\sqrt{d_h}}\right)\in\mathbb{R}^{N\times N},
\qquad
A_{t,j}=\frac{1}{N}\sum_{i=1}^{N}H_{t,ij}.
\]
Chunk-level context agreement is
\[
R_{t,j}=\frac{1}{|\mathcal C|}\sum_{u\in\mathcal C}\langle \mathbf{x}_{t,j},\bar{\mathbf{x}}_{u}\rangle,
\]
and Appendix C.2 writes the same quantity as
\[
\rho_{t,j}=\frac{1}{L}\sum_{u=1}^{L}\langle \mathbf{x}_{t,j},\bar{\mathbf{x}}_{u}\rangle.
\]
Within a frame, cosine separation is
\[
D^t_{ij}=1-\cos(\mathbf{x}_{t,i},\mathbf{x}_{t,j}),
\]
and the contextual candidate weighting is
\[
\Psi^t_{ij}=\bigl(1-\cos(\mathbf{x}_{t,i},\mathbf{x}_{t,j})\bigr)\cdot A_{t,j}\cdot R_{t,j},
\]
equivalently,
\[
\psi_t(i\rightarrow j)=D^t_{ij}\cdot a_{t,j}\cdot \rho_{t,j}.
\]

The margin used for anchor selection is a context-aware farthest-point bottleneck:
\[
m_t(v\mid S)=\min_{u\in S}\Psi^t_{uv},
\]
or, in Appendix C.2 notation,
\[
m_t(v\mid S)=\min_{u\in S}\psi_t(u\rightarrow v).
\]
CFPA’s beam search approximates a context-aware max–min \(k\)-center variant:
\[
I_s^t \approx \arg\max_{S\subseteq\{1,\ldots,N\},\,|S|=K_s}
\min_{v\in S}\min_{u\in S\setminus\{v\}}\psi_t(u\rightarrow v).
\]
This differs from classical FPS in two ways stated directly in the paper’s exposition: the weighting is on the candidate side, not on distance alone, and the selection is beam-style rather than purely greedy. The practical significance is that CFPA is designed to suppress isolated-frame local peaks while still favoring broad skeleton coverage.

## 3. Algorithmic pipeline, complexity, and empirical behavior

CFPA operates inside GeoTrace’s chunk-local pipeline. The retained-token budget per frame is split as
\[
K=\lceil RN\rceil,\qquad K_s=\lceil \alpha K\rceil,\qquad K_r=K-K_s.
\]
For each frame in the chunk, the algorithm computes frame descriptors, pairwise separations \(D^t\), chunk-context agreement \(\rho_{t,j}\), and weighted separations \(\psi_t(i\rightarrow j)\). It initializes beam candidates using the robust “second-min” score \(h_j\leftarrow \operatorname{2ndmin}_{i}\psi_t(i\rightarrow j)\), selects the top-\(B\) seeds, and then iteratively expands beams until \(|I_s^t|=K_s\). The paper states the dominant CFPA cost over a chunk with \(L\) frames, \(N\) tokens per frame, feature dimension \(d\), beam size \(B\), and skeleton budget \(K_s\) as
\[
O(LN^2d + LBK_sN),
\]
with \(O(LN^2)\) float memory for per-frame pairwise separations and candidate margins, and \(O(LN)\) for saliency and context arrays [2607.09080].

The preserved anchors are complemented by Trajectory-Constrained Residual Condensation (TCRC). After CFPA outputs skeleton tokens and indices, the residual mask removes skeleton indices, residual trajectories are built by Hungarian matching between adjacent frames,
\[
\mathcal{M}_{t+1}
=
\arg\max_{\mathcal M\in\Pi}
\sum_{(i,j)\in\mathcal M}
\cos(\mathbf{x}_{t+1,i},\mathbf{x}_{t,j}),
\]
trajectory features are pooled as
\[
\tilde{\mathbf y}_{\ell}=
\frac{1}{|\mathcal T_{\ell}|}
\sum_{(t,i)\in\mathcal T_{\ell}}
\mathbf{x}_{t,i},
\]
and spatial condensation is performed with entropy-regularized transport. The output sequence is then assembled by global indices \(g(t,i)=(t-1)N+i\), so that skeleton and event tokens appear in original order before LLM prefill.

The reported design defaults are \(B=3\), \(\alpha=0.9\), and chunk minimum count \(M_{\min}=8\). Retention ratios used in experiments are \(R\in\{10\%,15\%,20\%,25\%\}\). The ablation study at \(R=10\%\) shows that the full combination of saliency, context-consistency, and coverage outperforms each partial variant, which directly supports the claim that the three factors are complementary rather than interchangeable.

| Variant at \(R=10\%\) | Avg. Score | Rel. Acc. |
|---|---:|---:|
| Saliency-only (Sal.) | 56.2 | 96.2% |
| Context-only (Cons.) | 55.1 | 94.3% |
| Coverage-only (Cov.) | 56.2 | 96.2% |
| w/o Cons. | 56.9 | 97.4% |
| w/o Sal. | 57.2 | 97.9% |
| Full CFPA | 57.9 | 99.1% |

On LLaVA-OneVision, GeoTrace at \(R=10\%\) retains 99.1% relative accuracy with a \(12.99\times\) TFLOPs reduction, from 113.43 to 8.73 TFLOPs, and Avg. Score 57.9 versus vanilla 58.4. The efficiency table also reports TTFT improving from 2007.7ms to 594.4ms. The framework is reported to work across LLaVA-OneVision, LLaVA-Video, Qwen2.5-VL, and Qwen3-VL, including dynamic-resolution processors. A common misconception is that CFPA itself performs token fusion; the paper is explicit that CFPA preserves exact anchors and defers residual compression to TCRC.

## 4. Obstacle-aware geodesic CFPA under \(L_1\) distance

An implementation-oriented use of CFPA is given for obstacle-aware farthest-anchor retrieval under geodesic \(L_1\) distance, based on the results of Kim, Seo, Ahn, and Ahn on farthest-point Voronoi diagrams in the presence of rectangular obstacles. Let \(\mathcal O\) be a set of axis-aligned rectangular obstacles and define the free space
\[
\mathcal F=\mathbb R^2\setminus \bigcup_{O\in\mathcal O} O.
\]
For points \(p,q\in\mathbb R^2\), the geodesic \(L_1\) distance is the length of a shortest obstacle-avoiding path in \(\mathcal F\) under the Manhattan metric. For a site set \(S=\{s_1,\ldots,s_m\}\subset \mathcal F\), the geodesic \(L_1\) farthest-point Voronoi diagram partitions free space into cells
\[
\mathrm{cell}(s_i)=
\left\{
x\in\mathcal F\ \middle|\ 
d^{\mathrm{geo}}_{L_1}(x,s_i)\ge d^{\mathrm{geo}}_{L_1}(x,s_j)\ \text{for all }j\neq i
\right\},
\]
and the farthest-neighbor query returns
\[
\operatorname*{arg\,max}_{s\in S} d^{\mathrm{geo}}_{L_1}(x,s).
\]
Cells may be disconnected because obstacles split reachable regions [2203.03198].

The construction described in the paper is exact rather than heuristic. Obstacles are \(n\) pairwise-disjoint open rectangles, sites lie in free space, and a general position assumption excludes points equidistant to four or more distinct sites. The explicit diagram can be constructed in
\[
O(nm+n\log n+m\log m)
\]
time using
\[
O(nm)
\]
space, and a farthest-neighbor query data structure with the same preprocessing complexity answers queries in
\[
O(\log(n+m))
\]
time. The details emphasize that these bounds are optimal for explicit construction because the diagram has worst-case combinatorial complexity \(\Theta(nm)\), obstacle-related distance computation requires \(\Omega(n\log n)\), and plane Voronoi construction with \(m\) sites requires \(\Omega(m\log m)\).

The structural mechanism is directional. For each site there exist eight obstacle-aware rectilinear \(xy\)-monotone traces \(\pi_\delta(s)\) for
\[
\delta\in\{ru,ur,ul,lu,ld,dl,dr,rd\},
\]
and these partition free space into eight regions around the site. This supports four directional farthest-point maps
\[
M_{y+},\ M_{y-},\ M_{x+},\ M_{x-},
\]
each encoding farthest sites reachable by monotone paths in the corresponding direction. Every edge of each \(M_\delta\) is axis-aligned. Along any horizontal free-space segment, the order of farthest sites is the reverse of the sites’ \(x\)-order when farthest sites change, implying that any horizontal segment intersects \(O(m)\) cells.

The query structure uses these maps directly. For a query point \(x\), a vertical ray is shot opposite to the sweep direction in each \(M_\delta\). If a segment is hit, binary search over the stored boundary points on that segment identifies the farthest site in that directional map, and the maximum across the four directional values yields the farthest anchor set; ties are returned as multiple anchors. If only online queries are needed, the four maps plus per-map vertical ray shooters suffice; if full offline spatial analysis is needed, the method continues with vertical decomposition, x-monotone bisector traces between maps, zone partitioning, and gluing to produce the full geodesic \(L_1\) farthest-point Voronoi diagram.

## 5. Graph-geodesic anchoring and the FPS connection

A graph-theoretic use of CFPA appears as an anchor-selection and distance-approximation scheme built on top of the analysis of FPS for approximating geodesics in a weighted graph or triangle mesh. Let \(G=(V,E)\) be connected with positive edge lengths in \([\ell_{\min},\ell_{\max}]\), and let
\[
r_e=\ell_{\max}/\ell_{\min}.
\]
FPS selects \(k\) anchors by choosing a random first source and then iteratively selecting the vertex maximizing its distance to the current source set. Once the anchors \(S=\{s_1,\ldots,s_k\}\) are fixed, approximate distance between vertices \(p\) and \(q\) is computed by routing through one anchor:
\[
\hat d(p,q)=\min_{s\in S}\bigl(d(p,s)+d(s,q)\bigr).
\]
The paper analyzes the resulting stretch factor
\[
\max_{(p,q)\in V,\ p\neq q}\ \min_{s_i\in S}
\frac{d(p,s_i)+d(s_i,q)}{d(p,q)},
\]
and denotes by \(\mathcal F_{\mathrm{FPS}}\) the stretch achieved by FPS and by \(\mathcal F^*\) the minimum stretch over all \(k\)-anchor choices [1311.4665].

The main theoretical result is
\[
\mathcal F_{\mathrm{FPS}}
\le
2r_e^2\mathcal F^*+2r_e^2+8r_e+1.
\]
For near-uniform edge lengths, \(r_e\approx 1\), the bound becomes roughly \(2\mathcal F^*+11\); for highly non-uniform graphs, the quadratic dependence on \(r_e\) dominates. The paper also proves that finding \(k\) sources minimizing the stretch factor is NP-complete. The practical implication is explicit: optimal anchor placement minimizing stretch is computationally intractable in general, so FPS is justified as a heuristic with a provable bound relative to \(\mathcal F^*\) and the mesh irregularity parameter \(r_e\).

The analysis contains an evaluation result that is especially relevant for anchor-based systems. For any fixed sources and any given \(q\), the maximum ratio
\[
\max_p \frac{d(p,s_i,q)}{d(p,q)}
\]
is realized for some \(p\) adjacent to \(q\). Consequently, the global worst-case stretch can be found by scanning adjacent pairs rather than all pairs. This gives a theoretically justified protocol for empirical CFPA evaluation on graphs: choose anchors with FPS, precompute source-to-all distances, and measure empirical stretch on edges. Precomputation requires \(k\) single-source shortest-path computations, which the exposition states as \(O(k(m+n\log n))\) on general graphs and \(O(kn)\) on planar triangle graphs using linear-time SSSP; storage is \(O(kn)\).

This graph formulation clarifies what CFPA is not. It is not a multi-hop landmark routing scheme in the cited analysis, and it is not a certificate of global optimality. Its role is to provide a principled anchor set through FPS and to use those anchors for fast approximate geodesic queries with a worst-case stretch bound.

## 6. Geometry-aware localization, certification, and limits of farthest-only selection

In range-based localization under unknown-but-bounded measurement errors, CFPA is formulated as a geometry-aware subset selection and certification methodology. Anchors are known positions \(a^{(i)}\in\mathbb R^n\), collected in
\[
A=[a^{(1)}\ \cdots\ a^{(m)}]\in\mathbb R^{n\times m},
\]
and the squared-range measurements obey
\[
\|x-a^{(i)}\|_2^2=\xi_i,\qquad \xi_i^- \le \xi_i \le \xi_i^+.
\]
The true feasible set is the intersection of annuli,
\[
\mathcal X_{\mathrm{ann}}=
\bigcap_{i=1}^m
\left\{
x\in\mathbb R^n:\ \xi_i^- \le \|x-a^{(i)}\|_2^2 \le \xi_i^+
\right\},
\]
while the upper-ball set is
\[
\mathcal H=
\bigcap_{i=1}^m
\left\{
x\in\mathbb R^n:\ \|x-a^{(i)}\|_2 \le r_i
\right\},
\qquad r_i=\sqrt{\xi_i^+}.
\]
Using pairwise differences of squared-range equations, the paper defines a polyhedral certificate \(\mathcal X_\Delta\) and the certified localization set
\[
\mathcal X=\mathcal X_\Delta \cap \mathcal H,
\qquad
\mathcal X_{\mathrm{ann}}\subseteq \mathcal X \subseteq \mathcal X_\Delta.
\]
The geometry-only component of CFPA is governed by the centered scatter matrix
\[
S(A)=AQ_mA^\top
=
\sum_{i=1}^m (a^{(i)}-\bar a)(a^{(i)}-\bar a)^\top,
\qquad
Q_m=I_m-\frac{1}{m}\mathbf 1\mathbf 1^\top,
\]
which is translation-invariant and positive definite iff the anchors do not lie in a proper affine subspace [2603.14263].

Two offline subset-selection scores are emphasized. For a selected subset \(\mathcal S\) of size \(k\),
\[
\gamma_E(\mathcal S)=\lambda_{\min}(S(A_{\mathcal S})),
\qquad
\gamma_D(\mathcal S)=\det S(A_{\mathcal S}).
\]
The directional-width and diameter surrogates of the polyhedral certificate are controlled by \(\lambda_{\min}(S)\):
\[
\mathrm{width}_v(\mathcal X_\Delta)
\le
\frac{1}{2}w^\top\bigl|Q_mA^\top S(A)^{-1}v\bigr|
\le
\frac{1}{2}\|w\|_2\sqrt{v^\top S(A)^{-1}v},
\]
and
\[
\mathrm{diam}(\mathcal X_\Delta)\le
\frac{\|w\|_2}{2\sqrt{\lambda_{\min}(S(A))}}.
\]
Volume surrogates are controlled by \(\det S(A)\); discarding the \(\mathcal H\)-dependent term yields
\[
\mathrm{vol}(B_U)\le
\left(\frac{\|w\|_2}{2}\right)^n\frac{1}{\sqrt{\det S(A)}}.
\]
Accordingly, maximizing \(\lambda_{\min}(S)\) is recommended when worst-direction or diameter tightening is the goal, while maximizing \(\det S\) is recommended when area or volume reduction is the goal.

The “contextual” element is supplied by a region \(\mathcal R\subset\mathbb R^n\) encoding prior knowledge or operational constraints. Given a reference point \(c\in\mathcal R\), CFPA selects anchors that are far relative to \(\mathcal R\) while also optimizing \(\gamma_E\) or \(\gamma_D\), with spread enforced through distance and angular-separation constraints. The exposition gives a greedy heuristic: rank anchors by distance to \(c\), keep the top \(M\ge k\) candidates, and iteratively add the anchor with maximal incremental gain in the selected score while maintaining minimum angular separation. No submodularity or approximation guarantees are stated.

A central limitation of pure farthest-only selection is stated directly: it may produce collinear or badly conditioned configurations, causing rank-deficient \(S(A)\) and loose or infinite \(\mathcal X_\Delta\)-based bounds. The paper counters this with \(\mathcal H\)-aware online certificates. For any simplex weight \(p\in\Delta_m\), it defines an enclosing ball of \(\mathcal H\) centered at \(c(p)=Ap\) with radius
\[
\rho(p)^2
=
p^\top(\xi^+-\omega)+\|Ap\|_2^2
=
\sum_{i=1}^m p_i\xi_i^+
-\frac{1}{2}\sum_{i,j=1}^m p_ip_j\|a^{(i)}-a^{(j)}\|_2^2,
\]
yielding
\[
\mathrm{diam}(\mathcal X)\le 2\rho_\star,
\qquad
\rho_\star=\min_{p\in\Delta_m}\rho(p).
\]
It also gives the exact support function
\[
h_{\mathcal H}(v)=\min_{p\in\Delta_m}\bigl(v^\top Ap+\|v\|_2\,\rho(p)\bigr),
\]
and consequently the hybrid directional bound
\[
\mathrm{width}_v(\mathcal X)\le
\min\left\{
\frac{1}{2}w^\top\bigl|Q_mA^\top S(A)^{-1}v\bigr|,
\ \psi_{\mathcal H}(v)
\right\},
\]
with \(\psi_{\mathcal H}(v)=h_{\mathcal H}(v)+h_{\mathcal H}(-v)\). These \(\mathcal H\)-aware terms remain finite whenever \(\mathcal H}\neq\emptyset\), even when the polyhedral certificate deteriorates.

The reported two-dimensional experiments use \(N=8\) candidate anchors sampled uniformly in an annulus of radii 1 and 2 around the target, with \(k=4\) selected anchors and squared-range intervals of width \(0.1\). Over 60 trials, the exact area of the coordinate-aligned bounding box of \(\mathcal X\) is \(1.42\times 10^{-3}\) for the oracle subset, \(1.47\times 10^{-3}\) for the D-score subset, \(1.50\times 10^{-3}\) for the E-score subset, and \(5.85\times 10^{-3}\) on average over subsets. The D-score slightly dominates the E-score for the area-oriented metric, and both are close to the oracle. For online certification, the hybrid coordinate-box bound has log-log correlation \(0.984\) with the exact box area across 4200 subsets, with mean ratio bound/area approximately \(1.69\) and median \(1.50\). The remaining limitations are also explicit: anchor-position uncertainty is not handled, weighted scores are offline only when width envelopes are known a priori, and open problems include dynamic localization with bounded-error kinematics, decentralized evaluation of E/D scores, and robust CFPA under anchor uncertainties.

In aggregate, the literature shows CFPA as a domain-adapted anchoring principle rather than a single fixed algorithm. In Video LLMs it preserves exact skeleton tokens under saliency, context-consistency, and coverage constraints; in obstacle-aware geometry it supports exact farthest-anchor queries; in graph geodesics it becomes FPS-based anchor routing with stretch analysis; and in localization it combines farthest dispersion with geometry-aware selection and hybrid uncertainty certificates.

Source: https://www.emergentmind.com/topics/contextual-farthest-point-anchoring-cfpa