• Home
  • About
  • Contact

Coffee and PI

~ Mathematics. Machine Learning. Data Science.

Coffee and PI

Author Archives: Lucija Gregov

The Future of AI

26 Thursday Feb 2026

Posted by Lucija Gregov in AI Ethics, AI Morality, Artificial Intelligence

≈ Leave a comment

Tags

ai, AI Ethics, AI Morality, artificial-intelligence, philosophy, technology

The Parents’ Paradox: AI, Ethics, and the Limits of Machine Morality

This post is based on a talk I gave at The AI & Automation Conference in London on February 25, 2026, and my slides. All opinions are my own and don’t represent the views of my employer or any affiliated organizations.


I’ve been working in machine learning since before it was a dinner party conversation. My background is in mathematics. And I still believe in a utopian Star Trek future – one where humanity defines itself by curiosity, kindness, and collaboration, rather than countries, borders, and status.

This is not an anti-AI talk. But I think we need to talk much more seriously about some things that aren’t getting enough attention.

The Parents’ Paradox:

We’ve raised a child who can speak but doesn’t know how to value the truth or morality

I want to start with something that I like to call “The Parents’ Paradox”. For the first time in human history, we are raising a new species. Up until now, the only way we knew how to raise a child was the following: when a child is born, it is a blank slate in terms of information about the world. It knows nothing about the world around it, and it learns as it grows. But, also, on the other hand, a human child is born with biological hardware for empathy – the capacity to feel pain when others feel pain. Millions of years of evolution gave us that. When we raise a human child, we are not installing morality from scratch. We are activating something that’s already there.

With AI, the situation is completely the opposite. This AI child knows about the world more than we do since it has been trained on the whole internet, but it doesn’t have millions of years of evolution, genes, or a nervous system to back up its morality and empathy. This means we need to install morality in AI from scratch. But how do we install something in a software system that we can’t even define ourselves? We have taught this AI child to speak before we taught it how to value truth or morality.

Can we live with the consequences? Are we ready to be parents for this new species we are trying to raise? I am not so sure. Let’s see what we as parents (humans) are doing.

Epistemic Collapse

‘Epistemic’ comes from a Greek word ‘episteme’, meaning ‘knowledge’. Let’s start with what’s happening to us, and what humans are already doing with this technology.

A study published in Nature in January 2026 showed participants deepfake videos of someone confessing to a crime. The researchers explicitly warned participants that the videos were AI-generated. But this didn’t matter. Even the people who believed the warning, who knew it was fake, were still influenced by what they saw.

Transparency didn’t work. The standard response to AI-generated misinformation is “just label it” or “tell people it’s synthetic.” This study showed that’s not enough. Knowing something is fake does not neutralise its effect on your judgement.

So, the danger isn’t that AI will deceive us in some dramatic, sci-fi way. The danger is that AI will make deception so cheap and so ubiquitous that we might stop trying to figure out what is true. Not because we are fooled, but because we are exhausted. When everything could be fake, the rational response starts to look like not trusting anything at all. It started a while ago with all of the fake information on social media, but with AI, this problem is now becoming much bigger and on a bigger scale. We are also dealing with feedback loops of training models on user data, which is often wrong, or on user data from the internet, which is often wrong as well. How do we know which information was ground truth? I imagine this as making photocopies many times, and each time the copy becomes more distorted and further away from the original. But now, after we made hundreds and thousands of copies, we have lost the original copy, so we don’t have any idea what the original looked like. That is epistemic collapse, and it is already happening.

So this is how we, as ‘parents’, like to spend our time, it seems. But what about the child (AI)?

The Child is Already Misbehaving

So that’s what humans are doing with AI. Now here’s what the AI is doing on its own.

Betley and colleagues published a paper in Nature in January 2026, showing something nobody expected. They fine-tuned a model on a narrow, specific task – writing insecure code. Nothing violent, nothing deceptive in the training data. Just bad code.

Continue reading →

Generating Synthetic Financial Data With Generative Adversarial Neural Networks (GANs) and Transformers

02 Wednesday Jul 2025

Posted by Lucija Gregov in Artificial Intelligence, Data Science, Finance, GenerativeAI, Machine Learning, Python

≈ Leave a comment

Tags

ai, Finance, GenerativeAI, llm, Machine Learning

Introduction

Imagine you are working at a major investment bank like J.P. Morgan or Goldman Sachs, or maybe at a hedge fund, where modeling how the market behaves is critical, whether for trading strategies, risk controls, or stress scenario simulations. In these types of environments, being able to generate realistic synthetic financial time-series data isn’t just a nice-to-have – it is necessary.

Financial market data is messy: it’s high-dimensional, noisy, non-stationary, and full of seasonality and calendar effects (like month-end anomalies). Classic forecasting models often fall short here, especially when faced with outliers or structural changes in behavior.

To tackle this, I built a generative model – a GAN-based architecture specifically designed for financial time-series data:

  • The generator is a Transformer that learns to generate the next day’s features from a short rolling window of previous days.
  • The discriminator is a feedforward network that tries to tell apart real vs. generated next-day data.
  • The generator loss blends Binary Cross Entropy, MSE, and a custom volume-aware term to better handle the scale mismatch between price and volume.
  • A Gaussian noise layer is added to the generator, which helps avoid mode collapse and encourages more diverse outputs.
  • Ticker (stock name) embeddings to let the model generalize across multiple stocks while still capturing their unique behaviors.
Continue reading →

Support Vector Machine (SVM)

02 Sunday Apr 2017

Posted by Lucija Gregov in Machine Learning, Python

