Respect Every Rule: Constraint-Based AI Formulation Design Guide

Share with friends

Why the Best AI Formulation Outputs Are the Ones That Never Violate a Rule in the First Place

A formulation optimizer that proposes better-performing candidates is only useful if those candidates are actually legal, manufacturable, physically consistent, and procurable. In real industrial work, the hard problem is not “find a high-performing mixture.” It is “find a high-performing mixture that honors thousands of simultaneous constraints — mass closure, REACH restrictions, FDA thresholds, thermodynamic compatibility, solubility limits, process-window temperatures, supplier availability, customer specifications, IP freedom-to-operate.” This is constraint-based design, and it is where modern AI formulation platforms either earn or lose their seat at the table. Platforms like Simreka treat constraints as first-class citizens — not as filters applied after optimization, but as hard boundaries that shape the search itself.

Recent work reinforces this. HANNA, a 2026-published machine learning model for excess Gibbs energy, integrates physical laws as hard constraints to guarantee thermodynamically consistent predictions in multi-component mixtures. Constraint-based AI fuel-mixture design treats the inverse problem as a constrained optimization over chemical space with property targets and composition closure. Pharmaceutical studies have quantitatively shown that the way regulatory constraints are formulated changes the design outcome — a reminder that constraints are not bureaucratic overhead; they are load-bearing parts of the model.

Five Families of Constraints Every Formulation Must Satisfy

1. Compositional (Mixture) Constraints

Component mass fractions must sum to 1 (the simplex constraint), and each component has lower and upper bounds. Certain ingredients may be mutually exclusive (they react or phase-separate), and others may have mandatory pairings (a dispersant requires a stabilizer). Standard mixture-design response-surface methods encode these geometrically; AI approaches typically parameterize the simplex interior directly or use softmax outputs on neural networks.

2. Thermodynamic and Physical Constraints

Phase behavior, solubility, viscosity, pH windows, miscibility, and thermal stability are all physical constraints. Violating them produces formulations that look optimal on paper but break in practice. HANNA (2026, Nature Communications) is a recent example of an ML model designed from the ground up to respect thermodynamic consistency — its training integrates Gibbs–Duhem relations so predictions can’t violate first-principles physics.

3. Regulatory Constraints

REACH (EU), ESPR (EU, phased enforcement from 2026), FDA (US food/pharma), TSCA (US industrial chemicals), OSHA (US occupational exposure), regional cosmetic inventories (IECIC, China IECSC), and substance-of-very-high-concern (SVHC) lists all impose hard exclusions or maximum loadings. A formulation that passes optimization but fails REACH has cost millions in wasted development.

4. Economic and Procurement Constraints

Maximum cost per kg, minimum supply-chain resilience (dual-sourcing), and mass-balance allocations for renewable or recycled content are economic constraints. They interact with performance and sustainability constraints in non-obvious ways: the cheapest biobased input may be single-sourced and non-resilient.

5. Process and Equipment Constraints

Viscosity ceilings for pumpability, cure-temperature windows, mixer shear capabilities, residence-time limits, and reactor compatibility all constrain what can be produced at scale. Formulations that ignore process windows succeed in the lab and fail at the plant.

How AI Handles Constraints: A Survey of Techniques

Technique Constraint Type Handled Strength Limit
Penalty functions Soft constraints of any type Simple, universal Requires tuning penalty weights; can mask feasibility
Constraint dominance (Deb) Hard feasibility in evolutionary MOO No parameter tuning Needs explicit feasibility classifier
Projection onto simplex Compositional closure Guaranteed mass balance Only compositional
Constrained Bayesian optimization Expensive-to-evaluate constraints Sample-efficient, handles unknown feasibility Scales with dimension
Lagrangian / KKT in gradient descent Equality + inequality with gradients Classic, well understood Needs differentiable constraints
Hard-coded architecture (HANNA-style) First-principles physics Guaranteed consistency Constraint-specific model design
Rule-based regulatory screens REACH, ESPR, FDA exclusions Interpretable, auditable Requires maintained rule base
Mixed-integer programming Discrete choices (supplier, grade) Proven optimality Scales poorly with dimension

