Downloads · 30 days
4
2% of all-time downloads
TWLab/femtosecond-laser-hydrogel-etching-model
femtosecond-laser-hydrogel-etching-model is a reinforcement learning model from TWLab. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3. The card lists the license as apache-2.0.
An ML system combining a surrogate prediction model (XGBoost + Neural Network ensemble) with a Reinforcement Learning optimizer (SAC) for femtosecond laser hydrogel etching parameter optimization.
Downloads · 30 days
4
2% of all-time downloads
All-time downloads
177
Public
Repo size
1.1 MB
Likes
1
Public
Click a slice to open those files.
.json31.6 MB · 96%
From the Hugging Face model README
An ML system combining a surrogate prediction model (XGBoost + Neural Network ensemble) with a Reinforcement Learning optimizer (SAC) for femtosecond laser hydrogel etching parameter optimization.
Focus materials: GelMA and HAMA (65% of 12,000 training samples)
┌──────────────────────────────────────────────────────────────────┐
│ SAC RL Agent (Parameter Optimizer) - 100% Success Rate │
│ • Observes: current params + predicted geometry + target │
│ • Actions: parameter deltas (±15% of range per step) │
│ • Reward: improvement + proximity + goal bonus │
│ • Converges in ~4 steps to target geometry │
├──────────────────────────────────────────────────────────────────┤
│ XGBoost + NN Ensemble (Surrogate Environment) │
│ • XGBoost: 600 trees, depth 7, per-target │
│ • Neural Network: [128, 64, 32], BatchNorm, Dropout │
│ • Weighted ensemble: 60% XGB + 40% NN │
└──────────────────────────────────────────────────────────────────┘
| Target | R² | MAE |
|---|---|---|
| etch_depth_um | 0.9745 | 1.05 µm |
| etch_width_um | 0.9845 | 2.33 µm |
| surface_roughness_Sa_um | 0.8409 | 28.18 |
| aspect_ratio | 0.7074 | 0.49 |
| side_wall_angle_deg | 0.9326 | 4.03° |
| Metric | Value |
|---|---|
| Success rate | 100% |
| Avg relative error | 0.107 |
| Avg absolute error | 2.60 µm |
| Convergence speed | ~4 steps |
| Algorithm | SAC (γ=0.7, lr=1e-3) |
| Training timesteps | 20,000 |
Based on published RL-for-laser research:
| Variant | Water Content | Threshold Fluence | Young's Modulus |
|---|---|---|---|
| GelMA 5% | 92% | 1.8 J/cm² | 3.5 kPa |
| GelMA 7% | 89% | 1.4 J/cm² | 8 kPa |
| GelMA 10% | 85% | 1.0 J/cm² | 18 kPa |
| GelMA 15% | 80% | 0.7 J/cm² | 45 kPa |
| GelMA 20% | 75% | 0.5 J/cm² | 90 kPa |
| Variant | Water Content | Threshold Fluence | Young's Modulus |
|---|---|---|---|
| HAMA 1% | 96% | 2.5 J/cm² | 1.2 kPa |
| HAMA 2% | 94% | 2.0 J/cm² | 3.5 kPa |
| HAMA 3% | 92% | 1.6 J/cm² | 8 kPa |
| HAMA 5% | 88% | 1.2 J/cm² | 20 kPa |
GelMA5+HAMA1, GelMA7+HAMA2, GelMA10+HAMA3, GelMA15+HAMA5
PEG, PEGDA, Collagen, Alginate, Silk fibroin
power_mW, repetition_rate_kHz, scan_speed_mm_s, pulse_duration_fs,
wavelength_nm, num_passes, spot_diameter_um, focal_offset_um
water_content, threshold_fluence_J_cm2, absorption_depth_nm,
incubation_coefficient, refractive_index, youngs_modulus_kPa,
degree_of_methacrylation, crosslink_density_mol_m3, two_photon_cross_section_GM
pulse_energy_uJ, peak_fluence_J_cm2, effective_pulses, overlap_percent
import xgboost as xgb, torch, joblib, numpy as np
# Load models
scaler_X = joblib.load("scaler_X.joblib")
scaler_y = joblib.load("scaler_y.joblib")
xgb_models = {t: xgb.XGBRegressor() for t in targets}
for t in targets: xgb_models[t].load_model(f"xgb_{t}.json")
# Predict
features = [200, 1000, 1.0, 200, 800, 5, 10, 0, ...] # 21 features
xgb_pred = np.array([xgb_models[t].predict([features])[0] for t in targets])
from stable_baselines3 import SAC
sac = SAC.load("sac_optimizer_v2")
# Set target: depth=10µm, width=20µm
# Agent finds optimal: power, rep_rate, speed, passes, spot_diameter
obs = env.reset(target=[10, 20])
for step in range(20):
action, _ = sac.predict(obs, deterministic=True)
obs, reward, done, _, info = env.step(action)
if done: break
# Optimized params available in env.params
12,000 samples with physics-informed synthetic data grounded in:
Available at: TWLAb/femtosecond-laser-hydrogel-etching-data
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.