Machine Learning: Progress in Science, Theory, Practice with ML.NET
AI
5/31/2026
Machine Learning as a New Instrument for Scientific Discovery
We are living in a moment as significant as the invention of the microscope or the telescope. Machine Learning (ML) as a subdiscipline of Artificial Intelligence (AI) is not merely automating existing tasks. ML is opening entire domains of knowledge that were previously inaccessible to human researchers. Patterns hidden before are now becoming visible for the first time. Consider what has happened just in the past few years:
- AlphaFold developed the first computational approach capable of predicting protein structures to near experimental accuracy in a majority of cases [1]. Determining protein structures was a problem that was tackled in biology for 50 years [2]. AlphaFold has revealed millions of intricate 3D protein structures. This single breakthrough unlocked a new era for drug discovery and our understanding of life itself.
- GNoME used graph neural networks to predict stable crystal structures for more than 2 million new materials [3]. This increases the number of known stable materials tenfold, bringing innovation to battery technology, solar cells, and microchips.
- Gravitational wave astronomy now relies on deep learning to detect neutron star mergers in near real time [4]. The DINGO-BNS algorithm processes gravitational wave signals at speeds traditional methods cannot match, enabling telescopes to capture kilonova explosions before they fade.
- Antibiotic discovery: A recent Nature paper [5] demonstrated how explainable deep learning identified a structurally novel class of antibiotics effective against drug-resistant bacteria — candidates that human chemists would have had no reason to consider. Wong et al. predicted the antibiotic activity and cytotoxicity for 12 million compounds.
These are not incremental improvements. They represent a qualitative shift in what science can achieve for mankind.
The Vision: AI as a Fellow Scientist
I was privileged to attend a lecture by Prof. Dr. Stefan Kramer, Professor of Computer Science at the University Mainz, Germany, and a leading voice in German AI policy. The landmark survey "Automated Scientific Discovery: From Equation Discovery to Autonomous Discovery Systems" published in 2026 [6] maps out a five-level autonomy framework for AI-driven science, drawing direct analogy to the autonomy levels in self-driving vehicles. At level five, an AI system requires no human intervention whatsoever to produce new scientific knowledge.
Prof. Kramer and his collaborators connect this vision explicitly to the Nobel Turing Grand Challenge: the ambitious goal of building AI Scientists capable of making Nobel Prize-worthy discoveries highly autonomously by 2050.
From Agile Engineering to Responsible AI
On the software engineering side, the talk by Prof. Dr. Pekka Abrahamsson was particularly interesting. He was named AI Researcher of the Year 2025 in Finland and leads the Applied AI Research Centre (AI HUB) at Tampere University [7]. A pioneer of agile software development methodology, Abrahamsson has turned his focus toward generative AI and its integration into real-world software engineering practice.
He addresses a challenge directly relevant to practitioners implementing ML systems: the gap between ML model performance in the lab and reliable, governable deployment in production. As he puts it, "We can securely feed all of a company's data to AI, which then computes and explains any information in an understandable way — both for the CEO and for frontline employees" [7]. This principle of explainability and democratization runs through both his academic work and applied industry collaborations.
What This Means for All of Us
The existence of exponentially growing datasets, increasingly powerful hardware, and maturing ML algorithms provide "… critical tools that, when used in conjunction with other approaches (e.g. experiments, causality analysis, development of an adequate coordinate system, etc.), catalyzes advances in scientific fields where no information on the phenomenon under study is available" [8].
Foundation of Machine Learning
What is Machine Learning?
Machine Learning is a type of AI that involves building machines that can learn to discern patterns in data without being explicitly programmed to do so. Trained machines can then detect similar patterns in new, previously unseen data [9].
Categories of Machine Learning
ML systems are often divided into four classes.
The most common is supervised learning, where the training data and the "right answer" are accessible. In unsupervised learning, the systems learn by trying to find the common structure in the data on their own.
The third category, deep learning, uses multi-layered neural networks to automatically discover hierarchical patterns in data. This includes Convolutional Neural Networks (CNNs), which excel at image recognition and computer vision tasks, and transformers, the architecture powering modern language models like GPT and enabling breakthroughs in natural language processing (NLP), structure prediction, and scientific text analysis.
The fourth category, reinforcement learning, refers to systems that evolve by learning through trial and error in a sequence of actions, receiving rewards or penalties that guide them toward a given goal, such as autonomous robotics.
At its core, ML relies heavily on linear algebra and calculus. Linear algebra provides the framework for representing data as vectors and matrices, enabling efficient computation across high-dimensional feature spaces, while calculus powers the optimization algorithms that minimize prediction errors through gradient descent.
In supervised learning, classification assigns data points to predefined categories based on learned patterns. This process begins with annotation and labeling, where domain experts mark training examples with correct answers. The dataset is split into training data (typically 70–80%) for learning patterns and test data for validating model performance on unseen examples. Each data point consists of a feature set — measurable properties that characterize the input — and the model learns weights that quantify each feature's importance in making predictions.
Clustering represents a fundamental unsupervised technique that groups similar data points without predefined labels, while random forests combine multiple decision trees in supervised learning to improve accuracy and reduce overfitting.
Model quality evaluation relies on key performance indicators like accuracy, precision, and recall, while confidence scores quantify the model's certainty in individual predictions — a critical metric for understanding when automated decisions require human review.
Microsoft ML.NET CLI: Breaking Down Barriers to Entry
A low-barrier entry point for testing ML is provided by Microsoft's ML.NET CLI [10], without having to write a single line of code. CLI stands for "Command Line Interface", which can be easily accessed from Windows 11 or Linux. It supports the notion propagated by P. Abrahamsson that everyone should have access to AI: this utility is directly applicable.
You no longer need deep mathematical expertise or specialized hardware. You can leverage ML using your existing domain knowledge, which is the kind of innovation that bridges the gap between technical possibility and practical implementation.
The CLI handles the entire ML pipeline automatically — from data ingestion and feature engineering to model selection and evaluation. It experiments with multiple algorithms, performs hyperparameter tuning, and generates performance metrics, delivering a trained model file ready to use as a .zip file (or .mlnet asset).
Integration of ML into an ASP.NET Core Website
For integration of the .zip file with training results obtained from the CLI application into my website built on ASP.NET Core MVC, I used the generalized ML.NET framework. Microsoft's open-source machine learning framework for .NET developers allows building and running models directly in C#, without leaving the .NET ecosystem.
It provides high-level APIs to handle common tasks like classification, regression, recommendation, anomaly detection, and NLP, keeps deployment simple, and integrates ML as just another dependency in the existing architecture.
Building Production Sentiment Analysis with C# and ML.NET
My implementation available at https://dirkmueller8.com/Sentiment/Index demonstrates how ML.NET integrates seamlessly into a web application for real-world sentiment analysis.
One Thousand Sentiment-Labelled Sentences as Test Case
This project employs supervised learning with labeled data, where each text sample carries a binary sentiment label (positive/negative). This is a practical classification task that showcases how modern ML frameworks deliver production-grade performance while abstracting complexity.
I used the data provided by Kotzias et al. [11] containing reviews for a restaurant meal. A number of 500 positive and 500 negative sentences were selected randomly. The attempt was to select sentences that have a clearly positive or negative connotation.
The ML.NET pipeline follows a proven workflow: First, data loading transforms raw text into a structured format. Feature engineering converts text into numerical representations using extraction and vectorization techniques — this step is crucial since ML algorithms operate on numbers, not words. The training phase applies regression algorithms to learn the relationship between text features and sentiment labels. Finally, the evaluation assesses model quality on held-out test data to ensure generalization.
My implementation displays the classification and prediction probabilities in debug format, together with a confidence score. The review example here is partly positive, partly negative. This shows as a borderline classification with 44.7% positive and 55.3% negative probability, hence the final result is "Negative".
In corporate applications, high-confidence predictions proceed automatically while borderline cases should be escalated to humans for review. This hybrid approach optimizes both accuracy and operational efficiency.
The Cybersecurity Imperative: Protecting ML Systems
The security dimensions of machine learning should not be ignored. ML systems represent novel attack surfaces that we must understand and protect, especially in regulated industries like medical devices.
Data poisoning is particularly concerning: adversaries inject malicious samples into training datasets to corrupt model behavior. Imagine an attacker flooding training data with deliberately mislabeled data — the model could misclassify critical safety issues as positive reviews, with a potentially adverse effect on healthcare. Poisoned data often appears statistically normal, making traditional validation insufficient.
Model extraction threatens intellectual property and enables subsequent attacks. By systematically probing an API endpoint, adversaries can reverse-engineer proprietary ML models without accessing training data or source code. In medical device contexts, this could expose diagnostic algorithms representing millions in R&D investment.
Security must be built into ML pipelines from the ground up: input validation, rate limiting, confidence monitoring, differential privacy, and comprehensive audit trails. As ML becomes critical infrastructure in healthcare and beyond, security-by-design isn't optional.
A New Scientific Paradigm: Where We're Headed
Recent breakthroughs illustrate how ML is fundamentally transforming scientific disciplines. The Nature publication [5] on antibiotic discovery using explainable deep learning identified novel compounds effective against drug-resistant bacteria by training models on molecular structures and antimicrobial properties. Traditional discovery might screen thousands of compounds over years; deep learning evaluated millions in a short period, identifying candidates with entirely new mechanisms of action.
We're witnessing a shift from purely hypothesis-driven to data-driven discovery, where patterns invisible to human intuition emerge from high-dimensional datasets.
Looking Forward
For professionals in medical devices, healthcare technology, or regulated industries: now is the time to engage with these tools. The barriers to entry are low, and the potential impact is evident. However, seeking to maintain quality control and explainability is essential.
References
- Jumper, J., Evans, R., Pritzel, A. et al. Highly accurate protein structure prediction with AlphaFold. Nature 596, 583–589 (2021). https://doi.org/10.1038/s41586-021-03819-2
- AlphaFold: a solution to a 50-year-old grand challenge in biology (2020). https://deepmind.google/science/alphafold/
- Merchant, A., Cubuk, E.D. Millions of new materials discovered with deep learning, 2023. https://www.nature.com/articles/s41586-023-06735-9
- Dax, M., Green, S.R., Gair, J. et al. Real-time inference for binary neutron star mergers using machine learning. Nature 629, 425–430 (2025). https://doi.org/10.1038/s41586-025-08593-z
- Wong, F., Zheng, E.J., Valeri, J.A. et al. Discovery of a structural class of antibiotics with explainable deep learning. Nature 626, 177–185 (2024). https://doi.org/10.1038/s41586-023-06887-8
- Kramer, S., Cerrato, M., Brugger, J., Džeroski, S., & King, R. Automated Scientific Discovery: From Equation Discovery to Autonomous Discovery Systems. Machine Learning 115, 5–109 (2026). https://doi.org/10.1007/s10994-025-06955-2
- "Professor Pekka Abrahamsson wants AI research to be visible in students' and companies' everyday life", 2025. https://www.tuni.fi/en/tau/news-and-events/professor-pekka-abrahamsson-wants-ai-research-be-visible-students-and-companies
- Vinuesa et al. Decoding complexity: how machine learning is redefining scientific discovery. https://arxiv.org/abs/2405.04161 — https://doi.org/10.1038/s42005-026-02676-7
- Why Machines Learn: the Elegant Math Behind Modern AI. Anil Ananthaswamy. Penguin Random House, 2024.
- "Analyze sentiment using the ML.NET CLI". https://learn.microsoft.com/en-us/dotnet/machine-learning/tutorials/sentiment-analysis-cli
- Kotzias, D. (2015). Sentiment Labelled Sentences [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C57604