Загрузка видео...

Не удалось загрузить видео

На главную

➡️ Machine Learning from Scratch, part 40: is linear regression machine learning? Linear regression is machine learning, because it learns a weight and a bias from examples with known answers, which makes it supervised learning in its simplest form. What makes it special is that the best weight and...

22,700 просмотров • 23 дней назад •via TikTok

Комментарии: 0

Нет доступных комментариев

Здесь появятся комментарии из оригинального поста

Похожие видео

if you're struggling on where to start learning ML, here’s a playlist of 30 youtube videos to learn machine learning fundamentals from scratch "Machine Learning: Teach by Doing" is a solid choice to learn both theory and code. (1) Introduction to Machine Learning Teach by Doing: (2) What is Machine Learning? History of Machine Learning: (3) Types of ML Models: (4) 6 steps of any ML project: (5) Install Python and VSCode and run your first code: (6) Linear Classifiers Part 1: (7) Linear Classifiers Part 2: (8) Jupyter Notebook, Numpy and Scikit-Learn: (9) Running the Random Linear Classifier Algorithm in Python: (10) The oldest ML model - Perceptron: (11) Coding the Perceptron: (12) Perceptron Convergence Theorem: (13) Magic of features in Machine Learning: (14) One hot encoding: (15) Logistic Regression Part 1: (16) Cross Entropy Loss: (17) How gradient descent works: (18) Logistic Regression from scratch in Python: (19) Introduction to Regularization: (20) Implementing Regularization in Python: (21) Linear Regression Introduction: (22) Ordinary Least Squares step by step implementation: (23) Ridge regression fundamentals and intuition: (24) Regression recap for interviews: (25) Neural network architecture in 30 minutes: (26) Backpropagation intuition: (27) Neural network activation functions: (28) Momentum in gradient descent: (29) Hands on neural network training in Python: (30) Introduction to Convolutional Neural Networks (CNNs):

ℏεsam

109,764 просмотров • 1 год назад

a playlist of 30 youtube videos to learn machine learning fundamentals from scratch if you're struggling on where to start learning ML, this list goes this "Machine Learning: Teach by Doing" is a solid choice to learn both theory and code. (1) Introduction to Machine Learning Teach by Doing: (2) What is Machine Learning? History of Machine Learning: (3) Types of ML Models: (4) 6 steps of any ML project: (5) Install Python and VSCode and run your first code: (6) Linear Classifiers Part 1: (7) Linear Classifiers Part 2: (8) Jupyter Notebook, Numpy and Scikit-Learn: (9) Running the Random Linear Classifier Algorithm in Python: (10) The oldest ML model - Perceptron: (11) Coding the Perceptron: (12) Perceptron Convergence Theorem: (13) Magic of features in Machine Learning: (14) One hot encoding: (15) Logistic Regression Part 1: (16) Cross Entropy Loss: (17) How gradient descent works: (18) Logistic Regression from scratch in Python: (19) Introduction to Regularization: (20) Implementing Regularization in Python: (21) Linear Regression Introduction: (22) Ordinary Least Squares step by step implementation: (23) Ridge regression fundamentals and intuition: (24) Regression recap for interviews: (25) Neural network architecture in 30 minutes: (26) Backpropagation intuition: (27) Neural network activation functions: (28) Momentum in gradient descent: (29) Hands on neural network training in Python: (30) Introduction to Convolutional Neural Networks (CNNs):

ℏεsam

117,748 просмотров • 1 год назад

