Cleansing foam is a common multicomponent polymeric functional material. It contains ingredients in innumerable combinations, which makes formulation optimization challenging. In this study, we used artificial intelligence (AI) with machine learning to develop a cleansing capability prediction system that considers the effects of self-assembled structures and chemical properties of ingredients. Over 500 cleansing foam samples were prepared and tested. Molecular descriptors and Hansen solubility index were used to estimate the cleansing capabilities of each formulation set. We used five machine-learning models to predict the cleansing capability. In addition, we employed an in silico formulation by generating virtual formulations and predicting their cleansing capabilities using an established AI model. The achieved accuracy was R2 = 0.770. Our observations revealed that mixtures of cosmetic ingredients exhibit complex interactions, resulting in nonlinear behavior, which adds to the complexity of predicting cleansing performance. Nevertheless, accurate chemical property descriptors, along with the aid of in silico formulations, enabled the identification of potential ingredients. We anticipate that our system will efficiently predict the chemical properties of polymer-containing blends.