  Gravitational lensing by massive galaxy clusters distorts the observed cosmic
microwave background (CMB) on arcminute scales, and these distortions carry
information about cluster masses. Standard approaches to extracting cluster
mass constraints from the CMB cluster lensing signal are either sub-optimal,
ignore important physical or observational effects, are computationally
intractable, or require additional work to turn the lensing measurements into
constraints on cluster masses. We apply simulation based inference (SBI) using
neural likelihood models to the problem. We show that in circumstances where
the exact likelihood can be computed, the SBI constraints on cluster masses are
in agreement with the exact likelihood, demonstrating that the SBI constraints
are close to optimal. In scenarios where the exact likelihood cannot be
feasibly computed, SBI still recovers unbiased estimates of individual cluster
masses and combined constraints from multiple clusters. SBI will be a powerful
tool for constraining the masses of galaxy clusters detected by future cosmic
surveys. Code to run the analyses presented here will be made publicly
available.