➡️ Part 9 of learning ML code from scratch Six weights, one wrong answer, and not one of them knows it was at fault. Backpropagation is how they find out. Two questions guide the video: what even is backpropagation, and why do models need it? Step 1, the forward pass. Two numbers go into a tiny network, run through a hidden layer, and one number comes out. Ours says 0.700. We wanted 1.0, so square the difference and the loss is 0.09. That single number is how wrong the model is. Step 2, the question. Six weights produced that answer together. Which of them is to blame, and by how much? Step 3, the one idea. Change a single weight by a tiny amount and watch the error move. How much the error changes per unit of weight is the gradient of that weight. In the video you can see it happen: the weight wobbles and the error bar answers. Step 4, the shortcut. Every weight running into the same neuron starts from one shared number, the blame of that neuron. Multiply that blame by the value each weight carried and you have its gradient. One blame, computed once, and every weight into that neuron gets its own gradient from it. That is why backpropagation is fast enough to train anything at all. Step 5, backwards. The blame starts at the output and every layer hands its share to the layer in front of it, back through the same network the data came forward through. It goes layer by layer, and inside one layer every neuron is done together. Step 6, the update. The optimizer moves every weight against its own gradient, the whole weight matrix in one go, so no weight waits for its turn. All six gradients here are negative, so all six weights go up. After one step the answer reads 0.769. After sixty it reads 0.968 and the error is down to 0.001. The honest part: every gradient in the video was checked against the measured change of the error. Move that one weight, see what the error does, divide. Backprop and the measurement agree to nine decimal places, otherwise nothing would have rendered. #machinelearning #backpropagation #neuralnetworks #python #coding

MachineLearningToGo

210,300 просмотров • 1 месяц назад

➡️ Machine Learning from Scratch, part 47: the Hopfield network. In 1982 the physicist John Hopfield described a network that works as a memory, and 42 years later this work was part of the Nobel Prize in Physics. Each neuron is one pixel that is either on or off, and every neuron is connected to every other neuron, so 100 pixels need 4,950 connections. There are no layers: signals go back and forth until the network settles. Each neuron takes a weighted sum of its inputs and switches on if the sum is positive, off if it is negative. Storing a picture is simple: for every pair of pixels with the same colour the connection gets stronger, otherwise weaker. Every stored picture becomes a valley in the energy landscape, and no switch can ever raise the energy, so a noisy picture rolls downhill into the nearest stored memory. The code (hopfield.py, 16 lines of numpy, pictures in pics.txt) stores three 10 x 10 pictures, a heart, a house and a smiley, and flips 30 of the 100 pixels in each. After a single pass over all neurons all three come back exactly; the energy of the heart falls from -6.90 to -48.90, the energy of the stored heart. With 100 neurons and random patterns (10 flipped pixels, 20 runs) it recalls 5 patterns every time, 10 patterns in 94.5 % of the cases, 14 in 68 %, 20 in about one in four (24 %) and 30 in 1 %. Honest notes: the weights are kept as whole numbers (100 times the Hebb weight), so a sum of exactly zero switches the neuron on, as the rule says. The landscape in the video is a picture of the idea; the valley floors and the height of the rolling ball are the real energies from the run. #machinelearning #ai #coding #neuralnetworks #nobelprize

MachineLearningToGo

11,900 просмотров • 12 дней назад

➡️ ML news part 1 An AI just fixed another AI by rewriting its weights directly, without any training. Machine Learning News, part 1: weight space programming. What is new, and why it matters. Until now, the weights of a neural network were set by training, and reading them took special tools built for that one job. A new report from researchers at MIT CSAIL shows that a general AI model, here GPT-6 Astra used as it is, can read and write those weights directly as plain lists of numbers. Test 1, reading. The model was given only the 17,253 weights of four small game playing networks (Breakout, Pong, Pac-Man, Freeway) and named the right game for all four. Test 2, writing. Without any data, loss or gradients, it wrote networks for three MinAtar games, and all three beat networks trained with PPO for 100 million steps. In Breakout it scored 517.4 points, against 25.3 after 500 million training steps. Test 3, repairing. The small open language model Qwen3.5-0.8B ran into its length limit on 93 percent of MATH-500 answers because it got stuck in loops. The model traced the loop to one direction written by the MLPs of layers 15 and 19 and removed it. That changed 131,072 weights, which is 0.016 percent of the model. MATH-500 went from 7.9 to 48.1 percent, IFEval from 21.0 to 62.3 percent, GSM8K from 13.8 to 67.1 percent, all with no training. The edit was chosen with a budget of 50 trial runs on practice problems, and the test sets were never seen. To be fair, the authors say the fix removed an obstacle and added no new ability, and on another small model it brought no improvement. This is an early report and not yet peer reviewed. Source: Takehi, Teoh, Zhang, Khattab (MIT CSAIL), "Sparks of Weight-Space Programming", blog post, November 2, 2026, (early report, not peer reviewed). Screenshots from the report are shown as quotes. Model names are given only to name the source. #machinelearning #ai #claude #neuralnetworks #llm

