Although an accurate lithofluid and facies interpretation from wireline log data is critical for applications such as joint facies and impedance inversion of seismic data, extracting this information manually is challenging due to the logs’ complexity and the need to combine information from different logs. Traditional clustering methods also struggle with lithofluid type inference due to differing depth trends in petrophysical rock properties stemming from compaction and diagenesis. We introduce a rock-physics machine-learning workflow that automates lithofluid classification and property depth trend modeling to address these challenges. This workflow uses a maximum-likelihood approach, explicitly accounting for depth-related effects via rock-physics models (RPMs) to infer lithofluid types from borehole data. It uses a robust expectation-maximization algorithm to associate each lithofluid type with a specific RPM instance constrained within physically reasonable bounds. The workflow directly outputs lithofluid type proportions and type-specific RPMs with associated uncertainties, providing essential prior information for seismic inversion.