Sobol sequence


Sobol sequences are an example of quasi-random low-discrepancy sequences. They were first introduced by the Russian mathematician Ilya M. Sobol in 1967.
These sequences use a base of two to form successively finer uniform partitions of the unit interval and then reorder the coordinates in each dimension.

Good distributions in the ''s''-dimensional unit hypercube

Let Is = s be the s-dimensional unit hypercube, and f a real integrable function over Is. The original motivation of Sobol was to construct a sequence xn in Is so that
and the convergence be as fast as possible.
It is more or less clear that for the sum to converge towards the integral, the points xn should fill Is minimizing the holes. Another good property would be that the projections of xn on a lower-dimensional face of Is leave very few holes as well. Hence the homogeneous filling of Is does not qualify because in lower dimensions many points will be at the same place, therefore useless for the integral estimation.
These good distributions are called -nets and -sequences in base b. To introduce them, define first an elementary s-interval in base b a subset of Is of the form
where aj and dj are non-negative integers, and for all j in.
Given 2 integers, a -net in base b is a sequence xn of bm points of Is such that for all elementary interval P in base b of hypervolume λ = bt−m.
Given a non-negative integer t, a -sequence in base b is an infinite sequence of points xn such that for all integers, the sequence is a -net in base b.
In his article, Sobol described Πτ-meshes and LPτ sequences, which are -nets and -sequences in base 2 respectively. The terms -nets and -sequences in base b were coined in 1988 by Harald Niederreiter. The term Sobol sequences was introduced in late English-speaking papers in comparison with Halton, Faure and other low-discrepancy sequences.

A fast algorithm

A more efficient Gray code implementation was proposed by Antonov and Saleev.
As for the generation of Sobol numbers, they are clearly aided by the use of Gray code instead of n for constructing the n-th point draw.
Suppose we have already generated all the Sobol sequence draws up to n − 1 and kept in memory the values xn−1,j for all the required dimensions. Since the Gray code G differs from that of the preceding one G by just a single, say the k-th, bit, all that needs to be done is a single XOR operation for each dimension in order to propagate all of the xn−1 to xn, i.e.

Additional uniformity properties

Sobol introduced additional uniformity conditions known as property A and A’.
;Definition: A low-discrepancy sequence is said to satisfy Property A if for any binary segment of the d-dimensional sequence of length 2d there is exactly one draw in each 2d hypercubes that result from subdividing the unit hypercube along each of its length extensions into half.
;Definition: A low-discrepancy sequence is said to satisfy Property A’ if for any binary segment of the d-dimensional sequence of length 4d there is exactly one draw in each 4d hypercubes that result from subdividing the unit hypercube along each of its length extensions into four equal parts.
There are mathematical conditions that guarantee properties A and A'.
;Theorem: The d-dimensional Sobol sequence possesses Property A iff
;Theorem: The d-dimensional Sobol sequence possesses Property A' iff
Tests for properties A and A’ are independent. Thus it is possible to construct the Sobol sequence that satisfies both properties A and A’ or only one of them.

The initialisation of Sobol numbers

To construct a Sobol sequence, a set of direction numbers vi,j needs to be selected. There is some freedom in the selection of initial direction numbers. Therefore, it is possible to receive different realisations of the Sobol sequence for selected dimensions. A bad selection of initial numbers can considerably reduce the efficiency of Sobol sequences when used for computation.
Arguably the easiest choice for the initialisation numbers is just to have the l-th leftmost bit set, and all other bits to be zero, i.e. mk,j = 1 for all k and j. This initialisation is usually called unit initialisation. However, such a sequence fails the test for Property A and A’ even for low dimensions and hence this initialisation is bad.

Implementation and availability

Good initialisation numbers for different numbers of dimensions are provided by several authors. For example, Sobol provides initialisation numbers for dimensions up to 51. The same set of initialisation numbers is used by Bratley and Fox.
Initialisation numbers for high dimensions are available on Joe and Kuo. Peter Jäckel provides initialisation numbers up to dimension 32 in his book "Monte Carlo methods in finance".
Other implementations are available as C, Fortran 77, or Fortran 90 routines in the Numerical Recipes collection of software. A free/open-source implementation in up to 1111 dimensions, based on the Joe and Kuo initialisation numbers, is available in C, and up to 21201 dimensions in Python and Julia. A different free/open-source implementation in up to 1111 dimensions is available for C++, Fortran 90, Matlab, and Python.
Finally, commercial Sobol sequence generators are available within, for example, the NAG Library,. A version is available from the British-Russian Offshore Development Agency. MATLAB also contains an implementation as part of its Statistics Toolbox.