MachineLearningToGo

55,800 просмотров • 9 дней назад

The Machine That Learns The Law Behind The Data A very very interesting US Patent US10963540B2 - Physics Informed Learning Machine describes a learning system that does not begin with data alone. It begins with a physical model, usually written as a differential equation (or PDE) dx/dt = f(x,t) A normal Machine Learning model sees scattered data and tries to fit it. A physics-informed learning machine starts with a law. Then it treats the data as evidence that updates what the model believes about the physical system. For this application, I use the patent idea on NASA C-MAPSS Turbofan engine data. The machine watches multivariate telemetry from a degrading engine and infers a hidden health state that is not measured directly. From that posterior belief, it estimates the engine’s remaining useful life. In the main 3D scene, the engine lifetime is turned into a tunnel. The spiral ribbons are real sensor channels evolving over cycle-time. The glowing core is the inferred health state. The surrounding cloud is uncertainty. The orange wall ahead is the predicted failure horizon. So the big picture is: sensor evidence comes in, posterior belief tightens, and the machine moves from uncertainty toward a concrete failure prediction. The inset posteriors make that explicit. The health posterior shows where the model believes the hidden engine condition sits at the current moment, and how sharply it believes it. The RUL posterior shows the same idea for remaining life... early on it is broad, later it shifts left and narrows as the machine becomes more certain about how close failure is. This idea is not limited to engines. The same idea can apply to data centers, CPUs, GPUs, cooling systems, power grids, robotics, batteries, and any machine that produces telemetry while obeying physical constraints. In an age where machine learning runs on massive hardware infrastructure, this kind of model matters: it can turn noisy sensor streams into early warnings before expensive systems fail.

Mathelirium

17,843 просмотров • 6 месяцев назад

