News7 min read

Introducing MathExec: From Formula to Trained Model in 60 Seconds

MathExec lets you write a math formula, compile it to PyTorch, train on your CSV data, and export production-ready Python code. All in under a minute.

K

Kingsley Michael

February 21, 2026

Introducing MathExec: From Formula to Trained Model in 60 Seconds

Introducing MathExec

We built MathExec because we were tired of the gap between thinking about a model and actually training one.

You know the drill. You sketch a formula on a whiteboard, then spend 30 minutes setting up a notebook, importing libraries, writing boilerplate PyTorch code, debugging tensor shapes, and wiring up a training loop. By the time you're done, you've forgotten why you wanted to try that architecture in the first place.

We wanted to fix that.

The notebook tax

Every ML researcher pays it. You have an idea for a model architecture. Maybe you read a paper and want to test a variant of their approach on your own data. Maybe you want to compare logistic regression against a two-layer network to see if the extra complexity is worth it.

In theory, this should take a few minutes. In practice, it takes 20-40 minutes per experiment:

  • Open a notebook or create a new Python file
  • Import torch, numpy, pandas, and whatever else you need
  • Load and preprocess your CSV
  • Define the model class with __init__ and forward
  • Write the training loop (optimizer, loss function, epochs, batching)
  • Add logging so you can actually see what's happening
  • Debug the inevitable shape mismatch
  • Run it, wait, look at the results
  • Repeat for every variant you want to try

That friction adds up. Over a workday of experimentation, the setup time dwarfs the actual thinking time. And the worst part is that 90% of that boilerplate is identical across experiments. The only thing that changes is the formula.

What if you could skip all of that?

MathExec is a live math workspace where you:

  1. Write a formula: type LaTeX or draw it by hand
  2. Drop a CSV: your training data
  3. Hit Train: the formula compiles to PyTorch automatically
  4. Export code: get production-ready Python

The entire workflow takes under 60 seconds.

No notebooks. No imports. No training loop. You write the math, point it at data, and get results.

How it works

MathExec's formula compiler parses LaTeX expressions and generates equivalent PyTorch modules. A formula like:

y = σ(W₂ · ReLU(W₁x + b₁) + b₂)

Compiles into a trainable 2-layer neural network with the correct parameter shapes, activation functions, and forward pass. The compiler infers tensor dimensions from your data, selects an appropriate loss function based on the task (regression vs. classification), and configures the optimizer.

You don't need to specify hidden layer sizes, learning rates, or batch sizes. MathExec picks sensible defaults, but you can override everything if you want fine-grained control.

Supported formulas

The compiler handles a wide range of mathematical expressions:

  • Linear models: y = mx + b, y = Wx + b for multivariate regression
  • Polynomial models: y = ax² + bx + c, arbitrary degree polynomials
  • Classification: y = σ(Wx + b) for binary, y = softmax(Wx + b) for multi-class
  • Neural networks: Multi-layer perceptrons with ReLU, sigmoid, tanh activations
  • Advanced layers: Batch normalization, dropout, residual connections
  • Custom combinations: Nest and compose any of the above

If you can write it in standard mathematical notation, there's a good chance MathExec can compile it.

The visual canvas

Beyond single formulas, MathExec's canvas lets you build complex architectures visually. You create formula blocks, connect them with arrows, attach datasets, and train the entire pipeline as a graph.

This is useful for architectures that don't reduce to a single expression. For example, you might want an ensemble where three different models each process the input, and their outputs get combined by a fourth formula. On the canvas, that's four blocks and a few arrows. In code, that's a lot of plumbing.

The canvas uses an Excalidraw-inspired tool system. You can point, create formula blocks, attach data, draw connections, and freehand annotate. Everything is saved automatically and persists across sessions.

Think of it as a whiteboard that actually executes.

Who it's for

MathExec is built for people who already think in math:

  • ML researchers testing model variants from papers
  • Data scientists doing quick feasibility checks before committing to a full pipeline
  • Students learning how different model architectures behave
  • Quants and engineers who need fast iteration on mathematical models