Constrained Bayesian Optimization in Practice

When constraints are expensive to evaluate (a wet-lab feasibility test, a regulatory screen), constrained Bayesian optimization models both the objective and the constraint probabilistically. Acquisition functions such as Constrained Expected Improvement (cEI) or Expected Improvement with Constraints (EIC) weight candidate selection by the probability of feasibility. This is the dominant method for industrial formulation problems with a small number of physical experiments.

Hard vs. Soft Constraints

Hard constraints must never be violated (regulatory exclusions, mass closure, thermodynamic stability). Soft constraints express preferences with costs (cheaper supply, lower footprint). Mis-classifying a regulatory rule as soft is among the most common and damaging modeling errors. Build a clear taxonomy before writing the optimizer.

A Real-World Example: Concrete Mixture Design with Low Cost and Embodied CO₂

A 2024 ScienceDirect paper applied generative AI and constrained optimization to concrete mixture design targeting low cost and low embodied CO₂. The problem includes compositional constraints (cement, aggregates, admixtures sum to 1), performance constraints (minimum compressive strength, workability), environmental constraints (embodied-carbon ceiling), and procurement constraints (max cement content for cost). The AI framework treated every constraint as a hard boundary and searched the feasible region with a generative model, producing Pareto-optimal mixes that satisfy all constraints simultaneously — an approach generalizing across construction, coatings, and polymer composites.

A Practical Constraint Taxonomy for a Formulation Project

Constraint Type Source Handling Approach
Mass fractions sum to 1 Hard equality Physics Simplex projection
No SVHC substance above 0.1% Hard REACH Rule-based screen
Viscosity < 5,000 cP at 25°C Hard inequality Process Constrained BO
Biobased content > 40% Hard inequality Commercial claim Constraint dominance
Minimize cost per kg Soft (objective) Commercial Multi-objective optimization
Minimize cradle-to-gate GWP Soft (objective) Sustainability Multi-objective optimization
At least 2 suppliers for each major input Hard Procurement resilience MIP constraint
Thermodynamic stability Hard Physics HANNA-style ML model

How Simreka Encodes Constraints

Simreka’s AI-Powered Formulation Generator ingests constraints from multiple sources and feeds them directly into the optimizer: compositional and process constraints as explicit bounds, performance targets as Bayesian-modelled quantities, and regulatory rules as hard filters. Simreka’s Virtual Experiment Platform evaluates thermodynamic, rheological, and stability constraints in silico so infeasible candidates are eliminated before any wet-lab spend. Simreka’s Databank injects real supplier-specific procurement constraints (availability, minimum order quantities, dual-sourcing) so the “optimal” candidate is also buyable, and MatIQ keeps the active rule base for REACH, ESPR, FDA, TSCA, and regional inventories visible and auditable to the formulator.

Pitfalls in Constraint Modeling

Under-specified Feasibility

Leaving a constraint implicit (“of course we need it to be non-toxic”) and not encoding it formally guarantees violations. Every constraint relevant to acceptance must be expressed to the optimizer.

Hard-Coded Soft Constraints

Turning a preference into a hard constraint over-constrains the feasible region and produces empty results. Be disciplined about what is negotiable.

Stale Regulatory Data

REACH candidate lists, ESPR delegated acts, and FDA updates change frequently. Static rule bases go stale; maintained rule bases are essential.

Inconsistent Units and Conventions

Mass fraction vs. volume fraction, weight vs. mole, anhydrous vs. hydrated — unit mismatches produce wrong answers silently. Standardize upstream.

Ignoring Constraint Interactions

Two individually feasible constraints can produce an empty feasible region when combined. Use feasibility diagnostics to detect empty intersections before wasting compute on optimization.

Conclusion

Constraints are not speed bumps; they are the terrain on which formulation optimization operates. The AI methods that win in 2026 are the ones that encode compositional, thermodynamic, regulatory, economic, and process constraints as first-class objects — hard-coded where necessary, modeled probabilistically where uncertain, and maintained as live data feeds for regulatory change. Constraint-based AI formulation is the difference between a mathematically impressive prototype and a commercially deployable product. Treat constraints with the same rigor as objectives, and the optimizer will stop proposing recipes your regulatory, procurement, and manufacturing teams have to throw away.

