﻿# Optuna sampler seeds: parallel completion order can change the information behind the next proposal

Explain why a seeded Optuna search can diverge under parallel evaluation by separating sampler randomness, available trial history and deterministic objective behavior.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-optuna-sampler-seed-parallel-observation-order/
Language: en

## Separate replaying a candidate from replaying a search

A research team repeats a seeded Optuna study on parallel GPU workers and obtains a different sequence of proposed candidates. Individual fixed candidates may still evaluate consistently. The [reproducibility FAQ](https://optuna.readthedocs.io/en/stable/faq.html) distinguishes sampler seeding from nondeterminism in parallel optimization and in the objective. State which replay claim is intended: identical candidate evaluation, identical suggestions or statistically similar search outcomes. These are different experimental contracts and require different evidence.

## Identify the history available to each proposal

An adaptive sampler uses information from the study when selecting future parameters. The [TPE reference](https://optuna.readthedocs.io/en/stable/reference/samplers/generated/optuna.samplers.TPESampler.html) describes using objective history and handling running trials. In asynchronous execution, a fast candidate can report before a slower one regardless of submission order. A later proposal may therefore see a different set of observations when worker timings change. Reusing the same seed cannot make different observed histories identical.

## Do not assume all workers share one fixed random stream

The [sampler overview](https://optuna.readthedocs.io/en/stable/reference/samplers/index.html) documents reseeding behavior in parallel optimization and cautions about reproducibility. Record the sampler configuration and execution mode rather than describing the entire distributed search by one seed integer. Avoid independently initializing every process with an identical random stream as an improvised solution; it can produce unintended duplication without establishing the desired global proposal order. Use the documented sampler and execution contract for the chosen arrangement.

## Control the objective separately

A fixed hyperparameter set can still produce variable scores because of model initialization, data order, stochastic augmentation or runtime behavior. Preserve those controls independently of the search sampler. Otherwise an observed divergence could arise before scheduling matters at all. A sequential diagnostic study with a deterministic small objective helps isolate proposal behavior, while a fixed-candidate model evaluation tests another layer. Neither alone establishes complete replayability of the full parallel training workflow.

## Preserve realized proposals as evidence

Save trial parameters, outcomes and execution context so the actual candidate population can be analyzed even when the search trajectory is not exactly replayed. Related guides explain [random-state replay](/journal/data-guide-data-rng-state-replay/) and [controlled data ordering](/journal/data-guide-curriculum-order-controlled-replay/). Compare claims at the appropriate layer. A reproducible evaluation of saved candidates is useful in its own right and should remain distinguishable from a stronger promise that an asynchronous optimization will generate the same entire history again.
