CO Sampler: Multi-Domain Sampling Techniques
- CO Sampler is a term for various sampling methods defined by domain-specific constraints, covering applications from recommendation systems to diffusion models.
- In implicit-feedback recommendation, CoSam uses an adaptive random walk and bias correction to efficiently generate hard negatives and improve convergence.
- Across fields such as telemetry, Bayesian computation, and video QA, CO Sampler frameworks integrate structured sampling strategies to enhance statistical efficiency and computational stability.
In current arXiv usage, CO Sampler is not a single standardized algorithm. The label appears in several technically unrelated literatures: as CoSam for implicit-feedback recommendation, as a co-evolved key-frame sampler in long-form video question answering, as a coordinated sampler for repeated surveys and SDN telemetry, as an informal label for the conditional ordered allocation sampler in Bayesian nonparametrics, as the Coordinate Sampler in piecewise deterministic Markov process MCMC, and as a composite ODE/SDE sampler scheduler for diffusion models (Chen et al., 2020, Tan et al., 26 Feb 2026, Cohen et al., 2012, Esmaeilian et al., 2024, Gil-Leyva et al., 24 Jun 2025, Wu et al., 2018, Cheng, 2023). The commonality is therefore lexical rather than methodological: each usage concerns sampling, but the sampled object, optimization criterion, and theoretical guarantees differ substantially.
1. Terminological scope
In the cited literature, the term is attached to at least six distinct constructions. A common misconception is to treat CO Sampler as a single architecture; the cited works instead use the term for different families of samplers defined by domain-specific constraints.
| Usage | Domain | Core mechanism |
|---|---|---|
| CoSam | Recommendation | Collaborative adaptive negative sampling on a user–item graph |
| CO Sampler in MSJoE | Long-video QA | U-Net over a query–frame similarity matrix |
| Coordinated sampler | Survey/data summarization | Shared seeds and coordinated inclusion across instances |
| dSamp / APX | SDN telemetry | Controller-side coordinated allocation with chance constraints |
| Conditional ordered allocation sampler | Bayesian nonparametrics | Order-of-appearance Gibbs updates in mixture models |
| Coordinate Sampler | PDMP MCMC | Non-reversible continuous-time coordinate-wise dynamics |
| Composite ODE/SDE sampler | Diffusion models | Step-wise scheduler mixing samplers over one trajectory |
The resulting ambiguity is substantive. In recommendation and video understanding, the sampler is part of an end-to-end learned system. In coordinated sampling and SDN telemetry, the emphasis is overlap, unbiased estimation, and budget-aware allocation. In Bayesian computation and PDMP MCMC, the sampler is a posterior simulation algorithm. In diffusion models, the sampler is a numerical integration policy over the reverse generative process.
2. CoSam in implicit-feedback recommendation
In recommendation, CoSam denotes an efficient collaborative adaptive negative sampler for implicit-feedback learning (Chen et al., 2020). The setting uses users , items , and binary feedback , where iff user interacted with item , and . The motivating problem is that uniform negative sampling over is efficient but tends to select easy negatives, producing slow convergence, high gradient variance, instability, and sub-optimal recommendation accuracy. Existing hard-negative samplers are described as either heuristic and inflexible or adversarial/model-based and computationally heavy.
CoSam addresses this through a collaborative sampler model and an integrated sampler–recommender framework. For each user , the sampling distribution over items is initialized uniformly, while each item 0 has a one-hot label vector 1. The layer-wise propagation rules are
2
3
In closed form, the diffusion kernel is
4
and the user-conditioned sampling distribution is a mixture of a uniform component and item-indicator components. The construction has four stated properties: normalization, adaptation, interaction awareness, and sampling efficiency.
Sampling is implemented by an Adaptive Random Walk (ARW) on the user–item bipartite graph. Starting at user 5, the walk either terminates into a uniform sample with probability 6, or moves to a neighbor item according to 7; at an item node it either outputs the item with probability 8, or moves to a neighboring user according to 9. The ARW samples exactly from 0, avoids traversing the full item space, and yields per-sample complexity 1 instead of 2, with
3
The reported practice is to keep 4.
The second part of CoSam is bias correction through integration with the recommender. For user 5, a candidate set 6 is drawn from a multinomial with probabilities 7, and prediction uses
8
This design is meant to offset the bias induced by uneven sampling. Training combines a Bernoulli cross-entropy loss for the recommender,
9
with a REINFORCE-style sampler update using reward
0
The empirical evaluation uses LastFM, Movielens-1M, Ciao, and Epinions, with Precision@K, Recall@K, and NDCG. On LastFM, CoSam reports 1 with training time 2 s, compared with adversarial sampling at 3 and 4 s. On Epinions, CoSam reports 5 and 6 s, versus 7 and 8 s for the adversarial baseline, corresponding to relative gains of 9, 0, 1, with approximately 2 speedup. The method is evaluated with Matrix Factorization and Neural Collaborative Filtering, and BPR is stated to be compatible.
3. The CO Sampler in long-form video question answering
In long-form video understanding, MSJoE defines a CO Sampler as a lightweight trainable key-frame selector jointly optimized with a multimodal LLM (Tan et al., 26 Feb 2026). The paper assumes that, for each question, only a small subset of frames is truly informative. It identifies three obstacles: insufficiency of question-only grounding, the difficulty of turning query–frame similarities into a diverse frame set, and the need for co-adaptation between sampler and MLLM.
The pipeline has four steps. First, the MLLM uses a sparse preview of 3 low-resolution frames, at 32 tokens/frame, to generate up to 4 visually grounded queries. The base MLLM is Qwen2.5-VL-7B-Instruct. Second, the video is densely sampled at 1 FPS, and a frozen CLIP ViT-L/14 computes the query–frame similarity matrix
5
where 6 and 7 are the frozen text and image encoders. Third, the CO Sampler maps 8 to frame logits using a 1D U-Net of about 2M parameters, treating the query axis as channels. The encoder channels are 9, the decoder mirrors them, and the encoder dilations are 0. Per-frame probabilities are obtained by masked softmax with temperature 1, and frames are sampled without replacement. Fourth, the selected 2 frames are sent to the MLLM at 256 tokens/frame for final answer generation.
The optimization is joint. The overall objective is
3
The MLLM is trained with GRPO, whereas the sampler uses REINFORCE: 4 Rewards include an accuracy term 5 if correct and 6 otherwise, a format reward 7 for correct output format, and an informativeness reward
8
with 9. To stabilize early optimization, the sampler is pre-trained with a difficulty-aware advantage based on the pass rate 0 of the base MLLM under uniform frames.
The method is trained on a newly collected long-video QA dataset of 2.8k videos and 7.1k QA pairs, with videos averaging about 12 minutes. Joint RL runs for 2 epochs, with batch size 32, GRPO group size 1, learning rates 2 for the MLLM and 3 for the sampler, and no KL regularization. Across VideoMME, LongVideoBench, LVBench, and MLVU, MSJoE reports approximately 8.0 points accuracy gain over the base MLLM and approximately 1.1 points over the strongest baseline. At a 64-frame budget, the reported accuracies are 75.1 on MLVU, 62.2 on LongVideoBench, 57.4 on VideoMME-Long, and 51.1 on LVBench. Measured latency over 1,000 samples is 2.809 s for query generation, 0.029 s for CLIP similarity, 0.038 s for the U-Net sampler, 3.353 s for QA, and 6.226 s total, versus 3.723 s for uniform sampling.
4. Coordinated samplers for repeated surveys, data summarization, and SDN telemetry
A different use of the term denotes a coordinated sampler, in which related instances share randomness so that similar instances have similar samples (Cohen et al., 2012). In this framework, each item 4 receives a seed 5, often implemented by a pairwise-independent hash. Sampling is rank-based. In Poisson PPS sampling, 6; in bottom-7 sampling, the 8 highest ranks are retained. The central estimator theory is formulated at the single-item level: for an item-function 9 on value vectors 0, the outcome 1 determines a consistency set 2, and the lower bound function is
3
The paper characterizes when unbiased nonnegative estimators exist, when they admit finite variance, and when bounded estimates are possible. Its main constructive result is the J estimator, and the stated competitiveness guarantee is
4
where 5 is the 6-optimal estimator. Coordinated samples are used for set unions, maxima, minima, 7 differences, Jaccard similarity, heavy hitters, and range aggregates.
In SDN telemetry, the same coordinated idea is instantiated by dSamp, whose coordinated sampler is a controller-side allocation mechanism that assigns each admitted flow to at most one switch and accounts for dynamic flow-rate fluctuations (Esmaeilian et al., 2024). The network is a directed graph 8, each switch 9 has sampling capacity 0, and each flow 1 traverses a path 2. For the next epoch, the sampled load is modeled by a random variable 3 with mean 4 and variance 5. The chance-constrained formulation requires
6
Using a Normal approximation, the exact ISOCP constraint becomes
7
For scalability, APX replaces the square root by a safe linear upper bound, yielding
8
The controller maximizes 9, subject to 0. This coordinated allocation is evaluated in ns-3 on Abilene and synthetic topologies, with defaults 1, 2, and 5-second epochs. APX solves in 0.001–0.005 s on small instances, remains below about 1.25 s for 500 switches, and reports up to 10% more fully sampled flows than deterministic or coarsely robust baselines at a given sampling rate.
These two strands share the language of coordination but target different objects. In the first, coordination is statistical overlap across related instances. In the second, it is centralized assignment of sampling responsibility across switches under capacity risk.
5. Conditional ordered allocation sampling in Bayesian nonparametrics
In Bayesian nonparametrics, CO Sampler is used informally for the conditional ordered allocation framework studied in the ordered allocation sampler literature (Gil-Leyva et al., 24 Jun 2025). The target is the posterior distribution in finite or infinite mixture models, including priors such as the Dirichlet process, Pitman–Yor process, exchangeable stick-breaking processes, and other random discrete mixing distributions.
The ordered allocation sampler works with order-of-appearance labels. If distinct component values appear in the latent sequence 3 in size-biased order, then ordered allocation variables 4 indicate which discovered component generated 5. The least-element order constraint requires
6
where 7. The paper’s principal contribution is a speed-up of the original OA Gibbs sampler. The modified version updates unordered labels 8 “as if 9 were the last observation.” If the currently discovered components are 00 with weights 01, and 02 is a prospective new component, then
03
After a full scan, the ordered labels 04 are reconstructed by reading off the distinct values of 05 in order of appearance.
This change removes admissible-move computations, permits many components to be created or destroyed in a single scan, and yields per-iteration cost 06 when 07 components are discovered. Component parameters 08 are updated from
09
with Gibbs, Metropolis, or HMC depending on conjugacy. For size-biased stick-breaking priors such as Pitman–Yor,
10
The paper also adapts split-merge moves of Jain and Neal to the modified sampler. A restricted Gibbs scan updates only the observations in the union of the two affected blocks, and the proposal is accepted with a Metropolis–Hastings ratio on the augmented OA state. Reported simulation studies show that integrated autocorrelation times are roughly halved relative to the original OA sampler, and short burn-in with split-merge moves materially reduces total variation distance in density estimation examples.
6. The Coordinate Sampler as a PDMP MCMC method
The Coordinate Sampler is a non-reversible, continuous-time MCMC algorithm based on a piecewise deterministic Markov process (Wu et al., 2018). Its target density on 11 is
12
and the state is augmented with a velocity 13 from the finite set
14
The invariant distribution on the augmented space is
15
where 16 is uniform on 17.
Between events, the dynamics are deterministic: 18 Events occur with rate
19
and at an event the new velocity is chosen from
20
with
21
The process is therefore Gibbs-like only in the sense that it moves along one coordinate at a time; mathematically it is a PDMP rather than a reversible Gibbs chain.
The paper proves invariance of 22 by showing 23, where 24 is the extended generator, and establishes 25-uniform geometric ergodicity under assumptions A.1–A.4 together with either tail regime C.1 or C.2. The Lyapunov function is
26
If 27, the process has a unique invariant distribution and is irreducible on 28.
Event times are obtained by solving
29
For quadratic potentials, this reduces to a quadratic equation because the directional derivative is affine in 30. The algorithm is compared numerically with the Zigzag sampler, the Bouncy Particle Sampler, and HMC. On banana-shaped distributions, correlated Gaussians, Bayesian logistic regression, and a log-Gaussian Cox process, it is reported to be more efficient than Zigzag in effective sample size, while HMC remains strongest in the cited Gaussian benchmark.
7. Composite ODE/SDE samplers in diffusion models
A further usage of the term appears in diffusion-model inference, where a CO Sampler is a composite sampler that mixes different ODE-type and SDE-type update rules across the sampling trajectory (Cheng, 2023). The motivation is that early reverse-time steps benefit from stochasticity and exploration, whereas late steps benefit from deterministic refinement. The paper generalizes several update rules into a scheduler that chooses different samplers on different step intervals.
The denoiser is written either as noise prediction 31 or data prediction 32, related by
33
For the deterministic probability-flow ODE,
34
A unified ODE-style update has the form
35
while a unified SDE-style update adds Gaussian noise: 36
The scheduler partitions the global 37-schedule into units. Each unit is assigned a sampler such as Euler a, DPM2 a, DPM++ 2S a, DPM++ SDE, DPM2, Heun, or DPM++ 2M. The reported strong schedules are all two-phase, including DPM2 a 38 DPM2 39, DPM2 a 40 DPM++ 2M 41, DPM++ 2S a 42 DPM2 43, and DPM++ 2S a 44 DPM++ 2M 45. The central empirical claim is that early SDE and late ODE mitigates the limitations of using either alone: SDE throughout may cause excessive noise, color oversaturation, or detail loss at low 46, whereas ODE throughout may suffer from early drift and weaker exploration.
On CIFAR-10 at NFE = 24, the reported ODE Sampler Scheduler reaches FID 1.91, compared with 2.02 for DPM++ 2M, 1.97 for DPM2, and 11.90 for Heun. The combined SDE→ODE schedule reaches 1.899, compared with 18.63 for Euler a, 3.14 for DPM2 a, and 23.14 for DPM++ SDE. At NFE = 12, the integrated scheduler improves FID by 87.58% over single-step DPM-Solver++ (36.100 versus 4.484). In a Stable Diffusion v1.5 setting at 47, the cited configuration uses 31-step Heun followed by 60-step DPM++ 2M, for 91 sampling steps and 121 NFE.
Taken together, these usages show that CO Sampler is a field-dependent name rather than a single theory. In recommendation and video models it denotes adaptive learned sampling modules; in coordinated sampling it denotes overlap-preserving shared-randomness schemes; in Bayesian computation it denotes posterior simulation algorithms; and in diffusion models it denotes a composite integration schedule. The common thread is not a shared mathematics but a shared design goal: replacing naive or uniform sampling with a structure-aware mechanism that improves either statistical efficiency, optimization stability, computational cost, or all three at once.