Frequently Asked Questions

Q1. What distinguishes a hard constraint from a soft constraint?

A hard constraint must never be violated (regulatory exclusions, mass closure, thermodynamic stability). A soft constraint is a preference with a cost that can be traded against other preferences (lower price, smaller footprint). Mis-classifying them is a common and expensive error, which is why Simreka’s AI-Powered Formulation Generator exposes the taxonomy explicitly to the formulator.

Q2. Can AI handle thousands of constraints at once?

Yes, but efficiency depends on constraint structure. Rule-based regulatory exclusions are cheap to evaluate; expensive-to-evaluate constraints (wet-lab feasibility) require constrained Bayesian optimization. Well-structured constraint sets are handled at industrial scale by MatIQ and similar production platforms.

Q3. How does constrained Bayesian optimization differ from classic BO?

Classic BO models the objective probabilistically. Constrained BO also models the constraints, computing a probability of feasibility for every candidate and weighting the acquisition function accordingly. The result is sample-efficient search in constrained spaces, exposed in production via tools like Simreka’s Virtual Experiment Platform.

Q4. What is the HANNA model and why does it matter?

HANNA is a 2026 ML model for excess Gibbs energy that embeds thermodynamic consistency (Gibbs–Duhem relations) as hard architectural constraints. It represents the best practice for physics-aware ML: instead of hoping the model learns physics from data, you guarantee it via model design. Predictions cannot violate first-principles rules, and equivalent physics-aware surrogates underpin Simreka’s Virtual Experiment Platform.

Q5. How do I keep regulatory constraints current?

Use a maintained rule base, ideally from a platform vendor that tracks REACH, ESPR, FDA, and regional updates. Set a cadence (quarterly at minimum) for reviewing constraint sources and re-running baseline screens against updated rules — the maintained rule base inside Simreka’s Databank is one production-ready example.

Q6. What happens if my feasible region is empty?

Run a feasibility diagnostic: soften constraints one at a time to identify which is infeasible in combination with the rest. The right answer is often relaxing a soft constraint, not silently ignoring a hard one — a Simreka demo walks through this diagnostic on a real brief.

Bibliographical Sources

  1. Nature Communications. “Thermodynamically consistent machine learning model for excess Gibbs energy” (HANNA). https://www.nature.com/articles/s41467-026-71430-y
  2. Nature Communications Chemistry. “Artificial intelligence-driven design of fuel mixtures.” https://www.nature.com/articles/s42004-022-00722-3
  3. ScienceDirect. “Generative artificial intelligence and optimisation framework for concrete mixture design with low cost and embodied carbon dioxide.” https://www.sciencedirect.com/science/article/pii/S0950061824039783
  4. ScienceDirect. “Relevance of regulatory constraints in designing pharmaceutical manufacturing processes.” https://www.sciencedirect.com/science/article/abs/pii/S2352550918301040
  5. MDPI Pharmaceutics. “Artificial Intelligence (AI) in Pharmaceutical Formulation and Dosage Calculations.” https://www.mdpi.com/1999-4923/17/11/1440
  6. npj Computational Materials. “Leveraging high-throughput molecular simulations and machine learning for the design of chemical mixtures.” https://www.nature.com/articles/s41524-025-01552-2
  7. ChemCopilot. “Formulation Machine Learning Tools: How AI Is Optimizing Chemical Synthesis and Product Performance.” https://www.chemcopilot.com/blog/formulation-machine-learning-tools-how-ai-is-optimizing-chemical-synthesis-and-product-performance
  8. arXiv. “Molecular Machine Learning in Chemical Process Design.” https://arxiv.org/html/2508.20527v1

Put Every Constraint in Front of the Optimizer, Not After

Simreka’s AI-Powered Formulation Generator treats mass balance, regulatory exclusions, thermodynamic consistency, and procurement rules as first-class inputs to the search — not as post-hoc filters that waste experimental budget. See how a fully constrained workflow eliminates the late-stage reformulations that kill most product programs.

Request a Simreka Demo →

Tag Cloud


Share with friends