Lecture 1 on Physics-Informed Neural Networks: A Mini-Series Physics-Informed Neural Networks (PINNs) are neural networks trained to satisfy a differential equation by building the PDE residual directly into the loss. They emerged from a very practical problem...classical PDE pipelines can be brilliant, but they often demand heavy discretization work (meshes, stencils, stability tuning), and the method you build is usually tied to one geometry and one solver setup. A PINN flips the workflow by representing the solution itself as a smooth function uᵩ(x,t) and enforcing the physics everywhere you choose to sample the domain. People often meet PINNs in the least helpful way...via a flashy solution plot, and almost no explanation of what was enforced to get it. In this series we keep the enforcement visible. We pick a differential equation, represent the unknown solution as a flexible function, measure how well that function satisfies the equation across the domain, and train it to reduce that mismatch everywhere we sample. A normal neural net learns from labels...you give it inputs and target outputs. A PINN learns from a differential equation...you give it inputs (x,t) and it gets punished whenever its output fails the PDE. By punish we mean that the loss increases when the mismatch is large we reward it if the loss decreases as the mismatch gets smaller. The network isn’t replacing physics, it’s becoming a flexible function that is forced to satisfy the same calculus you’d impose on any candidate solution. The math breakdown: We start with a PDE we want to solve on a domain Ω. Write it as uₜ(x,t) + N(u(x,t), uₓ(x,t), uₓₓ(x,t), …) = 0 for (x,t) in Ω A PINN replaces the unknown function u with a neural network output uᵩ(x,t) Now define the physics residual by plugging uᵩ into the PDE rᵩ(x,t) = ∂uᵩ/∂t + N(uᵩ, ∂uᵩ/∂x, ∂²uᵩ/∂x², …) If uᵩ were an exact solution, we would have rᵩ(x,t) = 0 everywhere. We may also have data points (xᵢ,tᵢ,uᵢ) from measurements or a known initial condition. The training objective is just a weighted sum of squared errors L(ᵩ) = L_data(ᵩ) + λ L_phys(ᵩ) + L_bc/ic(ᵩ) with L_data(ᵩ) = meanᵢ |uᵩ(xᵢ,tᵢ) − uᵢ|² L_phys(ᵩ) = meanⱼ |rᵩ(xⱼ,tⱼ)|² where (xⱼ,tⱼ) are the collocation points in Ω L_bc/ic(ᵩ) = penalties enforcing boundary conditions and initial conditions The key technical step is that the derivatives inside rᵩ are computed by automatic differentiation ∂uᵩ/∂t, ∂uᵩ/∂x, ∂²uᵩ/∂x², … So we can differentiate the total loss L(ᵩ) with respect to ᵩ and train with gradient descent. This is the whole idea behind PINNs. Learn a function, but make the PDE part of the loss, so the network is trained to be a solution, not just a curve-fitter. In the render, the main 3D surface is the network’s current guess uᵩ(x,t), drawn as a living sheet over the (x,t) plane. Hovering above is the neural scaffold...a visible graph of feature nodes and connections. The bright tension threads are the physics residual rᵩ(x,t): each thread tethers a collocation bead on the sheet up to the scaffold, and it thickens and brightens exactly where |rᵩ| is large (color encodes the sign). As training runs, those threads go slack across the domain not because we hid the error, but because the network has actually been pushed toward rᵩ(x,t) ≈ 0. #PINNs #PhysicsInformedNeuralNetworks #ScientificMachineLearning #PDE #DifferentialEquations #Optimization #MachineLearning #AppliedMath #ComputationalPhysics

Mathelirium

47,308 просмотров • 10 месяцев назад

What if Your Neural Network Was Forced to Obey Physics? Physics-Informed Neural Networks (PINNs) are neural networks trained to satisfy a differential equation by building the PDE residual directly into the loss. They emerged from a very practical problem...classical PDE pipelines can be brilliant, but they often demand heavy discretization work (meshes, stencils, stability tuning), and the method you build is usually tied to one geometry and one solver setup. A PINN flips the workflow by representing the solution itself as a smooth function uᵩ(x,t) and enforcing the physics everywhere you choose to sample the domain. People often meet PINNs in the least helpful way...via a flashy solution plot, and almost no explanation of what was enforced to get it. In this series we keep the enforcement visible. We pick a differential equation, represent the unknown solution as a flexible function, measure how well that function satisfies the equation across the domain, and train it to reduce that mismatch everywhere we sample. A normal neural net learns from labels...you give it inputs and target outputs. A PINN learns from a differential equation...you give it inputs (x,t) and it gets punished whenever its output fails the PDE. By punish we mean that the loss increases when the mismatch is large we reward it if the loss decreases as the mismatch gets smaller. The network isn’t replacing physics, it’s becoming a flexible function that is forced to satisfy the same calculus you’d impose on any candidate solution. The math breakdown: We start with a PDE we want to solve on a domain Ω. Write it as uₜ(x,t) + N(u(x,t), uₓ(x,t), uₓₓ(x,t), …) = 0 for (x,t) in Ω A PINN replaces the unknown function u with a neural network output uᵩ(x,t) Now define the physics residual by plugging uᵩ into the PDE rᵩ(x,t) = ∂uᵩ/∂t + N(uᵩ, ∂uᵩ/∂x, ∂²uᵩ/∂x², …) If uᵩ were an exact solution, we would have rᵩ(x,t) = 0 everywhere. We may also have data points (xᵢ,tᵢ,uᵢ) from measurements or a known initial condition. The training objective is just a weighted sum of squared errors L(ᵩ) = L_data(ᵩ) + λ L_phys(ᵩ) + L_bc/ic(ᵩ) with L_data(ᵩ) = meanᵢ |uᵩ(xᵢ,tᵢ) − uᵢ|² L_phys(ᵩ) = meanⱼ |rᵩ(xⱼ,tⱼ)|² where (xⱼ,tⱼ) are the collocation points in Ω L_bc/ic(ᵩ) = penalties enforcing boundary conditions and initial conditions The key technical step is that the derivatives inside rᵩ are computed by automatic differentiation ∂uᵩ/∂t, ∂uᵩ/∂x, ∂²uᵩ/∂x², … So we can differentiate the total loss L(ᵩ) with respect to ᵩ and train with gradient descent. This is the whole idea behind PINNs. Learn a function, but make the PDE part of the loss, so the network is trained to be a solution, not just a curve-fitter. In the render, the main 3D surface is the network’s current guess uᵩ(x,t), drawn as a living sheet over the (x,t) plane. Hovering above is the neural scaffold...a visible graph of feature nodes and connections. The bright tension threads are the physics residual rᵩ(x,t): each thread tethers a collocation bead on the sheet up to the scaffold, and it thickens and brightens exactly where |rᵩ| is large (color encodes the sign). As training runs, those threads go slack across the domain not because we hid the error, but because the network has actually been pushed toward rᵩ(x,t) ≈ 0. #PINNs #PhysicsInformedNeuralNetworks #ScientificMachineLearning #PDE #DifferentialEquations #Optimization #MachineLearning #AppliedMath #ComputationalPhysics

