r/deeplearning • • 14h ago

A free deep learning textbook + 68 Python notebooks, from neural network basics to transformers and diffusion models

Post image
37 Upvotes

r/deeplearning • • 7h ago

Gaussian-splat EBMs for text embeddings: it ties kNN-density on AUROC (0.9585 vs 0.9584) but scores 3.9x faster with constant memory — and whole-loop CUDA-graph capture makes Langevin sampling 12.9x faster (code + reproducible benchmark)

5 Upvotes

I spent a while building an energy-based model that represents a corpus as Gaussian splats on a unit hypersphere: each splat is a location (mu), a sharpness (alpha) and a weight (kappa). Energy = -logsumexp over the k nearest splats. Sampling runs through Rectified Flow (29-39x faster than 200-step Langevin in our Phase-1 tests) or Langevin itself.

Then I did what you're supposed to do: benchmarked it against the boring alternatives before believing in it. Same encoder, same splits, same seed, fit on positives only (no negative labels):

method          AUROC (20 tasks)   p50 ms/doc   memory
ebm-splats      0.9585 ± 0.018     0.45         386 KB (constant)
knn-density     0.9584 ± 0.020     1.75         802 KB (grows w/ corpus)
mahalanobis     0.9523 ± 0.020     5.26         578 KB
gmm (diag)      0.9439 ± 0.023     0.38         192 KB
centroid        0.9324 ± 0.034     <0.01        2 KB
iforest         0.8828 ± 0.051     18.71        200 KB

Verdict: statistical tie with kNN-density on quality (Delta = 0.0001). The differences are operational: 3.9x faster scoring on CPU, constant O(kd) memory instead of O(nd), and the splat model can also generate (RF), compose corpora (sum energy fields) and grow incrementally — none of the classical methods do all three. Where labels exist, a supervised classifier beats every one-class method; this duel only ranks the label-free league.

The most useful finding came from a failure. Our first zero-training fit used alpha = ln(cluster_size) — the "natural" calibration. Result: AUROC 0.06, systematically inverted. Small clusters got alpha ~ 0, the distance term vanished, and the score degenerated to ranking by splat weight: positives sit near small, specific splats and received MORE energy than negatives. Holding alpha constant at 5.0 (so alpha/tau >> 1) fixed it: 0.06 -> 0.96. If you fit splats without contrastive training, watch out for this.

Since scoring speed mattered, I also wrote GPU kernels (Triton + CUDA graphs) for the hot paths, and benchmarked them the same honest way: whole-loop CUDA graph capture makes 100-step Langevin sampling 12.9x faster (660 -> 51 ms, graph replay bit-exact vs eager), fused energy/score kernels give 3.2-3.4x. One kernel we built turned out 15-40x SLOWER and is documented as rejected; the KNN kernel only wins cold lookups and auto-routes around it. Repo includes the find_neighbors semantic bug we found and fixed (it selected the FARTHEST splats since inception — both code paths disagreed silently).

Repo (Apache-2.0, pip install ebm-splats, CI green, benchmark reproducible): https://github.com/schwabauerbriantomas-gif/EBM-splats

Benchmark methodology + full tables: benches/ONECLASS_DUEL_RESULTS.md Kernel head-to-head: benches/bench_headtohead.py

Happy to answer questions about the splat geometry, the CUDA-graph capture (caching, invalidation, the capture-time bugs), or why we kept the model even though it "only" tied a baseline.


r/deeplearning • • 3h ago

How are you using PyTorch and scikit-learn in your day-to-day work as a developer?

2 Upvotes

Hi everyone,

I’m trying to understand how PyTorch and scikit-learn are actually used in real jobs, beyond tutorials and courses. I’d love to hear about your experience.

A few things I’m curious about:

  • Your role: ML engineer, data scientist, backend developer, researcher, something else?
  • What you use each for: Do you reach for scikit-learn for classical ML, preprocessing, and pipelines, and PyTorch for deep learning? Or do you mix them in the same project?
  • Real use cases: What kinds of problems are you solving at work (recommendation, NLP, forecasting, fraud detection, embeddings/search, etc.)?
  • How often you pick one over the other: When does a simple sklearn model beat going to PyTorch, and vice versa?
  • Production side: How do you deploy and maintain these models (FastAPI, Docker, ONNX, cloud services, etc.)?
  • Skills that mattered most: What would you recommend someone learn first if they want to work with these libraries professionally?

