---
title: 'Partial sRI-CC2: Efficient Stochastic CC2'
url: https://www.emergentmind.com/topics/partial-sri-cc2
type: topic
---

# Partial sRI-CC2: Efficient Stochastic CC2

Partial sRI-CC2 denotes a family of selective stochastic-resolution-of-identity formulations of the second-order approximate coupled-cluster singles and doubles method, CC2, in which stochastic sampling is applied only to chosen four-index electron-repulsion-integral contractions rather than to the entire two-electron sector. In the cited literature, the selection is made to target the dominant expensive contractions—most commonly exchange-like terms—while retaining deterministic RI treatment, or another low-rank factorization, for the remaining contributions. The resulting methods preserve much of the scaling reduction associated with full sRI-CC2, but with substantially lower stochastic noise, especially for energy derivatives, analytical gradients, derivative couplings, and nonadiabatic dynamics [2210.12897][2503.11027][2509.06460][2509.21885].

## 1. Origin and conceptual scope

The background to partial sRI-CC2 is the contrast between conventional RI-CC2 and full sRI-CC2. In RI-CC2, the dominant cost arises from contractions involving four-index ERIs and remains formally \(O(N^5)\). Full sRI-CC2 replaces every occurrence of the ERI by a stochastic low-rank factorization, reducing the leading cost to \(O(N^3)\) when the number of stochastic samples is held constant [2210.12897][2310.18350].

Partial sRI-CC2 emerged as a compromise between these two limits. In the 2022 ground-state formulation, only the two most expensive contributions in the singles residual, commonly called \(Q_2\) and \(Q_3\), together with the final energy contractions, are treated stochastically; all remaining terms, including \(Q_1\), \(Q_4\), \(Q_5\), \(Q_6\), the Fock build, and DIIS, remain deterministic [2210.12897]. In the 2025 work on oscillator strengths and ground-state gradients, the mixed scheme is refined further: in the CC2 gradient Lagrangian, the first “direct” two-electron term is kept fully deterministic, while the second “exchange” term alone is stochastically hypercontracted [2503.11027]. The excited-state gradient and derivative-coupling implementation follows the same logic, applying sRI selectively to exchange terms only and leaving Coulomb integrals deterministic [2509.06460].

A further development is the hybrid THC-sRI-CC2 formulation, in which the Coulomb-like contribution is factorized by tensor hypercontraction and only the exchange-like contribution is sampled stochastically. This “noise-reduced” variant preserves overall \(O(N^3)\) scaling while suppressing variance from the largest-amplitude deterministic sector [2509.21885]. This suggests that partial sRI-CC2 is best understood not as a single fixed algorithm but as a design principle: stochastic decoupling is confined to the contractions that dominate cost but need not dominate variance.

## 2. Algebraic structure

The starting point is the usual RI approximation,
\[
(\alpha\beta|\gamma\delta)\approx \sum_{P Q}(\alpha\beta|P)\bigl[V^{-1}\bigr]_{P Q}(Q|\gamma\delta),
\]
with the three-index tensor
\[
B^Q_{\alpha\beta}=\sum_P(\alpha\beta|P)\,V^{-1/2}_{P Q},
\]
so that
\[
(\alpha\beta|\gamma\delta)\approx \sum_Q B^Q_{\alpha\beta}B^Q_{\gamma\delta}.
\]
The sRI construction replaces the auxiliary index by random \(\pm 1\) vectors \(\theta_Q^\xi\) satisfying
\[
\bigl\langle\theta\otimes\theta\bigr\rangle_\xi
=\frac1{N_s}\sum_{\xi=1}^{N_s}\theta^\xi(\theta^\xi)^T\approx I,
\]
and defines
\[
R^\xi_{\alpha\beta}
=\sum_P(\alpha\beta|P)\sum_Q V^{-1/2}_{P Q}\,\theta_Q^\xi.
\]
The ERI is then estimated by
\[
(\alpha\beta|\gamma\delta)
=\bigl\langle R^\xi_{\alpha\beta}R^\xi_{\gamma\delta}\bigr\rangle_\xi
=\frac1{N_s}\sum_{\xi=1}^{N_s}R^\xi_{\alpha\beta}R^\xi_{\gamma\delta}.
\]
These identities are common to both full and partial sRI formulations [2310.18350][2509.21885].

