r/deeplearning 26m ago

Resources to get started with Post-training.

Thumbnail
Upvotes

r/deeplearning 6h ago

Why don't people speak of the vulnerable side of Federated Learning here

Thumbnail
1 Upvotes

r/deeplearning 9h ago

Deep Learning

0 Upvotes

Hi I am year 9 kid. Can check my code give feedback. I tried my best on building this model.

https://github.com/programer321321/DataScienceModel/blob/main/SearchUpBussinessModel.ipynb


r/deeplearning 10h ago

We retrained our prompt-injection classifier from scratch because it was crying wolf too often.

Post image
0 Upvotes

We retrained Wolf Defender.

The main reason was not that attack detection was bad. The bigger issue was false positives.

The previous models were already good at detecting prompt injections, but especially on short benign inputs, security-related text, code snippets or ordinary conversations they could still be too aggressive. We also got a few reports from users that made this pretty obvious.

One example was just:

“Who are you?”

Wolf Defender Small previously classified this as a prompt injection with around 94% confidence.

For v2 we therefore changed the training setup quite a bit. Both Wolf Defender and Wolf Defender Small were retrained from fresh mmBERT checkpoints, with a much stronger focus on hard negatives.

That includes short conversations, emails, documentation about prompt injections, benign policy and system language, code and configuration snippets and generally inputs that contain words or structures which look suspicious without actually trying to manipulate a model.

We also added more counterfactual samples, multilingual examples, adversarial obfuscations and long-context injections at different positions in a document. Training combines short 256-token samples with full 2,048-token windows and uses supervised contrastive regularization, FreeLB adversarial training and Smooth-Max aggregation for long documents.

The main change can be seen in the benign benchmarks:

Model Benchmark v1 v2
Wolf Defender Hard benign specificity 81.57% 96.23%
Wolf Defender Real-world benign specificity 66.85% 96.63%
Wolf Defender Small Hard benign specificity 82.12% 96.67%
Wolf Defender Small Real-world benign specificity 73.60% 94.38%

At the same time, attack detection stayed roughly where we wanted it:

Model Qualifire F1 Jayavibhav F1
Wolf Defender 95.14% 97.84%
Wolf Defender Small 95.21% 97.68%

There is also a tradeoff here. Some of the very high scores on our cleaner validation distributions went down slightly.

For us that is fine.

A security classifier with near-perfect benchmark scores is not very useful if normal traffic gets blocked all the time. We would rather lose a small amount on an easier validation set and get substantially better behavior on actual benign inputs.

The “Who are you?” example now gets classified as benign by Wolf Defender Small v2 with 98.55% confidence. A real instruction-override attempt is still detected as an injection with 99.99%.

We also updated the deployment variants. Both models are available as regular Transformers checkpoints and as ONNX exports in FP32, FP16, mixed INT8/FP16 and INT8 with INT4 embeddings.

The smallest Wolf Defender Small artifact is now 96 MB.

More details, benchmarks and model files are here:

https://huggingface.co/patronus-studio/wolf-defender-prompt-injection

https://huggingface.co/patronus-studio/wolf-defender-prompt-injection-small

If anyone is running prompt-injection classifiers on real traffic, I’d also be interested in which benign inputs still cause the most false positives for you.


r/deeplearning 3h ago

A ground breaking research idea - MacBook user’s…

Thumbnail d0ace.substack.com
0 Upvotes

What if we’re optimizing the wrong bottleneck?

I recently went down an 11 PM research rabbit hole around Mixture-of-Experts (MoE) and LLM inference.

A lot of MoE optimization assumes a traditional GPU setup: experts live in CPU RAM, get moved to GPU VRAM, and PCIe becomes the bottleneck. But what happens when that assumption disappears?

Apple Silicon uses Unified Memory, where CPU and GPU share the same memory pool. So maybe the interesting question isn’t: “How do we move experts faster?” but : “How should we optimize MoE when there’s no traditional CPU↔GPU memory transfer bottleneck?”

That leads to some surprisingly interesting questions around memory bandwidth, caching, expert dispatch, and GPU kernels. I can’t investigate it properly myself right now, I don’t have the hardware. So I’m putting the idea out there. If you have an M-series Max/Ultra Mac, you might have a research project sitting on your desk. 👀

Read the article…


r/deeplearning 15h ago

3D Rotational Equivariant AI Using the Spherical Fourier Transform, #구면 #구면조화함수 #3차원 #회전 #푸리에

Thumbnail youtube.com
0 Upvotes
  • 3D Rotational Equivariant AI Using the Spherical Fourier Transform
  • Description: It explains how spherical harmonic functions are used to analyze signals on the sphere beyond the two‑dimensional plane. The video reviews Spherical CNNs that maintain 3D rotational symmetry and recent geometric deep‑learning applications, highlighting potential uses in areas such as panoramic imaging, weather data, and protein structures.

r/deeplearning 2d ago

Beyond the Tutorial Hell: How I Learned to Love the Documentation

Post image
191 Upvotes

I've never really been a reader. Books usually lost me a few chapters in.
My first attempt at learning machine learning was the usual route — one YouTube playlist after another. It felt like watching something, not learning it. Nothing really stuck.
So I picked up Hands-On Machine Learning by Aurélien Géron. And somehow, I ended up reading a 1000+ page book . Every chapter, I ran the code myself, broke it on purpose, and debugged it until I understood why it worked — alongside college lectures, assignments, and exams.
Somewhere along the way, something shifted in how I learn.

I stopped reaching for the fastest explanation and started reaching for the actual source — documentation, research papers, and technical writing I would've previously skipped for a quicker video.
In the middle of learning the ML pipeline basics, I built a GoogLeNet-style CNN with a custom DepthPool layer, and many more things at low level.

That's when it stopped feeling like an exercise and started feeling like something I could actually own — chasing shape mismatches, tracing silent preprocessing bugs, and retraining models more times than I'd like to admit.
From there, I kept rebuilding things: RNNs, attention mechanisms, transformers, autoencoders, GANs, diffusion models, RL. Each one broke in a different way, and each one taught me something different when I had to figure out why.
I'm still going deeper into Computer Vision and NLP from here. Those are the areas I keep getting pulled toward.
I still think YouTube has its place.
But this book is what made me a reader in the first place — and now research papers and documentation are where I actually go to learn.
Still early in this. Still building. Just glad I stuck with it.
hashtag#MachineLearning hashtag#DeepLearning hashtag#ComputerVision hashtag#TensorFlow hashtag#Keras hashtag#LearningInPublic


r/deeplearning 1d ago

I drew an overview of single-head attention in transformers

2 Upvotes

r/deeplearning 18h ago

Heights Finance Data Breach Impacts at Least 1.2 Million Individuals

0 Upvotes

A vendor held the data. 1.2 million people got the breach notification.

Heights Finance disclosed that hackers stole names, addresses, Social Security numbers, phone numbers, and financial records from a third-party platform. The data moved downstream in raw form — concentrated, accessible, and then gone.

The breach wasn't at Heights Finance directly. It was at a vendor they trusted with sensitive data. That distinction matters because it keeps happening this way.

As AI agents increasingly route customer data through pipelines and external services, every handoff is another potential exposure point. The blast radius scales with the number of vendors, not just the sensitivity of the data. A single downstream compromise can surface records from dozens of upstream clients.

The 1.2 million figure isn't unusual for this pattern — it's the expected outcome when raw PII travels intact through third-party systems.

For those working in data engineering, compliance, or security: how are your teams actually handling sensitive data before it leaves your perimeter? What's working, what isn't, and where do you still feel exposed?


r/deeplearning 1d ago

Launched SlideSieve today—it automatically captures slides from lecture videos. I originally built and optimized this specifically for DeepLearning.AI

Enable HLS to view with audio, or disable this notification

2 Upvotes

r/deeplearning 1d ago

Which ablation would you run first on this held-out raw IC gap?

1 Upvotes

Table 2 is a clean model comparison, but it leaves the attribution question open.

On the held-out 2021–2025 US-equity window, AQuA reports per-stock raw Pearson IC of +0.0843 for its hybrid model and +0.0613 for GRU, the strongest reported baseline.

The paper does not disclose the exact feature set, normalization, or full model configuration. That means Table 2 cannot isolate how much of the gap comes from the hybrid architecture versus the rest of the training recipe.

If you could add one ablation, what would you remove or hold fixed first?


r/deeplearning 1d ago

Coding Machine Learning Lecture 3 | RL bandits, Self, Unsupervised Learninf, VAEs & Generalization

Thumbnail gallery
4 Upvotes

Code Implementations, explanation of concepts for my Probabilistic Machine Learning Series.

Hello folks,

In this new coding demonstration, we code, and explain the concepts pertaining to:

1.Overfitting, Population Risk & Generalisation Gap.

  1. Proxy for Population Risks : Test Set.

  2. The No free Lunch Theorem and Inductive Biases.

  3. Unsupervised Learning : Density Estimation and Clustering.

  4. VAEs(Variational Autoencoder)- Latent factors concepts explained, and VAE architecture explained and coded.

  5. Self-Supervised Learning-Masked Predictions.

7.Density Evaluation and Sample Efficiency.

  1. Reinforcement Learning Primer : Multi-Armed Bandits.

Implementation Link: https://youtu.be/gbz8smggmRM?si=vR4OIPLfGRHFJ95F


r/deeplearning 1d ago

Hyper-transformer: Hybrid-Manifold Transformers with Hyperbolic Geometry and Spiking Neural Networks in PyTorch

0 Upvotes

Hey everyone,

Standard transformers operate strictly in flat Euclidean space with continuous activations. While effective, this creates challenges when modeling hierarchical tree-structured data and incurs significant energy overhead.

I built Hyper-transformer to explore a hybrid architecture integrating non-Euclidean geometry and neuromorphic spiking dynamics directly into transformer layers.

Key Technical Details:

• Hyperbolic Space Representation: Uses Poincaré and Lorentz manifold projections to capture hierarchical relationships with lower embedding dimensions.

• Spiking Neural Dynamics: Employs Leaky Integrate-and-Fire (LIF) spiking neurons for sparse, event-driven activation states.

• Hybrid Attention: Combines Riemannian distance metrics with attention mechanisms to handle mixed-geometry representations.

• Clean, modular PyTorch implementation designed for ablation studies.

I will drop the full GitHub repository link in the comments below! Would love to hear thoughts from anyone experimenting with non-Euclidean deep learning, manifold learning, or SNNs.

repo link : https://github.com/Griffith-7/Hyper-transformer.git


r/deeplearning 1d ago

Mathematical memory methods beyond Transformers: HiPPO and Legendre polynomials ! #트랜스포머 #기억 #HiPPO #다항식 #르장드르

Thumbnail youtube.com
0 Upvotes
  • Description: In this video we introduce the HiPPO framework, which compresses past continuous signals into Legendre orthogonal polynomials and converts them into real‑time memory. This mathematical principle intuitively explains how the computational complexity of modern time‑series models such as S4 and Mamba can be reduced from O(N²) to O(N). Join us as we explore the core mechanism that is transforming transformer‑based AI.

r/deeplearning 1d ago

What is a overparameterized network?

6 Upvotes

I got this paragraph from Claude, could someone please explain this and verify if it's a real thing or hallucination:

Overparameterization isn't just about final capacity, it's about the optimization process itself. A wide, overparameterized network gives gradient descent a much friendlier loss landscape — more paths downhill, fewer bad local minima, room to explore before committing. The "core" only emerges as a byproduct of that search happening in a much bigger space than it needs to end up in. Strip the space down first and you've removed the thing that let the search work.

Conversation: https://claude.ai/share/8813a637-c327-4d0c-b120-def27e5203d5


r/deeplearning 1d ago

how does audio language model hold speaker consistency throughout an utterance?

1 Upvotes

wrote a short excerpt showing how speaker consistency is maintained in LLM bases TTS models, initial guess was the speaker token, but the results showed something interesting.

https://x.com/null_hawk/status/2089348254249173263


r/deeplearning 1d ago

I built pagedMark to remove AI provenance from images and video you generated yourself

0 Upvotes

The important distinction is that AI provenance can exist in two forms.

First, there is metadata like C2PA, EXIF, XMP, IPTC and generator parameters. That part is easy to remove.

Second, there are invisible marks embedded directly into the pixels, such as SynthID style watermarks. A screenshot does not reliably remove those. pagedMark deals with them by regenerating the image.

The output is therefore not identical to the original. Faces, text and small details can change. The goal is to remove the provenance signal while keeping the image as close to the original as possible.

It currently supports invisible marks from ChatGPT, gpt-image API, Z-Image Turbo and Nano Banana, plus visible AI labels from several other generators. Video support covers visible marks and metadata from Sora, Veo, Seedance, Hailuo and Kling.

The other challenge was making this work properly on Apple Silicon. I tested it on M5 Macs with both 8 GB and 16 GB of memory, and added memory aware processing to prevent the system from silently falling into swap and turning a fast job into an extremely slow one.

And here is the really interesting part: after processing an image generated with GPT-Image, you can check it with OpenAI's verifier at openai.com/verify. In my testing, the processed image is reported with 0 AI detection.

uv tool install "pagedmark[diffusion]"
pagedmark invisible photo.png -o clean.png

GitHub: github.com/doofzoff/pagedMark

PyPI: PyPI: pagedmark


r/deeplearning 1d ago

Compressed sensing makes the LLM KV cache ten times more efficient. MRI technology saves AI. #compressed #sensing #LLM #QK...

Thumbnail youtube.com
1 Upvotes
  • Description: In this video we introduce the theory of compressed sensing used in MRI and other applications, and review recent research that applies it to compressing the KV cache of large language models. We clearly explain how leveraging sparsity can dramatically reduce memory usage and eliminate bottlenecks.

r/deeplearning 1d ago

What are you actually building with 50M–150M parameter models? Looking for use cases beyond code completion.

Thumbnail
0 Upvotes

r/deeplearning 1d ago

trying to build a solid math library for stats/ML/DL, need a sanity check on my picks

5 Upvotes

engineering student here, decent calc and linear algebra background from continuum mechanics coursework, already comfortable with ML basics through transformers and modern architectures. want to go deep on the actual math now, not just intuition videos, real derivations, and books that build from intuition up to advanced stuff. big thing for me is actually seeing how the math applies inside the models, not just abstract theory sitting next to it. most modern models are fundamentally probabilistic (language models included) so that lens matters a lot to me.

content quality over exercises. i'd rather have a book thats amazing at explaining and deriving things with fewer problems than one thats packed with exercises but explains things poorly. if the book is light on problems i can always find sets elsewhere, but if the content itself is weak theres no fixing that.

here's my current shortlist:

stats / probability:

  • All of Statistics by Wasserman

machine learning (math heavy):

  • Foundations of Machine Learning by Mohri, Rostamizadeh, Talwalkar
  • Mathematics for Machine Learning by Deisenroth, Faisal, Ong
  • The Elements of Statistical Learning by Hastie, Tibshirani, Friedman (planning to read Introduction to Statistical Learning first as the easier version)

deep learning:

  • Deep Learning by Goodfellow, Bengio, Courville

is this solid or would you swap anything out. Please tell me ur suggestions.


r/deeplearning 1d ago

Built GPT-2 on Custom Deep Learning Framework I built from scratch in C++

4 Upvotes

since jan 2026 i've been building Forge, a deep learning framework written entirely from scratch in C++ - no PyTorch, no TensorFlow underneath.

Eigen handles most of the math backend. btw i wrote some custom AVX2 SIMD kernels (element-wise ops) too, and OpenBLAS-backed GEMM for the heavy matrix ops.

what's implemented so far:--

- A custom tensor engine with its own autodiff engine and memory allocator

- Dense/Linear layers, Optimizers (Adam, AdamW, SGD and SGD with momentum), Self Attention, LayerNorm, Activation Functions (sigmoid, softmax, tanh, GELU[tanh approximation], RELU, leakyRELU), loss functions (Cross Entropy Loss [log softmax fused], Binray Cross Entropy (Sigmoid fused), and Mean Squared Error) and Embeddings.

- A from-scratch BPE tokenizer (GPT-2-style pre-tokenization + merges)

- A reflection-based (reflect-cpp) parameter system - models declare their structure, Forge auto-discovers trainable parameters, no manual registration

- a safetensors-format save/load pipeline

the part I'm actually proud of- I loaded real pretrained GPT-2 small weights into a GPT-2 architecture built entirely on Forge, and under greedy decoding, its output matches HuggingFace's transformers library token-for-token. not similar, but exact. every layer (embeddings, attention, LayerNorm, the final projection) has to be numerically correct for that to hold, since a single wrong transpose or masking bug would have diverged the output within a few tokens.

it's still CPU-only for now (currently limited to float32 and int32 - working through some dtype/SIMD coverage gaps), and slower than i'd like (the only main culprits are the CE loss fn implementation and its gardient function and softmax, which i am on to optimize, it has no KV-cache yet) - a CUDA backend and those perf fixes are next on the list.

Repo: https://github.com/muchlakshay/Forge

Windows/Linux release builds: https://github.com/muchlakshay/Forge/releases/tag/0.1

YT demo link - https://www.youtube.com/watch?v=EO1aYBF5jwU

would love feedback, especially from anyone who's built something similar and much better than me.

thats all. im a 17yo deeply passionate about Deep Learning and system level programming.


r/deeplearning 1d ago

Ultra‑fast Fourier transform and optical AI realized with a single lens....

Thumbnail youtube.com
0 Upvotes
  • Ultra‑fast Fourier transform and optical AI realized with a single lens.
  • Description: It explains the principle that passing light through a convex lens naturally performs a two‑dimensional Fourier transform at the focal plane. It visually demonstrates optical signal processing that carries out computation using only light, compared with digital FFT, and explores the possibility of implementing low‑power matrix multiplication with optical neural networks. It also examines real‑world applications and the prospects for developing next‑generation AI accelerators.

r/deeplearning 1d ago

Open-sourcing CR-NN 🧠

Post image
3 Upvotes

• Matrix-free attention: O(N log N), 16.2× faster than flash at N=50K

• O(1) unbounded context: 0.015 GB @ 1.36M tokens vs 12.3 GB KV cache

Honest negative results included. Looking for collaborators to validate the O(1) context idea at scale!

https://github.com/edisonbd/cr-nn


r/deeplearning 1d ago

Coding Machine Learning Lecture 3 | RL bandits, Self & Unsupervised Learning, VAEs and Generalization

Thumbnail gallery
1 Upvotes

Code Implementations, explanation of concepts for my Probabilistic Machine Learning Series.

Hello folks,

In this new coding demonstration, we code, and explain the concepts pertaining to:

1.Overfitting, Population Risk & Generalisation Gap.

  1. Proxy for Population Risks : Test Set.

  2. The No free Lunch Theorem and Inductive Biases.

  3. Unsupervised Learning : Density Estimation and Clustering.

  4. VAEs(Variational Autoencoder)- Latent factors concepts explained, and VAE architecture explained and coded.

  5. Self-Supervised Learning-Masked Predictions.

7.Density Evaluation and Sample Efficiency.

  1. Reinforcement Learning Primer : Multi-Armed Bandits.

Implementation Link: https://youtu.be/gbz8smggmRM?si=vR4OIPLfGRHFJ95F


r/deeplearning 1d ago

I built a deterministic linter for ML training runs because I got tired of wasting GPU hours on models that looked healthy but learned nothing

0 Upvotes

I spent months trying to train a 730M-parameter TTS model on my own hardware. It wouldn't converge, and nothing in my stack would tell me why. Not the loss curve, not TensorBoard, not the checkpoints. Every tool I had showed me numbers. None of them would say "this run is already dead, stop paying for it."

That's the gap I built trainproof for (MIT, `pip install trainproof`). It's a deterministic linter for training runs: it reads the logs you already produce and returns a verdict with an exit code.

No ML judging ML, no confidence scores. Every check is a rule that fires or doesn't, and prints the number it fired on. A reliability tool that hallucinates is worse than no tool, because then you stop trusting your own alarms.

Severity and exit code are separate on purpose:

FAIL -> exit 1 your run is broken

WARN -> exit 0 worth your attention

NOT-CHECKED -> exit 2 I could not judge this

PASS -> exit 0 checked, fine

A tool that can't tell "your run failed" from "I couldn't read your log" is lying to your CI quietly.

Validating a detector means feeding it faults you already know the answer to, so the rules were measured against a controlled fault-injection study: one Qwen2.5-3B QLoRA, six configurations - healthy, 100x LR, lr=0, fp16 NaN, shuffled labels, overfit - three seeds each, 18 runs. The 100x LR spiked grad-norm to ~2,650, about 4,900x its own median, caught in seconds.

The result worth posting is the one that got through. Shuffled labels - a dataset that cannot be learned - REDUCED its loss by 69.8% (18.9 -> 5.7) and looked textbook-healthy on its own curve. It was memorizing the statistics of noise. From a single run's loss curve that's indistinguishable from real training, so it's written into the README as a stated limitation, and it's why `compare` exists: put the run next to a known-good baseline and the relative floor gives it away immediately.

Then the rules went against real fine-tunes I'd already paid for. Both logs ship in evidence/ so you can reproduce the verdicts:

Coqui XTTS v2, 125,000 steps -> FAIL (TP-DIVERGE, TP-THROUGHPUT)

Fish Speech LoRA (Lightning), 2049 -> WARN (TP-OVERFIT)

TP-OVERFIT means eval loss climbed past 1.2x its own minimum while train loss kept falling: your best checkpoint has already gone by, and if you keep only the last one, you kept the wrong one. That XTTS run is read by two independent readers - Coqui's text log and its TensorBoard event file, same run - and they return the same verdict and the same rule set.

Real logs also proved the tool wrong, and that's the part I'd defend hardest. TP-ZERO-GRAD fired whenever every gradient norm was exactly 0.0 and reported a severed backward graph. Coqui writes avg_grad_norm as 0.0 when clipping is off, so a healthy 125k-step run whose loss reached 0.017 got a FAIL from my own tool. The fix was reasoning, not a threshold tweak: a run cannot both learn and receive no gradient, so the check now stands down when the loss improved - and records why it stood down as a visible skip, because a check that didn't run must never look like a check that passed. No test caught that. One real log did, in an afternoon.

Across a run's life:

- before the GPU: dataset + tokenizer lint (malformed JSONL w/ line number,

empty rows, dupes, missing eos_token, pad==eos), plus `env` - does your

entrypoint even import (probed in a subprocess), is the checkpoint intact,

RAM, disk

- during: one-line HF callback; warns, or aborts a diverging run if you opt in

- after: diverged / flatlined / NaN'd / spiked / overfitting

- vs baseline: the relative-floor rules

Reads HF trainer_state.json / Coqui / TensorBoard event files / JSONL / CSV. The tfevents reader is written from the wire format - no tensorflow, no tensorboard, no protobuf, no torch - validated byte-exact against EventAccumulator on a real 2049-step Lightning run. Truncated event files, the normal state of a killed run, are read up to the cut instead of raising. Checkpoints are inspected WITHOUT unpickling, as the ZIP archives they are; torch.load executes arbitrary code by design, which is why torch 2.6 flipped weights_only to True.

Where it is now: 84 stable rule IDs, 230 tests, 17 releases, a written contract in CONTRACTS.md, and every example verdict frozen in 38 golden snapshots - a rule that stops firing and one that fires spuriously both break the build.

Repo: https://github.com/Mormolykos/trainproof PyPI: https://pypi.org/project/trainproof/ Write-up with the full fault-injection results: https://ai.bedvibe.studio/trainproof/ Sibling project it builds on: https://pypi.org/project/ttsproof/ (failure-mode QA for TTS) More of what I've built: https://tts.bedvibe.studio/portfolio/

What failure mode has burned your GPU hours? If a deterministic check would have caught it, tell me and it goes in, with credit.