Inspiration
What it does
Inspiration Concrete is everywhere, and cement, the glue that holds it together, is responsible for about 8% of global CO₂ emissions (Chatham House, 2018). The frustrating part is that greener mixes already exist. Industrial byproducts like slag from steel making and fly ash from coal power can replace a large share of the cement. So why does most concrete still use the same cement heavy recipes?
The answer turned out to be time. Concrete strength is usually verified by casting a cylinder and crushing it after 28 days. Change the recipe, and you need new evidence it will hold the building up. Faced with a four week wait and real liability, most projects pour what worked last time, and the carbon gets locked in.
We wanted to attack that bottleneck. Not by replacing physical testing, but by helping engineers pick which greener recipe is worth testing in the first place.
What it does MixLab is a browser tool for mix design. An engineer enters the spec they already have: required strength $f'_c$, test age, maximum water to cementitious ratio, allowed materials, and project requirements like exposure class, early strength and pour volume. MixLab then:
Reviews the requirements. Exposure classes tighten the spec using ACI 318 limits (for example, freeze thaw with deicing salts raises the minimum strength to 5,000 psi and caps $w/cm$ at 0.40). Predicts strength with an ensemble of five gradient boosted tree models trained in the browser on 1,030 published lab tests. Searches about 9,000 candidate recipes and returns the lowest carbon one that still clears a safety margin. Produces a batch ticket, a requirements review and a submittal PDF, ready for a trial batch. For a standard 35 MPa mix at 28 days, the leanest cement only recipe comes out at 343.53 kg CO₂/m³, and MixLab's candidate at 171.76 kg CO₂/m³: about half the estimated carbon for the same strength requirement. A built in assistant, Ask MixLab, explains the result and reruns what if questions ("what if we test at 56 days?", "what if there's no fly ash?") with one click to apply.
How we built it Everything runs client side as a static site, with no backend, no build step and no CDN, so it works offline.
The model. We wrote gradient boosted regression trees from scratch in JavaScript. Each model is built by repeatedly fitting a shallow tree h m h m to the residuals of the current prediction:
F m ( x
)
F m − 1 ( x ) + η h m ( x ) F m (x)=F m−1 (x)+ηh m (x)
The inputs are the seven ingredient masses plus engineered features that encode concrete science: log ( age ) log(age), water to binder ratio, water to cement ratio, total binder, SCM fraction and superplasticizer dose. Abrams' law says strength falls as the water to cement ratio rises, and the model learned on its own that age and w / b w/b matter most.
Honest validation. The dataset (Yeh, 1998, UCI) contains the same recipe tested at several ages. A naive random split leaks those recipes across train and test and inflates accuracy. We group identical recipes and use grouped 5 fold cross validation, so a recipe is never in both training and testing. The five fold models then double as the ensemble. On held out tests: R
2
0.89 R 2 =0.89 and a mean absolute error of 3.8 MPa.
The safety margin. A prediction alone isn't enough to design with. Following the ACI 318 approach for required average strength, a candidate must reach
f c r
′
f c ′ + 1.34 σ ,
σ
σ model 2 + s ens 2 f cr ′ =f c ′ +1.34σ,σ= σ model 2 +s ens 2
where σ model σ model is the cross validated error and s ens s ens is how much the five models disagree on that particular recipe. Uncertain recipes automatically need more strength headroom.
The optimizer. Each candidate must be exactly 1 m³ by absolute volume,
∑ i m i ρ
i
1
m 3 , i ∑
ρ i
m i
=1 m 3 ,
and its embodied carbon is
CO
2
∑ i m i e i , CO 2 = i ∑ m i e i ,
where m i m i is the mass and e i e i the emission factor of each ingredient. The search runs a random exploration phase, then refines around the best feasible recipes with shrinking perturbations. Crucially, it rejects any candidate whose nearest real tested recipe (in standardized ingredient space) is too far away, which keeps the optimizer inside the data the model has actually seen instead of exploiting gaps in it.
The experience. The interface is a construction style workbench with a docked spec inspector, a batch ticket in kg/m³ or lb/yd³, and a requirements review table that marks each item Applied, Pass, Check or Noted. The landing page is a real time canvas physics simulation: 1,030 grains, one per lab test, pour into a pile, and the cement grains convert into slag and fly ash while the CO₂ counter falls from 344 to 172. Our pitch deck embeds the live tool and drives it from the slides.
Challenges we ran into Data leakage. Our first accuracy numbers looked great and were wrong, because repeated recipes leaked across folds. Switching to grouped cross validation lowered the score and made it trustworthy. Optimizers exploit models. An unconstrained search happily found "miracle" recipes in regions with no training data. The trust region based on nearest tested recipes fixed that. Cost is a weak objective. We built a lowest cost mode, but the optimizer was unreliable there, so we cut it rather than ship something we couldn't stand behind. MixLab always optimizes for carbon and reports cost honestly: the greener mix costs about $20.31 more per m³ under illustrative prices. Not overselling. It is tempting to say "half the carbon." We made sure every number traces back to the engine or a cited source, and every result is labeled a model prediction that still needs a trial batch and cylinder breaks. The requirements review even flags its own recipes when they exceed ACI 318 limits on supplementary materials. Physics that settles. The grain simulation (Verlet integration with a spatial hash) kept boiling and jittering until we added substeps, contact friction and a speed cap so the pile comes to rest. Everything in the browser. Training five models and running thousands of predictions has to stay responsive, so training yields to the UI between steps and starts as soon as the page loads. What we learned How gradient boosting actually works, by implementing it ourselves instead of calling a library. That validation design matters as much as the model: how you split the data decides whether your accuracy number means anything. How concrete is really specified, from f c r ′ f cr ′ margins to exposure classes, and why the 28 day test makes the industry slow to change. That trust is the product. Engineers won't adopt a recipe because a model says so; they need to see the margin, the closest real test and the limits. What's next Find one local concrete producer, cast the MixLab candidate and the cement only mix side by side, and break cylinders at 7, 28 and 56 days. Right now, 42.6 MPa is a prediction. We'll publish the measured number either way.
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for MixLab
Built With
- claude
Log in or sign up for Devpost to join the conversation.