Mathelirium

17,459 просмотров • 5 месяцев назад

➡️ Machine Learning from Scratch, part 31: the transformer. A transformer turns every token into a list of numbers, adds its position, and then lets every token look at the others. That step is called attention: each token has a query (what am I looking for), a key (what do I contain) and a value (what I pass on). The better a query matches a key, the more of that value flows in. Real transformers repeat this in many layers with several attention heads each. The design comes from the 2017 Google paper "Attention Is All You Need" by Ashish Vaswani and colleagues, first used for translation. A large language model is a transformer trained to predict the next token, again and again, on a huge amount of text. Our own run, nothing downloaded. attention.py is one self-attention layer in 16 lines of numpy. Every word gets a query, a key and a value of 8 numbers, starting random, trained from scratch with hand-written backpropagation on 192 made-up sentences like "the dog ate the carrot because it was hungry". The task: find out which pet "it" means. On 64 new test sentences "it" puts 99.95 percent of its attention on the right word on average (the lowest single sentence gets 99.9 percent; the program prints this as 100%). Before training it was 10 percent, spread evenly. The cat sentence from the video is one of the test sentences. Honest notes: our task is easy on purpose. Every sentence has exactly one pet, so "it" only has to learn to look for pets, and it learns that within the first pass. Real sentences with two candidates need more context, which is what many layers are for. Our small version has no positions, no scaling, no mask, one head, and only "it" asks a question. Every word of the test sentences also appears in training; the combinations are new. The 3D space in the video shows the real keys of our model, projected to three axes (two of them stretched so you can see them). The stacked layers are a sketch. #machinelearning #ai #transformer #python #llm

MachineLearningToGo

79,900 просмотров • 1 месяц назад