The defining step in partial sRI-CC2 is selective insertion of this stochastic factorization. In the exchange-only formulation of the CC2 contraction,
\[
A_{ik}=\sum_{a b j}\!\bigl[\,2\,(a i|b j)-(b i|a j)\bigr](b j|a k),
\]
only the exchange-like term is decoupled stochastically, while the Coulomb-like term is evaluated deterministically or through another low-rank factorization. The resulting expression can be written as
\[
A_{ik}
=2\!\sum_{a b j}(a i|b j)(b j|a k)
-\sum_{a b j}\langle R^\xi_{b i}R^\xi_{a j}\rangle_\xi
\langle R^{\xi'}_{b j}R^{\xi'}_{a k}\rangle_{\xi'}.
\]
The use of independent samples \(\xi,\xi'\) for the two ERIs guarantees unbiased estimates of products of two ERIs [2509.21885].

For gradient theory, the same partition appears in the two-electron derivative contribution,
\[
G_2=\sum_{pqrs}A_{pq}(pq|rs)^{[x]},
\]
with
\[
(pq|rs)^{[x]}
=2\sum_P (pq|P)^{[x]}V^{-1}_{PQ}(Q|rs)
-\sum_P (pr|P)V^{-1}_{PQ}(Q|qs)^{[x]}.
\]
Here the first term is the deterministic “direct” contribution, while the second is the stochastic “exchange” contribution in partial sRI-CC2 [2503.11027].

## 3. Observable-specific variants

Several distinct implementations fall under the label partial sRI-CC2. They differ in which contractions are sampled stochastically and in whether the retained deterministic sector is conventional RI or another low-rank factorization.

| Context | Partial-sRI split | Formal scaling |
|---|---|---|
| Ground-state amplitudes and energy | Only \(Q_2\), \(Q_3\), and final energy contractions use sRI; \(Q_1\), \(Q_4\), \(Q_5\), \(Q_6\), Fock build, and DIIS remain deterministic | Effective \(O(N^3)\)–\(O(N^4)\) overall iteration cost [2210.12897] |
| Ground-state gradients and oscillator strengths | Direct term deterministic; exchange term stochastically hypercontracted | \(O(N^4)\) partial-sRI gradient algorithm [2503.11027] |
| Excited-state gradients and derivative couplings | Coulomb integrals deterministic; exchange integrals sampled through \(R^\xi_{bi}R^\xi_{aj}\) | Net formal \(O(N^4)\) [2509.06460] |
| Hybrid THC-sRI-CC2 | Coulomb via THC/ISDF; exchange via sRI | Net formal \(O(N^3)\) [2509.21885] |

In the ground-state formulation, the stochastic terms are inserted directly into the CC2 residual equations and the correlation energy. Schematically,
\[
E_{\mathrm{corr}}
\simeq \frac1M\sum_{\alpha=1}^M\sum_{ijab}
t_{ij}^{ab}\bigl[2R_{ai}^\alpha R_{bj}^\alpha-R_{aj}^\alpha R_{bi}^\alpha\bigr],
\]
while the dominant residual terms \(Q_2\) and \(Q_3\) are also rewritten in terms of stochastic projected integrals \(R_{pq}^\alpha\) [2210.12897].

For gradients and response properties, the orbital-energy denominators are decoupled with a Laplace transform. The 2025 implementation uses a 7-point Laplace quadrature,
\[
\frac1{\varepsilon_a+\varepsilon_b-\varepsilon_i-\varepsilon_j}
\simeq \sum_{z=1}^{N_t} w_z e^{-(\varepsilon_a+\varepsilon_b-\varepsilon_i-\varepsilon_j)t_z},
\]
which turns the denominator into products of one-index exponentials and permits partial stochastic decoupling of the exchange block [2503.11027]. The excited-state gradient and derivative-coupling formulation uses the same Laplace logic, with \(N_z=7\) stated as typical [2509.06460].

The hybrid THC-sRI-CC2 construction modifies only the deterministic half of this partition. The Coulomb-like term is factorized by tensor hypercontraction in an interpolative separable density fitting representation,
\[
(\alpha\beta|\gamma\delta)
\approx \sum_{K,L=1}^{N_{IP}}
\phi^K_\alpha\phi^K_\beta\,M_{KL}\,\phi^L_\gamma\phi^L_\delta,
\]
where interpolation points are chosen by a QRCP procedure and \(N_{IP}=c_{\rm ISDF}N_{aux}\). The exchange-like term remains under sRI [2509.21885].

## 4. Scaling regimes and computational trade-offs

The principal motivation for partial sRI-CC2 is the redistribution of asymptotic cost. In conventional RI-based CC2, the Coulomb contribution scales as \(O(N^4)\), whereas the exchange contribution scales as \(O(N^5)\); the total is therefore \(O(N^5)\). In pure sRI-CC2, both Coulomb and exchange terms become \(O(N^3)\) if \(N_s\) is held constant. In pure THC-CC2, the Coulomb part is reduced to \(O(N^3)\) through ISDF factorization, but the exchange part remains \(O(N^4)\). In THC-sRI-CC2, Coulomb via THC and exchange via sRI both scale as \(O(N^3)\), giving an overall \(O(N^3)\) method [2509.21885].

The earlier partial schemes occupy an intermediate position. For ground-state energies, partial sRI reduces the dominant exponent from \(5\) to \(3\)–\(4\), depending on the fraction of terms treated stochastically [2210.12897]. For ground-state gradients, the mixed direct/exchange partition yields an \(O(N^4)\) implementation with a much smaller stochastic prefactor than full sRI [2503.11027]. For excited-state gradients and derivative couplings, the exchange-only implementation also gives net \(O(N^4)\) scaling, because the four-index \((bi|aj)\) tensor is replaced by two rank-two tensors \(R^\xi_{bi}\) and \(R^\xi_{aj}\), while the Coulomb sector remains deterministic [2509.06460].

Measured timings reflect these distinctions. On hydrogen chains in STO-3G, RI-CC2 scales as \(N^{3.74}\) and partial sRI-CC2 as \(N^{2.71}\) for fixed \(M=400\) [2210.12897]. For oscillator strengths and gradients, deterministic RI-CC2 is reported as \(\sim O(N^{4.8})\) measured, full sRI-CC2 as \(\sim O(N^{2.6})\) for oscillator strengths and \(\sim O(N^{2.7})\) for gradients, and partial sRI-CC2 as \(\sim O(N^{3.6}-N^4)\) measured [2503.11027]. In the excited-state gradient and derivative-coupling study, RI-CC2 gradient cost scales as \(N^{4.8}\), partial sRI gradient cost as \(N^{3.9}\), RI-CC2 coupling cost as \(N^{4.4}\), and partial sRI coupling cost as \(N^{3.6}\); the CPU-time crossover is extrapolated at \(\sim 400\) electrons [2509.06460].

The THC-hybridization changes this trade-off again. In numerical timing benchmarks on all-electron olefin chains up to \(80\) electrons,
\[
\mathrm{CPU(RI\text{-}CC2)}\sim N^{4.32},\quad
\mathrm{CPU(sRI\text{-}CC2)}\sim N^{2.78},\quad
\mathrm{CPU(THC\text{-}sRI\text{-}CC2)}\sim N^{2.80}.
\]
The crossover where sRI-based methods overtake RI-CC2 occurs around \(N_e\approx 70\) electrons, and THC-sRI-CC2 is \(10\)–\(20\%\) faster than pure sRI-CC2 for identical stochastic sampling [2509.21885].

## 5. Noise behavior and numerical accuracy

The defining statistical property of sRI is that the ERI is replaced by a Monte Carlo estimator,
\[
(\alpha\beta|\gamma\delta)
=\frac1{N_s}\sum_{\xi=1}^{N_s}R^\xi_{\alpha\beta}R^\xi_{\gamma\delta},
\qquad
\sigma^2\bigl[(\alpha\beta|\gamma\delta)\bigr]
\approx \frac{1}{N_s}\,\mathrm{Var}\!\bigl[R^\xi_{\alpha\beta}R^\xi_{\gamma\delta}\bigr].
\]
Accordingly, the standard error in any CC2 observable decays as \(1/\sqrt{N_s}\) [2509.21885]. The same scaling is stated throughout the earlier partial-sRI literature: the stochastic estimator is unbiased, and doubling \(N_s\) reduces the standard deviation by \(\sqrt{2}\) [2210.12897][2509.06460].

Partial sRI-CC2 is motivated by the observation that not all contractions contribute equally to variance. In the exchange-only formulations, only the exchange block is noisy, while the Coulomb block remains exact under deterministic RI. In the THC-sRI-CC2 formulation, stochastic sampling is removed altogether from the Coulomb term, which is described as typically the largest source of variance; only the exchange part retains \(1/\sqrt{N_s}\) noise, leading to overall variance reductions of \(5\)–\(10\times\) at fixed \(N_s\) [2509.21885].

For gradient comparisons, the literature monitors component-wise deviations
\[
\Delta_i=X_i^{\rm sRI}-X_i^{\rm RI},\qquad
\Delta_{\max}=\max_i|\Delta_i|,\qquad
\bar\Delta_{\rm abs}=\frac1n\sum_i|\Delta_i|.
\]
In the ground-state gradient work, full sRI requires very large \(N_s\) values, for example \(50\,000\), to bring the statistical error on geometry derivatives below \(\simeq 10^{-3}\) Hartree/Bohr, whereas partial sRI typically needs \(N_s\sim 50\)–\(200\) for \(10^{-3}\) Hartree/Bohr accuracy [2503.11027]. The same paper reports that oscillator strengths are less demanding, with \(N_s\sim 10^4\) giving errors \(<0.01\) au in \(f\) [2503.11027].

The hybrid THC-sRI-CC2 benchmarks are more specific. For first excitation energies in cc-pVDZ at \(N_s=5\,000\), H\(_2\)O gives RI \(=8.0924\) eV, sRI-CC2 \(=8.0500\) eV with S.D. \(0.1986\) and absolute error \(0.0424\), and THC-sRI-CC2 \(=8.0965\) eV with S.D. \(0.0330\) and absolute error \(0.0041\). For benzene, RI \(=5.3668\) eV, sRI-CC2 \(=5.3048\) eV with S.D. \(0.0951\) and absolute error \(0.0620\), and THC-sRI-CC2 \(=5.3768\) eV with S.D. \(0.0288\) and absolute error \(0.0100\) [2509.21885]. For ground-state gradients at \(N_s=50\,000\), H\(_2\)O changes from \(\Delta_{\max}=0.0028\), \(\bar\Delta_{\rm abs}=0.0015\) in sRI-CC2 to \(\Delta_{\max}=0.0017\), \(\bar\Delta_{\rm abs}=0.0008\) in THC-sRI-CC2; benzene changes from \(\Delta_{\max}=0.1200\), \(\bar\Delta_{\rm abs}=0.0204\) to \(\Delta_{\max}=0.0147\), \(\bar\Delta_{\rm abs}=0.0026\). For the H\(_2\)O excited-state gradient, the reported values are \(\Delta_{\max}=0.0139\), \(\bar\Delta_{\rm abs}=0.0053\) for sRI-CC2 and \(\Delta_{\max}=0.0021\), \(\bar\Delta_{\rm abs}=0.0007\) for THC-sRI-CC2 [2509.21885].

The exchange-only excited-state derivative formulation shows the same pattern. With partial sRI-CC2 at \(N_s=100\), gradient S.D. is reported as \(\le 0.005\) Hartree/Bohr and derivative-coupling S.D. as \(\le 0.03\) a.u., whereas complete sRI-CC2 with \(N_s=50\,000\) gives gradient S.D. \(\simeq 0.05\) Hartree/Bohr and derivative-coupling S.D. \(\simeq 0.1\) a.u. [2509.06460]. This directly counters the misconception that the fully cubic variant is always the practically superior option: for derivatives, lower asymptotic scaling can be offset by a prohibitively large sampling requirement.

## 6. Applications, implementation practice, and extensions

Partial sRI-CC2 is particularly associated with large-scale excited-state calculations and nonadiabatic dynamics. The 2025 excited-state gradient and derivative-coupling work identifies these quantities as essential ingredients for large-scale nonadiabatic dynamics and states that the partial sRI-CC2 implementation can handle systems with hundreds or even thousands of electrons [2509.06460]. The THC-sRI-CC2 study likewise emphasizes that the resulting \(O(N^3)\) scaling extends the applicability of CC2 for excited-state energy calculations and nonadiabatic dynamics simulations of large molecular systems [2509.21885].

Implementation practice follows directly from the selective stochastic partition. The same auxiliary basis sets as deterministic RI-CC2 are reused. Stochastic vectors have length \(N_{aux}\) with independently drawn \(\pm 1\) entries. In response and derivative formulations, Laplace points \(z\) and stochastic vectors \(\xi\) are naturally distributed over MPI ranks or threads, while deterministic direct terms are handled through conventional RI contractions [2503.11027][2509.06460]. For nonadiabatic dynamics, recommended practice includes choosing \(N_s\) so that fluctuations in forces and couplings are small relative to energy gaps, using the same random seed across nuclear time steps to correlate sampling, monitoring instantaneous standard deviations, and switching to deterministic RI-CC2 or increasing samples locally in critical crossing regions [2509.06460].

The most general extension proposed so far is the hybrid low-rank/stochastic strategy introduced in THC-sRI-CC2. The paper states that the “partial sRI” logic extends naturally to CCSD and CCSD(T), EOM-CC and LR-CC, excited-state dynamics and non-adiabatic couplings, and can be combined with stochastic Cholesky, block RNG, control variates, and correlated sampling [2509.21885]. A plausible implication is that partial sRI-CC2 has become a prototype for selectively stochastic coupled-cluster algorithms more broadly: deterministic low-rank factorizations are assigned to large-amplitude sectors, and stochastic decoupling is reserved for the contractions that are asymptotically dominant but variance-manageable.

In this broader sense, partial sRI-CC2 is defined less by a single equation than by a stable methodological partition: exact or low-rank treatment where stochastic noise is most damaging, and stochastic treatment only where it most effectively removes the high-scaling bottleneck.

Source: https://www.emergentmind.com/topics/partial-sri-cc2