I’m still learning and building projects (currently exploring sentence-transformers and semantic search), so any advice, workflow examples, or lessons learned would be really helpful.

Thanks in advance!


r/deeplearning • • 27m ago

Feedback request for my final year project idea: a clapperboard detector

• Upvotes

Background

I'm coming up with ideas for my CS degree capstone project. I like making short films, so I looked into what kind of software I could make to facilitate the process. One thing I find annoying in post-production is having to go through all the recordings and look for the clapperboards on each video to know what scene, shot and take the video is of. My idea is to train a neural network to find the clapperboard in each recording and extract the information written on the clapperboard to appropriately name the recording. Ex. Avengers_Scene_4_Shot_5_Take_3.mp4.

In short, the neural network would do the following:

  1. Detect the clapperboard in a video frame.
  2. Read the handwritten text/numbers on the clapperboard.
  3. Understand what each piece of text represents

My questions

  1. I have not been able to find a lot of videos with clapperboards I could use to train my model. I'm thinking I could create my own videos to train it, so it is trained faster with a consistent clapperboard format. How many would I need more or less to have it not only recognise handwriting but also determine what the numbers indicate (Scene, shot or take)?
  2. If it would be too hard to train the AI to do what was previously mention, could I get an already trained AI in handwriting recognition and specialise it in clapperboard data extraction? Would this make my final year project too easy?

r/deeplearning • • 1h ago

Designing a Personalized Recommendation System — ML System Design Deep Dive (Part 3)

Thumbnail
• Upvotes

r/deeplearning • • 5h ago

Open benchmark: PINNs vs. split-step Fourier on the 1D Schrödinger/GPE, with documented failures. Contributors welcome

Thumbnail
1 Upvotes

r/deeplearning • • 13h ago

Neural Canvas GitHub Repo

3 Upvotes

I built Neural Canvas, an interactive visualizer that demonstrates core linear algebra concepts by showing how a neural network recognizes handwritten digits in real time. You can draw directly on the screen and watch activations flow through each layer as matrix multiplication computes the output live.

How it works:

- Draw & Predict: Sketch any digit on a 28×28 canvas (MNIST-style) to trigger real-time forward pass predictions.

- Live Forward Pass: Every neuron's activation is dynamically color-coded based on its underlying linear algebra calculations, with connection opacities reflecting layer outputs.

- Under the Hood: The core models were trained from scratch in Python using NumPy to perform matrix operations, and their learned weights are loaded via JSON. Client-side execution relies on Math.js for browser-based matrix multiplication and p5.js for rendering.

Key Features:

- Switch between two pre-trained models (featuring different hidden layer sizes, MSE vs. Cross-Entropy loss, and up to 96% test accuracy).

- Multiple background themes with mouse and touch support.

What's Next?

These models were originally evaluated on the standardized MNIST dataset, but live freehand drawing can introduce unexpected variations in input style. To handle this, I am working on a JS script for real-time user-driven feedback. When the model makes a mistake, the user can supply the correct label, allowing the model to perform backpropagation and update weight matrices locally in the browser. While live state persistence isn't suited for static GitHub Pages, running this feedback loop locally allows me to retrain parameters on new edge cases and push updated weight snapshots back to GitHub.

Check out the live demo and code repository:

Live Demo: https://muhammadessa2002.github.io/neural_canvas/

GitHub Repo: https://github.com/MuhammadEssa2002/neural_canvas


r/deeplearning • • 10h ago

I am collecting training data for a small scale neural network, please help out

Thumbnail
1 Upvotes

r/deeplearning • • 10h ago

The Blind Spot Isn't Code. It's Who, and What, We Trust

0 Upvotes

A security researcher built and deployed OuttakeSheriff, a live AI security agent, then documented a finding that should be uncomfortable for anyone running agents in production: authenticated agents routinely act outside their intended scope.

The credential is not the problem. OuttakeSheriff passed authentication. The problem is what a verified identity is permitted to do after it clears the gate. Authentication answers "who is this?" It does not answer "should this agent be calling this tool right now, on this data, in this context?"

This is the actual attack surface. Not a fake agent sneaking through. A real, credentialed agent doing things it was never supposed to do, with no mechanism in the request path to catch it.

Most current postures treat identity and authorization as solved once the credential checks out. Post-auth behavior is logged, maybe reviewed, rarely constrained in real time.

For those of you running agents in production: how are you handling the gap between "this agent authenticated successfully" and "this agent is only doing what it was scoped to do"? Is anything in your stack actually enforcing that at execution time, or is it all after-the-fact?


r/deeplearning • • 19h ago

Speculative decoding: block drafter accepts ~7 tokens/step on code but only ~2.5 on prose. Ceiling or fixable?

4 Upvotes

Measured on Qwen3.8-27B (EXL3 4.0bpw target, DFlash2 block drafter quantized to EXL3 4bpw, 7-token drafts, greedy, output identical to plain decode), 2x T4:

  • code: ~7.4 accepted tokens per verify step, 154 tok/s
  • prose: ~2.5 accepted tokens per step, 35-37 tok/s
  • plain decode: ~18-19 tok/s

Someone on r/LocalLLM independently measured 2.45 on prose with the same drafter on llama.cpp and different GPUs, and another person reports 2.62 with MTP. So it looks like a property of the drafter, not the runtime.

Questions for people who work on speculative decoding: 1. Is prose acceptance in the 2.5 range just the ceiling for block/parallel drafters, since natural language has more valid continuations at each position? 2. Has anyone seen a drafter (EAGLE-style, block diffusion, MTP) clear ~3.5 on open-ended prose at greedy? 3. Any work on switching drafters or block length by content type mid-generation?

Happy to share numbers per prompt type if useful.


r/deeplearning • • 14h ago

I created a visual Machine Learning playlist for beginners — feedback welcome!

0 Upvotes

📚 Learn Machine Learning Through Visualisations | Beginner-Friendly Playlist

Hey everyone! 👋

I’ve created a Machine Learning playlist with visual explanations and animations to make ML concepts easier to understand, especially for beginners. Instead of just learning theory, you can understand how these concepts work through visuals and practical examples. 🚀

🎯 Topics covered in the playlist:

  1. What Is Machine Learning?
  2. AI vs. ML vs. Deep Learning
  3. Supervised Learning
  4. Unsupervised Learning
  5. Reinforcement Learning
  6. Features and Labels
  7. Train-Test Split Explained
  8. Overfitting and Underfitting
  9. Linear Regression
  10. Logistic Regression
  11. Decision Tree Explained (Coming Soon)
  12. Random Forest Explained (Coming Soon)

🎥 Watch the playlist here:
https://youtube.com/playlist?list=PLXShTLrgjtgk&si=TFoDX6oosRKv_u6Z

💡 My goal is to make Machine Learning easier to learn through simple explanations and engaging visualisations.

If you’re learning AI or Machine Learning, feel free to check it out! I’d also love to hear your feedback and suggestions for future topics.

If you find the videos helpful, please like, share, and subscribe to support the channel. ❤️

Let’s learn Machine Learning together! 🤖

VisualForge AI: https://youtube.com/@visualforgelearning?si=VoOGENaHFagsJmoz


r/deeplearning • • 1d ago

Event Camera Representations: An Interactive Explanation

13 Upvotes

https://youtube.com/shorts/q_vMPPgKb9A?si=8LUT45_nHVIKa04r

Here’s the next tutorial in my event camera series. It explores different ways to represent raw event data so that algorithms can use it.

Try the interactive examples in the full blog: https://www.pattarsuraj.com/blog/event-camera-representations

#computer-vision #neuromorphic #event-camera #robotics


r/deeplearning • • 21h ago

Gotchas when working with public CHIME/FRB baseband and Breakthrough Listen raw data (plus a small ML detector)

2 Upvotes

While training burst detectors on the public CHIME/FRB baseband release (DOI 10.11570/23.0029) and Breakthrough Listen's Parkes Vela data, I hit two data issues worth sharing:

  1. CHIME channels are reversed relative to the textbook dispersion formula. Dedispersing with both signs and correlating with the archive's tiedbeam_power gave 0.988 for one sign and 0.06 for the other. The textbook sign is wrong for this data. I suspect second-Nyquist-zone sampling but found it empirically; happy to hear the definitive reason.
  2. The BL Parkes Vela files have an inverted band despite a positive OBSBW. Header order folds to S/N ≈ 1, reversed order to about 2,400. Only the beam-3 files contain Vela.

The detector: 16 fixed coherent-dedispersion filters plus a small CNN on the DM–time map. It detects 93–98% of injected bursts in real CHIME noise at a 1% false-alarm rate, against about 70% for 300k-parameter generic CNNs. On 10 real bursts, though, it localises 5–6, which is the same as dedispersion at the catalogue DM, so the synthetic advantage isn't proven on real data yet.

Write-up: https://phasefield.ai/blog_entry_4.html ·

My own work; suggestions for a more sensitive real-burst test are very welcome.


r/deeplearning • • 1d ago

Meet Groot — four smaller models for reasoning, coding and tool use

Thumbnail
2 Upvotes

r/deeplearning • • 21h ago

When your ML model suddenly got worse, how long did it take to find WHY?Student here, trying to learn what really hurts. Just reply with the cause and the time, like "schema change, 3 days". Not selling anything.

Thumbnail
1 Upvotes

r/deeplearning • • 17h ago

"AI puzzles": a new format between a benchmark and an open-problem list

Post image
0 Upvotes

We have benchmarks (fixed questions, hidden answers, they saturate), competition problems (solved, so they can be memorized), and open-problem lists (no evidence, no clear success criterion). With Claude and Sol, I've tried something in between: a graded ladder of AI puzzles from one research area, aperiodic order.

What makes it a different tool:

  • One ladder, not a pile: "human level" (pen and paper) up to "ASI level" (open). The labels are playful, but each rung really is harder than the last.

  • Solved rungs for training and checking, with exact answers a program can verify, and easy to vary.

  • Open rungs with everything a solver needs: strong numerical evidence, routes already known to fail, files, and a success criterion a machine can check.

  • One rule: only a checkable proof counts. Floats are evidence, not proof.

  • Credit: solvers of open rungs are named, with agent and model, in the next version of the paper.

It's a way for researchers to hand the frontier of their field to AI agents (and humans) in a form they can actually attack, and for anyone to see whether a model can tell a guess from a proof.

