Automated Design for Polypills
- The paper introduces an automated framework that co-optimizes pill geometry and material layout to achieve precise drug-release profiles.
- It employs a supershape parameterization combined with a neural network-based mapping for excipient distribution to navigate high-dimensional design spaces.
- Integrating differentiable simulation with gradient-based optimization, the framework achieves low mean-squared error in meeting prescribed release kinetics.
Automated design frameworks for polypills employ computational methods to systematically co-optimize the geometry and spatial material distribution of single-dose oral formulations containing multiple active pharmaceutical ingredients and excipients. These frameworks transcend traditional ad hoc parameter-sweep approaches by enabling the systematic exploration and gradient-based optimization of high-dimensional design spaces defined by pill shape, excipient placement, and multi-phase drug release kinetics. Recent advances in additive manufacturing permit the physical realization of multi-material, patient-specific polypills, provided that their compositional and geometrical complexity can be robustly connected to desired therapeutic release profiles via physics-informed computational pipelines (Padhy et al., 9 Dec 2025).
1. Problem Motivation and Conventional Limitations
Modern polypills target coordinated, fixed-dose combination therapies and patient-customized pharmacokinetic profiles by integrating multiple APIs and excipients within a single oral dosage form. Additive manufacturing (AM) now allows for spatially heterogeneous, multi-material fabrication, greatly expanding the feasible design space for both geometry and composition. However, prevailing design practices rely on low-dimensional parameter sweeps, iteratively adjusting geometric or compositional variables to approximate target dissolution and release behaviors.
The primary limitations of these traditional approaches include:
- Scalability: Ad hoc parameter sweeps are not tractable in the intrinsically high-dimensional space of possible shapes and material layouts.
- Lack of formal guarantees: These methods provide no assurance that a prescribed, often tightly constrained release curve can be matched with available materials and shapes.
- Limited co-optimization: Current workflows rarely support the simultaneous optimization of geometry and material distribution at fine spatial resolution.
This context motivates the development of automated design frameworks, exemplified by PILLTOP, which couple physics-informed, differentiable simulation with topology optimization (TO) to robustly meet arbitrarily specified drug-release kinetics (Padhy et al., 9 Dec 2025).
2. Supershape Parametrization of Pill Geometry
The geometric freedom required for advanced polypill optimization is achieved with a generalized Gielis “supershape” function. The outer 2D topology is defined in local polar coordinates by the boundary radius
with the parameters (axes scales), (rotational symmetry), and (curvature exponent). The supershape is then affine-transformed (translation, rotation) with centroid and angle .
A smooth phase-field “distance” function is constructed as
which is mapped to a sharp indicator via (), resulting in inside the pill and outside.
The set of seven supershape design variables
are bounded and optimized via a latent-space to sigmoid transformation. This parameterization provides strong geometric expressivity while remaining low-dimensional and differentiable.
3. Neural Network-Based Excipient Distribution
Material distribution within the supershape-defined pill domain is encoded using a coordinate-based multi-layer perceptron (MLP). For excipient types, the architecture takes coordinates (within the pill, ), applies a Fourier feature mapping to the input, and employs two hidden ReLU layers with 40 neurons each, culminating in a Softmax output of dimension . The output function
enforces non-negativity and the partition of unity, while the neural weights serve as design variables. Initialization is uniform: .
This continuous, mesh-independent representation supports analytic gradient computation , allowing end-to-end optimization. Discrete material assignment is encouraged using grayness constraints (see Section 5), ensuring near-discrete allocation of excipient types.
4. Coupled Dissolution–Diffusion Simulation
Release kinetics are governed by a coupled system of transient partial differential equations (PDEs) defined on the pill and solvent domain :
a) Phase-Field Dissolution (modified Allen–Cahn):
with and . Here , is the solid density, and saturation concentration. Initial is the projected pill shape.
b) API Diffusion in Solvent (Fick's law):
with boundary condition (infinite sink) and initial zero concentration. The effective diffusivity is , . Source term is .
Spatial discretization uses bilinear quadrilateral finite elements, temporal discretization is backward Euler. The resulting nonlinear system is solved by Newton-Raphson iterations at each time step (Padhy et al., 9 Dec 2025).
5. Optimization Problem Formulation
The design optimization aims to match a prescribed instantaneous mass-release rate . The joint design variable set comprises supershape latents and NN weights . At discrete times :
- Mass release rate:
- Objective: Minimize the mean-squared error
Subject to:
- Grayness suppression: encourages discrete assignments,
- Minimum excipient volume fractions:
constraints are aggregated via smooth-min .
These constraints are incorporated via a log-barrier:
with and continuation schemes for , .
Optimization is performed by unconstrained gradient descent (Adam), co-optimizing both the geometry and material variables.
6. Computational Implementation with Automatic Differentiation
The entire PILLTOP pipeline operates within JAX, supporting high-performance computation and end-to-end differentiability. Pipeline components include:
- Supershape projection ()
- Neural material mapping ()
- FE mesh mapping and assembly
- Time-stepped, Newton-solved PDEs
- Mass release and loss computation
Reverse-mode automatic differentiation (AD) is employed throughout, with the Implicit Function Theorem (IFT) used to differentiate through the final converged nonlinear system (not through all Newton iterations). Transient adjoint gradient computation exploits state checkpointing for efficient memory use. Hyperparameters typical of the framework include Adam with learning rate 8×10⁻³ and gradient clipping, with grayness slack and barrier weight scheduled over the iterations. Optimization of 100 steps typically completes in 30 minutes on a standard laptop, averaging about 10 Newton solves per time step over 100 time steps (Padhy et al., 9 Dec 2025).
7. Empirical Validation and Case Studies
The framework demonstrates its capabilities across a series of case studies:
- Single-excipient polypill: For monotonic release objectives, optimization of geometry alone (no NN) achieved error to the target release, yielding a smooth, capsule-like supershape.
- Multi-material, non-monotonic release: Single-material TO failed on non-monotonic profiles (e.g., slow–spike–decay), whereas supershape + NN topology optimization (TO) achieved mean-squared error (MSE) by spatially arranging fast and slow excipients.
- Sensitivity to initialization: Diverse initial supershape guesses ("spike," "circle," "sunflower") converged to distinct, locally optimal topologies but produced nearly identical release curves (MSE ), allowing post hoc selection for secondary design criteria (e.g., comfort).
- Robustness to material degradation: With three grades of excipients (fresh, moderate, heavily aged, with decreasing ), and minimum-use constraints (e.g., aged), the optimizer adjusted allocations to approximately match the prescribed release, demonstrating resilience to on-demand manufacturing constraints.
In all scenarios, the framework consistently produced solutions aligning with the prescribed drug-release profiles within practical computational budgets (Padhy et al., 9 Dec 2025).