Former Meta Chief AI Scientist Yann LeCun on the three paradigms of machine learning — and why the third is what made ChatGPT possible: Here's each one, and where it breaks. First, supervised learning. You tell the machine the answer. "You show it a picture, let's say of a table, and you tell it this is a table. So it's supervised because you tell it what the correct answer is." Get it wrong, and the machine rewrites itself: "The system computes its output, and if it says something else than table, then it's going to adjust its parameters, its internal structure, so that the output it produces gets closer to the output you want." Repeat at scale and something more than memorisation appears: "Eventually the system will find a way to recognize every image you trained it on, but also images it's never seen that are similar to the one you train it on. This is called a generalization ability." The limit: a human has to supply every single answer. That doesn't scale to the size of the internet. Second, reinforcement learning. You don't give the answer, only a verdict. "You don't tell the system what the correct answer is. You only tell it whether the answer it produced was good or bad." Learning to ride a bike, essentially: "You try to ride a bike and you don't know how to ride the bike and after a while you fall. So you know you did something bad and so you change your strategy a little bit. And eventually you learn how to ride a bike." For years the field assumed this was the closest thing to how animals actually learn. Yann LeCun's verdict: "Now it turns out reinforcement learning is extremely inefficient." It dominates wherever failure is free: "It works really well if you want to train a system to play chess or play go or poker, because you can have the system play millions and millions of games against itself and basically fine-tune itself. But it doesn't really work in the real world." The limit, in one image: "If you want to train a car to drive itself, you're not going to do it with reinforcement learning. It's going to crash thousands of times." On robotics he's careful rather than dismissive: "Reinforcement learning can be part of the solution, but it's not the complete answer. It's not sufficient." Third, self-supervised learning. You tell the machine nothing at all. "And this is what has enabled the recent progress in natural language understanding and chatbots." The strange part is that you stop asking for a task: "You don't train the system to accomplish any particular task. You just train it to basically capture the structure..." The method is deliberate sabotage: "You take a piece of text, you corrupt it in some way, by for example removing some words, and then you train a big neural net to predict the words that are missing." And one narrow version of that trick runs every chatbot on Earth: "A special case of this is that you take a piece of text and the last word in that text is not visible, and so you train the system to predict the last word in that text — and this is the way large language models are trained on." So why did the third one win? Supervised learning needs a human. Reinforcement learning needs a crash. Self-supervised learning needs neither — because the missing word and the correct answer are the same thing. The data grades itself.

Big Brain AI

49,293 просмотров • 3 месяцев назад

Backpropagation by hand ✍️ ~ 11 steps walkthrough below Backpropagation is the algorithm that actually trains a neural network, and it is where most people stop following along. It is not calculus you cannot do. It is matrix multiplication, working backward, one layer at a time. So I drew and calculated one entirely by hand. Goal: push the loss gradient back through a 3-layer network and land on a new value for every weight and bias. = 1. Given = A 3-layer perceptron, an input X, predictions Ypred = [0.5, 0.5, 0], and the truth Ytarget = [0, 1, 0]. = 2. Backprop gradient cells = Let us draw empty cells for every gradient we are about to compute. The shape of the answer comes first. = 3. Layer 3 softmax = We get dL/dz3 straight from Ypred minus Ytarget = [0.5, -0.5, 0]. No chain rule needed, and that shortcut is the whole reason softmax and cross-entropy are paired. = 4. Layer 3 weights and biases = Let us multiply dL/dz3 by [a2 | 1]. One multiplication gives the gradient for W3 and b3 together. = 5. Layer 2 activations = We multiply dL/dz3 by W3 to get dL/da2. The gradient moves back across a layer the same way the signal moved forward. = 6. Layer 2 ReLU = Let us pass it through the gate: keep the gradient where the activation was positive, zero it everywhere else. = 7. Layer 2 weights and biases = We multiply dL/dz2 by [a1 | 1]. The same figure as step 4, one layer up. = 8. Layer 1 activations = Let us multiply dL/dz2 by W2. = 9. Layer 1 ReLU = We apply the same gate again, now on a1. = 10. Layer 1 weights and biases = Let us multiply dL/dz1 by [x | 1], and every weight in the network now has a gradient. = 11. Update = We subtract, and the network has learned. In practice a learning rate scales this step. The gradients: dL/dz3 = [0.5, -0.5, 0] dL/da1 = [1, -2, 2, -1] dL/dz1 = [0, -2, 2, -1] The takeaway: matrix multiplication is all you need. Just like the forward pass, backpropagation is matrix multiplications end to end. You can do every one by hand, slowly and imperfectly, which is exactly why a GPU's ability to do them fast mattered so much to deep learning. 💾 Save this post!