If you're comfortable writing y = σ(Wx + b) on a whiteboard, you already know how to use MathExec.

We deliberately chose not to build a beginner-friendly drag-and-drop interface. Those tools already exist, and they make tradeoffs that slow down experienced users. MathExec assumes you know what logistic regression is and gets out of your way so you can test your ideas as fast as you can think of them.

Data Studio

Raw data rarely comes ready for training. MathExec includes a built-in Data Studio where you can clean and transform your datasets using plain English instructions. Type something like "drop rows where age is missing and normalize the salary column" and MathExec generates and executes the pandas code for you, showing a before-and-after preview before applying changes.

The Data Studio tracks your transform pipeline, so you can reorder, undo, or replay transforms at any point. Every transformation is reversible.

Experiments

Every training run in MathExec is automatically logged as an experiment. You can compare experiments side by side: overlay loss curves, compare metrics across different formulas or hyperparameters, and revisit any past experiment to load its formula and dataset back onto the canvas.

This turns MathExec into more than a one-shot tool. Over time, your experiment history becomes a record of what you tried, what worked, and why.

Export and share

When you find a model that works, MathExec exports production-ready Python code. The exported code is a standalone PyTorch module with the trained weights, ready to drop into any project. No MathExec dependency required.

You get a clean Python file with the model class, trained weights, and a predict() function. Drop it into your Flask app, your data pipeline, or wherever you need inference. There's nothing MathExec-specific in the output.

A real workflow example

Let's walk through a concrete scenario. Say you're a data scientist at an e-commerce company and you want to predict whether a customer will churn based on their activity data.

You have a CSV with columns like days_since_last_purchase, total_orders, avg_order_value, support_tickets, and a binary churned column.

In the traditional workflow, you'd open a Jupyter notebook, write 40-60 lines of PyTorch code (model class, data loading, train/val split, training loop, evaluation), debug a tensor shape error because you forgot to convert your target column to float, fix it, re-run, and finally look at results. Maybe 25 minutes.

In MathExec, you upload the CSV, type y = σ(W₂ · ReLU(W₁x + b₁) + b₂), map churned as the target, and hit Train. You see accuracy, loss curves, and per-class metrics within 20 seconds. If you want to compare against a simpler model, you type y = σ(Wx + b) and train again. Now you have two experiments to compare side by side. Total time: about 2 minutes.

The difference isn't that MathExec is doing less work. It's doing the same work (compiling the formula, running the training loop, tracking metrics), it's just not asking you to write the glue code.

How it compares to existing tools

MathExec occupies a specific niche. It's not trying to replace full ML platforms like Weights & Biases or MLflow, which handle large-scale production pipelines. It's also not competing with AutoML tools like Google's Vertex AI, which automatically search the model space for you.

Instead, MathExec targets the experimentation phase: the 15-minute window between "I have an idea" and "I know if it works." Most tools optimize for the production phase (deployment, monitoring, scaling). We optimize for the thinking phase (ideation, iteration, comparison).

If your workflow is "sketch a formula, test it on data, iterate quickly," MathExec is built for you. When you're ready to take a model to production, export the code and hand it off to your production ML stack.

What's on the roadmap

We're actively working on several features:

  • Shared workspaces: Collaborate with teammates on the same canvas in real time
  • Model versioning: Track how your formulas and hyperparameters evolve over a project
  • Expanded formula support: Attention mechanisms, convolutions, and recurrent structures in formula notation
  • API access: Train and export models programmatically, so you can integrate MathExec into automated pipelines
  • Larger dataset support: Right now, MathExec works best with datasets under 100MB. We're working on chunked processing for larger files

We ship updates frequently and prioritize based on user feedback. If there's something you'd like to see, let us know.

Try it now

MathExec is free to use. No sign-up required for basic features.

Launch MathExec →

We'd love to hear what you build with it. Share your formulas in our Gallery or reach out with feedback.


MathExec is built by Centenum Labs.

Enjoyed this article? Share it with others.

Ready to bring your formulas to life?

Write math, compile to PyTorch, train on data, export code. Under 60 seconds.

Launch App