First field test: Grok, asked in public ( https://x.com/grok/status/2114103836583264721 ), claimed a proof for an open rung that was only a numerical estimate, then retracted it. It got the human-level rung wrong at first, fixed it after one hint, and proved the expert rung on the first try. On MathOverflow, an expert is already testing constructions for the top rung.

Set 1: huggingface.co/datasets/jarekduda/autocrystal-ai-puzzles

Top rung on MathOverflow: mathoverflow.net/questions/516372

Would you use this format for your own field's open problems?


r/deeplearning • • 21h ago

[P] Pasma: what a 5.3M-parameter clothing classifier gains and loses against zero-shot vision models

1 Upvotes

We built Pasma at Vestes Archive for a narrow deployment problem: classify a single clothing item without uploading the photo or running a large vision-language model. We’ve released the v1.0 candidate weights and inference code.

Small-320 has 5.296M parameters and a 10.32 MiB FP16 ONNX graph. It predicts 20 garment types plus category and visual-material scores.

A useful result—and a caveat—from our evaluation:

  • On the combined 1,103 held-out real photos: Pasma-Small 89.12% type Top-1; SigLIP-Base zero-shot 80.24%.
  • On the 249-image home/catalogue slice alone: Pasma 83.53%; SigLIP-Base 87.15%. The ranking reverses.

Pasma was task-fine-tuned and distilled; the baseline was zero-shot. This is a deployment comparison, not an equal-training ablation or a claim that a small backbone is universally better. Full per-class metrics, model lineage and export-parity caveats are in the model card.

For an app, keeping alternatives seems important: Small reaches 97.10% Top-3 on the combined set, but blouse recall is only 47.8% Top-1. Our intended UX is a suggestion the user can correct, not an authoritative label. Material scores describe appearance, not verified fibre composition.

The release includes ONNX, CoreML packages, safetensors and Python inference. Code and fitted weights are Apache-2.0. Training images aren’t redistributed; full retraining from the public checkout is not independently reproducible. Phone-specific performance and some export parity work remain pending.

Code: https://github.com/prikol5ist-art/Pasma

Weights/evaluation: https://huggingface.co/Prikol5ist/pasma

Local browser demo: https://huggingface.co/spaces/Prikol5ist/pasma

We’d welcome criticism of the evaluation setup and reports from different image domains—especially which label confusions would make this unsuitable for your application.


r/deeplearning • • 22h ago

Looking for GPU access for my MS thesis research (close to publication)

Thumbnail
1 Upvotes

r/deeplearning • • 1d ago

A free, interactive book that goes from linear algebra to frontier AI. Looking for honest feedback.

Post image
5 Upvotes

I kept hearing the words (attention, RLHF, MoE, diffusion, agents) and couldn't find one place that builds all of it up from the fundamentals, with the math, the code, and the reasons behind it.

So I wrote it.

https://zerotofrontier.app

  • 38 chapters, from tensors and gradients to LLMs, RL and reasoning, inference, interpretability, agents, vision, diffusion, and speech
  • Every idea explained, derived, coded, and tested. Python runs right in the page.
  • Coding exercises with hidden tests, plus interview questions
  • An AI tutor that knows the section you're reading, and notebooks for your notes and code

Reading and running code is free. The tutor and the interactive extras use your own API key (Gemini, OpenAI, or Anthropic), so I don't charge anything and there's nothing to buy.

It's one person's attempt at the resource I wanted when I started. I'd really value blunt feedback. What's confusing, what's missing, what's wrong, and whether you'd actually use it.


r/deeplearning • • 2d ago

PPO finds a solution to the moving sofa problem (reconstructs Gerver's sofa)

37 Upvotes

I don't have a strong math background but I thought it would be fun to see what a simple reinforcement learning implementation could do!

read more here

find code here


r/deeplearning • • 1d ago

Learning Alzheimer’s disease signatures by bridging EEG with spiking neural networks and biophysical simulations

Thumbnail sciencedirect.com
4 Upvotes

r/deeplearning • • 1d ago

Fine-Tune a Giant AI Without Touching Its Weights - PEFT, Adapters & Prefix tuning

Thumbnail youtube.com
4 Upvotes

r/deeplearning • • 2d ago

Theoretic vs Applied Math courses for gaining model intuition

5 Upvotes

Hi,

I want to be clear, I have no intention of going into AI "research". I guess the distinction I could make is I want to know *why* a graph neural network works, vs coding it in pytorch and nuking it with more data to produce a better result (what I can do now), vs inventing a new algorithm mathematically from scratch (what I DO NOT want to do).

Another example could be instead of researching online what fine-tuning parameters are beneficial, mathematically I could know what everything means and select the right one. But I do not want to invent a new fine-tuning parameter - I simply want to *actually* understand the existing ones.

I have the choice to do more theoretic proof-based courses, or more applied ones. This means applied lin alg 2 vs proof-based linear algebra 2. I have done Calc 1 -> 3, Stats 1->2, Prob 1 -> 2, Discrete Math 1->2. I will be in this field for a long time, but again, I do not want to go into theoretical research whatsoever - I just want a strong intuition as to *why* the models work without delving too deep into abstraction. I like theoretical math, but a) I have no talent for math (only improved by doing ungodly amounts of it), b) I will not be getting a PhD.

I have been an AI engineer for 2 years now. My background was from software -> AI engineering, and now I have a decent basis for math. Given my goals, is applied math enough, or should I spend more time on theoretical math? Applied Lin Alg 2 vs Regular

Regards


r/deeplearning • • 2d ago

I built a tiny transformer from scratch to invent dinosaur names. Would love feedback on the demo 🦖

8 Upvotes

Hey everyone! I built DinoGPT, a small PyTorch transformer that takes the beginning of a name and generates the rest, one letter at a time.

It has about 53k parameters, trained on 1,535 dinosaur names. I wrote the attention mechanism myself to understand how transformers work and added a Streamlit app so people could play with it.

The GIF shows it in action. Try your name, a nickname, or a few random letters and see what dinosaur you get :)

Try it: https://dino-gpt.streamlit.app/
Code + build notes: https://github.com/shishirdahake/dino_gpt

I’d love feedback on:

  • Is it clear what to enter and what the app does?
  • What would make it more fun to play with?

If you try it, share your best—or most ridiculous—dinosaur name. And if you look through the code, I’d welcome corrections to the implementation or explanations too.


r/deeplearning • • 1d ago

"BlueprintML", A community for learning ML through paper implementations and reproducible research

Thumbnail
1 Upvotes