≈ Leave a comment

Support Vector Machine is a supervised learning type of algorithm and its goal is to find the optimal hyperplane which separates clusters of data. In 1D we will have a line instead of a hyperplane and in 2D it will be a plane. In higher dimensions only, we call it a hyperplane. Suppose we have a data with some positive and some negative examples. How do we divide positive examples from the negative ones?

Continue reading →

Linear Regression

26 Sunday Feb 2017

Posted by Lucija Gregov in Machine Learning, Python

≈ Leave a comment

Regression models are most studied and best understood models in statistics. Regression and correlation are closely related and were invented by Francis Galton, the famous Victorian statistician.

In linear regression, we model the relationship between two variables – dependent and independent variable and we represent the data by drawing a line through it. Before fitting the data and deciding whether we are going to use linear regression or something else, we need to check whether there is a  relationship between variables. For this, a scatterplot can be helpful.

Continue reading →

Topological Data Analysis (TDA)

08 Sunday Jan 2017

Posted by Lucija Gregov in Computational Geometry, Machine Learning, Topological Data Analysis

≈ Leave a comment

Introduction

More data has been created in the last two years than in the entire history of human race and the amount of data keeps growing at the unprecedented rate. The computational power is getting more available and more powerful which allows us to get data very fast. This data is often very noisy, with missing information and high dimensional, which reduces the ability to visualize it. Usually, very few parts of the data provided are useable. To determine which part of data is relevant for us is not an easy task. It is important first to gain a general understanding of data we are dealing with and then to develop quantitative methods to analyze it. This is where topology, a branch of mathematics can be very useful.

Continue reading →

Backward Elimination

30 Friday Dec 2016

Posted by Lucija Gregov in Machine Learning, Python

≈ Leave a comment

In the previous post I have been talking about multiple linear regression, preparing the data and model predictions.

Now we can build the optimal model using backward elimination. But why the model we built so far is not optimal? Because so far we have been using all independent variables. Some of them are highly statistically significant, which means that they have a big impact on the dependent variable “Profit”, but others are not statistically significant – they have little or no impact on the dependent variable. That means that we can remove variables that are not statistically significant from the model and still get good predictions. The goal is to find the team of independent variables where each of the variable is highly statistically significant and highly affects the dependent variable.

Continue reading →

Multiple Linear Regression

30 Friday Dec 2016

Posted by Lucija Gregov in Machine Learning

≈ Leave a comment

Problem description

We have CSV file containing information about 50 companies. Your job as a data scientist is to help venture capitalists with the decision regarding which company they should invest in, by using the information provided in the CSV file. There are five columns, each stating how much during the year company spent for Research & Development, Administration, Marketing, in which state the company is located and the profit of the company.

Continue reading →

The Dressing Method

30 Friday Dec 2016

Posted by Lucija Gregov in Mathematical Physics, Nonlinear systems, Solitons

≈ Leave a comment

This is the third part in a series of Lax Pair and Nonlinear Schrödinger (NLS) Equation (view the previous post here )

In this section we will study the ZS system where the Lax operator has the form:

L\chi \equiv (i\frac{d}{dx} + q(x) - \lambda \sigma_3)\chi(x, \lambda) = 0\ \ \ \ (16)

where

\lim \limits_{x \to \pm \infty} q(x) = q_{\pm} = \begin{bmatrix} 0 & q_{\pm} \\ -q_{\pm}^{*} & 0 \\ \end{bmatrix}

Continue reading →

Lax Pair and The Nonlinear Schrödinger (NLS) Equation (Part 1)

30 Friday Dec 2016

Posted by Lucija Gregov in Mathematical Physics, Nonlinear systems, Solitons

≈ Leave a comment

Tags

Complex systems, Hilbert space, Lax pair, Nonlinear systems, Pauli matrices, Solitons

The idea behind Lax Representation (Lax Pair) is that the nonlinear PDE can be expressed as a compatibility condition of two linear equations.

If we have a system of two partial differential equations

\begin{array}{ccc} \left( i \partial_x + U(x, \lambda) \right) \Psi & = &0 \\  \left( i \partial_t + V(x, \lambda) \right) \Psi & = & 0 \end{array}

on a domain \Omega \subset \mathbb{R}^2, we can define their compatibility condition as

i V_x - iU_t + [U, V] = 0.

Continue reading →

Lax Pair and the Nonlinear Schrödinger (NLS) Equation (Part 2)

30 Friday Dec 2016

Posted by Lucija Gregov in Mathematical Physics, Solitons

≈ Leave a comment

Tags

Complex systems, Hilbert space, Lax pair, Nonlinear Schrödinger Equation, Nonlinear systems, Partial Differential Equations, Pauli matrices, Solitons

Operator L has continuous and discrete spectrum in general so we can separate solutions into two groups:

  • Solutions parametrized by data on the continuous spectrum only
  • Solutions parametrized by the data on the discrete spectrum, which are known as soliton solutions

Continue reading →

← Older posts

Categories

  • AI Ethics (1)
  • AI Morality (1)
  • Artificial Intelligence (2)
  • Computational Geometry (1)
  • Data Science (1)
  • Finance (1)
  • GenerativeAI (1)
  • Machine Learning (7)
  • Mathematical Physics (3)
  • Nonlinear systems (2)
  • Python (4)
  • Solitons (3)
  • Topological Data Analysis (1)

Blog at WordPress.com.

  • Subscribe Subscribed
    • Coffee and PI
    • Already have a WordPress.com account? Log in now.
    • Coffee and PI
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar