You know the scene. The oil phase needs a required HLB of about 11, so you blend a Span and a Tween to land there, build the emulsion, and it looks perfect at room temperature. Three weeks later the stability chamber at 45 °C hands you a creamed, phase-separated sample, and two other blends with the same calculated HLB behaved completely differently. The HLB system did exactly what it was designed to do in the 1950s: narrow a list. It was never meant to predict which of 36 candidate blends survives freeze-thaw cycling, a 2% electrolyte load, or a change in homogenizer shear. That gap between "right HLB" and "stable product" is where formulation AI earns its place in a surfactant selection workflow, and this guide walks through how it actually works, what data it needs, and where the formulator still has the final word.
Why HLB Alone Fails in Real Surfactant Selection
Griffin's HLB scale was built around nonionic ethoxylated surfactants. It assigns a number from the weight fraction of the hydrophilic portion and matches it against a "required HLB" of the oil. That works reasonably well as a first filter, and it fails for predictable reasons. Ionic surfactants do not fit the scale at all; their assigned values are empirical workarounds. The required HLB of an oil is itself a rough average: a mineral oil may be listed at 10–11, but ester oils, silicone fluids, and vegetable oils shift with purity, chain-length distribution, and the presence of polar impurities. Temperature is invisible to HLB, even though ethoxylated surfactants dehydrate as temperature rises and pass through a phase inversion temperature where the emulsion flips. Electrolytes compress the electrical double layer around charged droplets and change the effective behavior of nonionics. Co-surfactants, fatty alcohols, and polymeric stabilizers change interfacial packing in ways a single number cannot capture.
Then there is process. Two batches with identical compositions can give different droplet size distributions depending on addition order, shear rate, and the temperature at which the surfactant is dissolved. A formulator who has made 200 emulsions carries this knowledge intuitively. The problem is that the knowledge lives in the formulator, not in a system, and when the project moves to a new oil phase or a new line, the intuition has to be rebuilt by trial and error.
What a Formulation AI Model Learns From
A machine learning model does not replace HLB; it treats HLB as one feature among many. A practical surfactant-selection model for emulsions typically uses three groups of inputs. The first describes each surfactant: HLB, ionic class, hydrophobic chain length, number of ethylene oxide units, critical micelle concentration, and, where available, a molecular descriptor set or fingerprint. The second describes the oil phase and continuous phase: polarity, viscosity, Hansen solubility parameters, electrolyte concentration, pH, and the ratio of oil to water. If you have not already used them, the earlier post on where Hansen solubility parameters work and where they break down explains why they are useful as model features rather than as standalone rules. The third group is process: homogenization shear or energy input, emulsification temperature, addition order, and total surfactant loading.
The targets are whatever your lab already measures: mean droplet size and span after manufacture, creaming index after accelerated aging, viscosity drift, or a pass/fail stability score at a defined time and temperature. Tree-based models such as Random Forest and XGBoost handle this kind of mixed tabular data well with a few hundred records, and they expose feature importance so the formulator can see whether electrolyte load or EO units is driving the prediction. Neural networks become worthwhile only when the dataset is larger and more diverse. The companion guide on predicting emulsion stability with machine learning covers the target definitions in more depth; here the focus is on the surfactant choice upstream of that prediction.
| Criterion | HLB rule of thumb | Formulation AI model |
|---|---|---|
| Inputs considered | One number per surfactant, one per oil | Surfactant, oil, aqueous phase, and process descriptors together |
| Temperature and PIT | Ignored | Learned if emulsification and aging temperatures are recorded |
| Ionic and polymeric surfactants | Empirical values only | Handled through class and descriptor features |
| Blend interactions | Assumed linear by weight | Non-linear interactions captured from data |
| Data required | None | Typically 100–300 structured batch records |
| Output | A target HLB range | Ranked blends with predicted stability and uncertainty |
The honest reading of this table is that the rule of thumb costs nothing and the model costs data. The question for an R&D manager is whether the lab already has that data sitting in batch records and stability logs. In most mid-size formulation groups, it does, in spreadsheets that have never been joined together.
A Six-Step Workflow for Formulation AI in Surfactant Selection
The workflow below is the one that tends to work on the first project, before anyone talks about autonomous experimentation.
Step one is usually the slowest and the least glamorous. Stability results often live in a separate file from the formulation sheet, and the join key is a batch number that someone typed by hand. Step two is where domain knowledge enters: the formulator decides which descriptors are meaningful, and that choice matters more than the algorithm. Step three should include a holdout set of batches the model has never seen; a model that scores well only on its training data will embarrass you at the bench. Step four is the payoff: instead of mixing 36 blends, you ask the model to rank them and return the predicted creaming index for each along with a confidence interval.
Step five is where ML and classical DOE complement each other rather than compete. The model narrows a wide candidate space to a small region; a mixture design or definitive screening design then maps that region with real experiments and catches anything the model got wrong. Step six closes the loop, and each project after that starts with a stronger model than the one before.
An Anonymized Scenario: 36 Candidate Blends, 8 Bench Runs
Consider a personal-care formulation team asked to replace a petrolatum-based oil phase with a blend of ester and vegetable oils for a body lotion, keeping the existing emulsifier portfolio of 14 approved surfactants. The required HLB of the new oil phase was estimated at 9–12, which still left 36 reasonable two- and three-component blends once ratios were considered. The traditional path would have been to make all 36, age them for four weeks, and pick the survivors.
The team instead consolidated 214 historical batch records from the last three product lines, each with an oil composition, surfactant blend, process conditions, and a four-week creaming index at 45 °C. They used a no-code modeling interface on ChemCopilot to train an XGBoost model on those records, with HLB, EO count, ionic class, oil polarity, and emulsification temperature as the leading features. Feature importance surprised them: emulsification temperature relative to the estimated phase inversion temperature carried more weight than the HLB mismatch itself, which explained two historical failures nobody had been able to rationalize. The model ranked the 36 blends and flagged 8 as worth testing, with the top 3 clustered around a specific ester-to-vegetable oil ratio. Those 8 went into a small mixture design on the bench. Two of the top three predictions passed the four-week aging test; one failed, and that failure went back into the training set. Screening time dropped from an estimated six weeks of bench and chamber time to under two, and the next project started with 222 records instead of 214.
The numbers in this scenario are illustrative of what a team with a few hundred structured records can reasonably expect, not a guarantee. The result that transfers is the pattern: the model did not pick the surfactant, it told the formulator where not to waste beakers.
Where ML Still Needs the Formulator
A model trained on nonionic emulsifiers in O/W lotions will say something about a cationic surfactant in a W/O system, and whatever it says should be treated as noise. Extrapolation beyond the chemistry in the training data is the most common way these projects fail, and the fix is a model that reports its own uncertainty and a formulator who reads it. Phase inversion temperature, interfacial tension, and zeta potential are still measured, not predicted, unless the lab has the data to support that step. And a ranked list of blends is only as good as the descriptors the team chose; a model cannot learn the effect of a fatty alcohol co-emulsifier if nobody recorded it.
The practical division of labor is simple. The model handles the combinatorics and the pattern recognition across hundreds of past batches. The formulator handles the chemistry judgment, defines what "stable" means for the product, and decides which predictions deserve a bench run. Neither one works well alone.
FAQ
Does a formulation AI model replace HLB calculations?
No. HLB remains a useful input feature and a sanity check. The model adds temperature, electrolyte, oil polarity, blend interactions, and process effects that HLB cannot represent, and it ranks candidates rather than returning a single target number.
How many batch records do I need before surfactant selection models are useful?
Tree-based models such as Random Forest and XGBoost typically become useful in the range of 100–300 structured records with consistent targets. Below that, a definitive screening design on the bench is usually a better first step than a model.
Can this be done without coding?
Yes. No-code ML modeling platforms built for chemical data let a formulator upload a structured spreadsheet, select features and targets, train models, and view feature importance and predictions without writing Python.
Which stability targets work best as model outputs?
Continuous targets such as creaming index, mean droplet size, or viscosity drift after a defined aging protocol are preferable to a pass/fail flag. They give the model more information per record and allow the formulator to see how close a borderline blend was.
Key Takeaways
HLB narrows the search but cannot predict which blend survives real aging and process variation. A formulation AI model trained on your own batch and stability records captures the interactions HLB ignores, ranks candidate surfactant blends before any beaker is filled, and pairs naturally with a small DOE on the top-ranked region. The data for that first model is almost certainly already in your lab.
If your team is screening surfactant blends by hand and the stability chamber is the bottleneck, talk to us about building your first surfactant selection model from existing batch records.