# An Introduction to Optimization and Machine Learning > An overview created by the Tsay Group at Imperial College London. --- ## 1. What are optimization and machine learning? **Optimization** is about making the best possible decision subject to constraints. We choose decision variables (what we can control), define an objective (what we want to maximize or minimize, such as cost or profit), and impose constraints (the model of the system, physical limits, safety rules, regulations, etc.). Usually depending on the system model, this leads to optimization problems that can be continuous or discrete, linear or nonlinear, and sometimes very large-scale. **Machine learning (ML)** pertains to learning patterns from data. Instead of writing equations from first principles, we fit models (decision trees, neural networks, Gaussian processes, etc.) that can make predictions based on previously seen patterns. Training an ML model is itself an optimization problem: we choose model parameters to minimize a loss function that measures its quality. Optimization and ML are therefore tightly connected: - Optimization **empowers** modern ML (training models, tuning hyperparameters). - ML models can serve as **surrogate models** inside larger optimization problems. - Both are essential for **sequential decision making under uncertainty**, where decisions must be updated repeatedly as new information arrives. --- ## 2. Why combine optimization and machine learning? In many real-world engineering systems we must make repeated decisions with uncertain information, complex physics, and operational constraints. For example, consider the scheduling of a complex supply chain to make and deliver goods to consumers across the country. Purely data-driven approaches may ignore constraints (e.g., product quality), while purely model-based approaches may be too slow or inaccurate. Combining optimization and ML allows us to: - Use **data-driven models** (e.g. neural networks, Gaussian processes, tree ensembles) where first-principles models are hard to derive. - Embed these models inside **mathematical optimization** problems to translate predictions to prescriptive decisions. - Achieve **better performance with guarantees**: we can ask not just “What does the model predict?” but “What is the best safe/feasible decision given this model and our constraints?”. Our group studies these ideas in a systematic way, from mathematical formulations and algorithms to software implementations and real engineering applications. --- ## 3. Key concepts - **Mathematical optimization:** The study of algorithms and formulations for finding the best solution to a decision problem, often with many variables and constraints. - **Mixed-integer programming:** Optimization problems where some variables must take discrete values (e.g. on/off). These are crucial for scheduling, design choices, and logical decisions. - **Bayesian optimization:** A framework for optimizing expensive black-box functions (e.g. costly experiments or simulations) using probabilistic models such as Gaussian processes. - **Surrogate models:** ML or reduced-order models that approximate a more expensive model, enabling faster optimization and control. - **Reinforcement learning:** A model-free ML approach that learns decision policies purely through interaction with an environment, balancing exploration and exploitation. --- ## 4. What we are working on Our research focuses on **sequential decision making under uncertainty**, at the intersection of optimization, machine learning, and systems engineering. Broadly, our themes are: ### 4.1 Optimization of trained machine learning models Many applications embed trained ML models directly in optimization problems. Examples include: - Using ML models as surrogates in decision making, following Bayesian optimization or reinforcement learning. - Studying extreme or adversarial behavior of trained models by solving optimization problems over their inputs. We develop optimization formulations and algorithms for models such as Gaussian processes, tree ensembles, and ReLU neural networks, with a focus on **global optimality and scalability**. ### 4.2 Reduced-order models for scheduling and control Complex engineering systems often require fast, repeated optimization for scheduling and control. High-fidelity models can be too slow, so we: - Build data-driven reduced-order models (e.g. neural ODEs, autoencoder-based models, latent variable dynamic models). - Integrate these models into frameworks spanning production scheduling and process control, coordinating long-term planning and short-term decisions. ### 4.3 Modelling and optimization of process & energy systems We apply our methods to real-world systems, especially in process systems engineering and energy systems, including: - Optimal design and operation of green hydrogen, energy storage, and other low-carbon technologies, including uncertainty and risk. - Supply chain management and inventory control problems. These applications typically involve nonlinear physics, discrete decisions, and uncertainty, making them ideal testbeds for optimization and ML techniques. ### 4.4 Computational optimization and software We also contribute to generic advances in optimization methods and software, including: - New formulations for mixed-integer and disjunctive constraints. - Bayesian optimization and reinforcement learning algorithms that exploit the structure of ML models and engineering systems. - Open-source toolkits that bridge optimization and ML, making these methods accessible to researchers and practitioners. An example is work on toolkits that allow users to embed trained ML models into optimization solvers in a systematic way. --- ## 5. Example applications Some representative applications of optimization and machine learning include: - **Designing and operating low-carbon energy systems** (e.g. hydrogen, electricity grids, carbon capture). [Example paper](https://doi.org/10.1021/acs.iecr.5c03288) - **Optimizing experimental campaigns** and simulations in chemistry/materials using Bayesian optimization. [Example paper](https://arxiv.org/abs/2503.05642) - **Constrained reinforcement learning** for operational decision-making, where safety and inventory constraints must always be respected. [Example paper](https://doi.org/10.1016/j.compchemeng.2023.108518) For a comprehensive overview of our research themes and publications please see our research page: https://www.doc.ic.ac.uk/~ctsay/research/ --- ## 7. How we use HackMD in this domain Within our group, HackMD supports our work in optimization and machine learning by enabling us to: - co-work on paper summaries, literature reviews, and research proposals. - Maintain shared **knowledge bases of optimization and ML concepts** for students and collaborators. - Draft and revise notes including mathematical formulations, proofs, and algorithm descriptions using LaTeX-style notation. - Document experimental setups and results, linked to code and datasets. - Create and share **public tutorials** and notes (like this one!) on mathematical optimization, Bayesian optimization, and ML for process systems. Our goal is to advance optimization and machine learning and make thees topics accessible to the broader community interested in data-driven decision making.