  Unveiling the thermal history of the intergalactic medium (IGM) at $4 \leq z
\leq 5$ holds the potential to reveal early onset HeII reionization or
lingering thermal fluctuations from HI reionization. We set out to reconstruct
the IGM gas properties along simulated Lyman-alpha forest data on
pixel-by-pixel basis, employing deep Bayesian neural networks. Our approach
leverages the Sherwood-Relics simulation suite, consisting of diverse thermal
histories, to generate mock spectra. Our convolutional and residual networks
with likelihood metric predicts the Ly$\alpha$ optical depth-weighted density
or temperature for each pixel in the Ly$\alpha$ forest skewer. We find that our
network can successfully reproduce IGM conditions with high fidelity across
range of instrumental signal-to-noise. These predictions are subsequently
translated into the temperature-density plane, facilitating the derivation of
reliable constraints on thermal parameters. This allows us to estimate
temperature at mean cosmic density, $T_{\rm 0}$ with one sigma confidence
$\delta T_{\rm 0} \sim 1000{\rm K}$ using only one $20$Mpc/h sightline ($\Delta
z\simeq 0.04$) with a typical reionization history. Existing studies utilize
redshift pathlength comparable to $\Delta z\simeq 4$ for similar constraints.
We can also provide more stringent constraints on the slope ($1\sigma$
confidence interval $\delta {\rm \gamma} \lesssim 0.1$) of the IGM
temperature-density relation as compared to other traditional approaches. We
test the reconstruction on a single high signal-to-noise observed spectrum
($20$ Mpc/h segment), and recover thermal parameters consistent with current
measurements. This machine learning approach has the potential to provide
accurate yet robust measurements of IGM thermal history at the redshifts in
question.