Tom Yeh

964,224 просмотров • 3 месяцев назад

What are Physics-Informed Neural Networks (PINNs) Physics-Informed Neural Networks (PINNs) are neural nets trained to satisfy a differential equation. The trick is simple. You bake the PDE residual straight into the loss. They came out of a very practical pain point. Classical PDE pipelines can be amazing, but they often demand a lot of setup work. Meshes. Stencils. Stability tuning. And once you build a solver, it’s usually tied to one geometry and one discretization choice. A PINN flips the workflow. You represent the solution itself as a smooth function uᵩ(x,t) and you enforce the physics wherever you choose to sample the domain. Most people first meet PINNs in the least helpful way. A pretty solution surface, almost no clarity on what was enforced to make it appear. In this series we keep the enforcement visible. We pick a PDE, represent the unknown solution as a flexible function, measure how badly that function violates the equation across the domain, and train it to reduce that mismatch at the points we sample. A normal neural net learns from labels. You give it inputs and target outputs. A PINN learns from an equation. You give it inputs (x,t), and it gets penalized whenever its output fails the PDE. Smaller mismatch means smaller loss. Bigger mismatch means bigger loss. That’s all “punish” and “reward” mean here. The network isn’t replacing physics. It’s just a flexible function that we force to obey the same calculus you’d demand from any candidate solution. The math breakdown: We start with a PDE on a domain Ω. Write it as uₜ(x,t) + N(u(x,t), uₓ(x,t), uₓₓ(x,t), …) = 0 for (x,t) in Ω A PINN replaces the unknown u with a neural network output uᵩ(x,t) Now define the physics residual by plugging uᵩ into the PDE rᵩ(x,t) = ∂uᵩ/∂t + N(uᵩ, ∂uᵩ/∂x, ∂²uᵩ/∂x², …) If uᵩ were an exact solution, we’d have rᵩ(x,t) = 0 everywhere. We may also have data points (xᵢ,tᵢ,uᵢ) from measurements or from an initial condition. The training objective is a weighted sum of squared errors L(ᵩ) = L_data(ᵩ) + λ L_phys(ᵩ) + L_bc/ic(ᵩ) with L_data(ᵩ) = meanᵢ |uᵩ(xᵢ,tᵢ) − uᵢ|² L_phys(ᵩ) = meanⱼ |rᵩ(xⱼ,tⱼ)|² where (xⱼ,tⱼ) are collocation points in Ω L_bc/ic(ᵩ) = penalties enforcing boundary conditions and initial conditions The key technical step is how we get the derivatives inside rᵩ. We don’t approximate them with finite differences. We compute them with automatic differentiation: ∂uᵩ/∂t, ∂uᵩ/∂x, ∂²uᵩ/∂x², … Then we differentiate the total loss L(ᵩ) with respect to ᵩ and train with gradient descent. That’s the whole idea. Learn a function, but make the PDE part of the loss, so the network is trained to be a solution, not just a curve-fitter. In the render, the main 3D surface is the network’s current guess uᵩ(x,t), drawn as a living sheet over the (x,t) plane. Hovering above is the neural scaffold, a visible graph of feature nodes and connections. The bright tension threads are the physics residual rᵩ(x,t). Each thread tethers a collocation bead on the sheet up to the scaffold, and it thickens and brightens exactly where |rᵩ| is large, with color showing the sign. As training runs, those threads go slack across the domain, not because we hid the error, but because the network has actually been pushed toward rᵩ(x,t) ≈ 0. #PINNs #ScientificMachineLearning #PDE #DifferentialEquations #Optimization #MachineLearning #AppliedMath #ComputationalPhysics

Mathelirium

44,924 просмотров • 9 месяцев назад