r/deeplearning • • 15h ago

Mixture of experts: how the routing works, when it breaks, and two ways to fix it

Enable HLS to view with audio, or disable this notification

33 Upvotes

I've been working on Mixture of experts (MoEs) and sparsity for a few years now, so I thought I'd make a short video explaining how MoE routing works.

For the video I trained a tiny character model with a 32-expert layer three times, on English, Python and arithmetic text.

Run 1, token choice with no balancing loss: a few experts get most of the tokens. Early in training one expert gets 57% of them while 17 of the 32 are barely used.

Run 2, token choice with a load-balancing loss: tokens spread out roughly evenly and every expert gets work.

Run 3, expert choice: each expert picks its own tokens, so the load is perfectly even, but some tokens get picked by no expert and others by several. It also ended with the lowest eval loss of the three.


r/deeplearning • • 6h ago

AI Agents Linked to Tencent Cloud Probed Alibaba's Amap, Researchers Say

4 Upvotes

Researchers tracked more than 2,600 AI agent attempts targeting Alibaba's Amap from Tencent-linked cloud infrastructure. None of the agents had authorization to access that service.

These were not human operators pivoting through tooling. They were autonomous agents running coordinated, repeated reconnaissance against a live production system at machine speed. Human-paced incident response cannot match that cadence.

The exposure here is not a misconfigured firewall or a leaked credential. The agents operated against a production service with no verified identity, no declared scope, and no gate between their initialization and their first outbound request. The target service had no way to distinguish a legitimate automated caller from an adversarial one before the probe landed.

For those running production APIs or services that autonomous agents — not humans, not static service accounts — might reach: what does your authorization boundary actually look like at the moment of first contact? Not at login, not in a post-incident log — at the exact moment an unknown agent makes its first request.


r/deeplearning • • 1h ago

Seeking help on my new GNN type system

• Upvotes

I am searching for answers while exploring graph neural networks, and i'm also searching for people who are willing to look outside of the language model approach to deep learning.

I'm working on a system right now. I have the scripts running functionally as a toy. Because deployment and scalability are difficult without a team and without more information for my system to process to buold relationships.

Would anybody know where to go to find focused deep learning corpora, that is open source and properly filtered?

I am searching for anything I can regarding mathematics, human language including historical incomplete languages, physics and all categories of the science.

I am looking for something dense, educational and clean.


r/deeplearning • • 1h ago

AgentGarten: Code Worlds for Evolving Agents

• Upvotes

AgentGarten separates interactive-world state from its visual presentation: executable scene code updates persistent state and interaction rules, while a shared neural renderer turns structured geometry conditions into observations. This lets an agent act on video-like inputs without making the simulator’s state depend on generated frames.

The renderer is adapted from a pretrained video model and trained with Adversarial Forcing. A notable component is exact block-by-block replay: it restores gradients through the history used for later predictions while preserving the original attention execution. The reported replay is bitwise identical to the cached rollout; the full-sequence alternative has a 3.99% relative L2 error.

In interactive tasks, pretrained agents refine inherited playbooks across rounds. The paper reports shelter construction by round 4, compared with roughly 25 million episodes in an earlier self-play result, while noting that these are not directly comparable: the agents start with pretrained knowledge and are learning to ground it in this setup. The renderer’s training and history-gradient method seem the most broadly relevant contributions; the agent results depend more heavily on the choice of pretrained model and task.

Full summary on AIModels.fyi

Original paper

Disclosure: AIModels.fyi is my site.


r/deeplearning • • 3h ago

[Tutorial] Getting Started with Bedrock AgentCore

1 Upvotes

Getting Started with Bedrock AgentCore

https://debuggercafe.com/getting-started-with-bedrock-agentcore/

In this article, we will cover an introduction to Bedrock AgentCore and check the process from creating agents to their deployment.


r/deeplearning • • 9h ago

We added numerical outputs to decision models

Post image
2 Upvotes

r/deeplearning • • 7h ago

Deep Learning in Biology by Dr. Edo Dotan

Thumbnail youtu.be
1 Upvotes

This video features a talk by Dr. Edo Dotan titled "Deep Learning in Biology," presented to the Allen Discovery Center at Tufts University. The presentation explores the intersection of Artificial Intelligence (AI) and genomics, focusing on how Deep Learning—specifically Transformer architectures—can be applied to biological sequences.

Key Topics Covered:

• Introduction to AI/ML/DL Hierarchy: A breakdown of how Deep Learning resides within Machine Learning, which is a subfield of AI (1:09).
• Data Representation: Discussion on various data types in biology, including graphs, images, text, and, crucially, genomic sequences (5:28).
• The Challenge of Biological Data: Biological sequences like DNA are analyzed similarly to text strings but present unique challenges compared to standard English, such as different hierarchies, structures, and overlapping gene information (7:57).
• Tokenization in Transformers: Dr. Dotan explains the crucial role of tokenization in transformer models and its effect on performance when applied to genomic data (17:13). He highlights the methodology of training models using different approaches like BPE (Byte-Pair Encoding) vs. k-mer tokenization (20:12).
• BetaDescribe: The talk introduces a framework called BetaDescribe, designed for protein sequences (29:05). This model uses a modular architecture (35:46) including a generator, an evaluator, and a controller to provide rich, meaningful descriptions of protein functions.
• Case Studies & Future Paradigms: The presentation concludes with examples of using BetaDescribe to illuminate the "uncharacterized proteome," moving toward a new paradigm of biological annotation and experimental design (48:00).


r/deeplearning • • 18h ago

Best books about building computer vision models from scratch

6 Upvotes

For those who are familiar with the books by Sebastian Raschka (i.e. "Build a LLM/Reasoning Model from Scratch"), do you know of any recent similar books with a focus on computer vision models (e.g. CNNs, ViTs, Swin etc)? I would like to develop a more in depth understanding by building these models from scratch and I think the approach used by Raschka does exactly that for language models. Any recommendations are welcome!


r/deeplearning • • 9h ago

We gave a decision model anytime reasoning

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/deeplearning • • 9h ago

Wikipedia race: Span-02 vs GPT-6 Luna

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/deeplearning • • 10h ago

I built a CLI that tells you how efficiently your GPU is actually training your model

Thumbnail
1 Upvotes

r/deeplearning • • 14h ago

I'm learning CNNs, but I'm getting lost in all the technical terms. How can I understand and explain them simply?

Thumbnail
1 Upvotes

r/deeplearning • • 17h ago

I built a simulator with a PPO agent to beat TempleRun on a phone

Thumbnail
1 Upvotes

r/deeplearning • • 12h ago

unpopular opinion: JAX-JS is by far the most capable javascript tensor library for deep-learning

Post image
0 Upvotes

r/deeplearning • • 1d ago

Does anyone else understand the math of deep learning so well that you could probably do it without using any DL libraries if you had the time and motivation?

28 Upvotes

r/deeplearning • • 19h ago

Diffusion models as surrogates for simulations of cells forming vessel-like networks

0 Upvotes

A cell-based simulation calculates how cells move and respond to their neighbours. Repeating it under many settings is expensive, and random variation means the same settings can produce different final patterns.

Comlekoglu et al. trained a class-conditional diffusion model on images from a simulation of vessel-like network formation. The input is one of the tested simulation settings plus noise; the output is a possible final pattern, rather than the full sequence of cell movements.

They reported 20.6 seconds per generated pattern on four V100 GPUs, versus 447.6 seconds for CompuCell3D on an AMD EPYC CPU node. These are different hardware setups, and the comparison excludes training on 16 V100 GPUs.

The model covered 25 discrete parameter settings. Classifier checks and network-shape measurements helped evaluate outputs, but some patterns remained imperfect. Generating valid samples between those settings remains unresolved. The result concerns reproducing simulation outputs, not proving that the underlying biology is correct.

Paper: https://arxiv.org/abs/2505.09630

Explanation: https://rewirebio.io/blog/diffusion-surrogates-for-agent-based-biological-simulations/

Disclosure: the explanation is from my site, rewirebio.io. This summary and schematic were prepared with AI assistance. I have not run or independently reproduced the model.


r/deeplearning • • 20h ago

[P] Classifying 200 support messages with Clef-Flash vs qwen3.5-9b: same accuracy, 4 requests instead of 200 (public dataset, numbers inside)

Thumbnail gallery
1 Upvotes

r/deeplearning • • 1d ago

Workshop, Oct 30: small encoders instead of LLM routing, with conformal prediction on top

4 Upvotes

Most production routing I see still sends every request through a generative model. This session argues you can drop that and get faster, cheaper and more predictable behaviour.

Fri Oct 30, 9:30 AM to 12:30 PM ET, live and online, with Ben Auffarth (AI consultant, best selling author, 15+ years in data science).

What you build:

  • a bidirectional encoder router, quantized for CPU throughput
  • hard negative generation done offline
  • contrastive few shot training with SetFit
  • calibrated uncertainty with split conformal prediction
  • LLM calls kept only for verified edge cases

Full details and the agenda are here


r/deeplearning • • 23h ago

What are vector embeddings? An interactive guide

Thumbnail isaacus.com
1 Upvotes

r/deeplearning • • 1d ago

LLM 3D World Arena: Comparing LLM-generated 3D Worlds

Post image
3 Upvotes

r/deeplearning • • 1d ago

Discover AI: A Learning Guide - 51 hands-on labs for learning how AI actually works.

Post image
1 Upvotes

r/deeplearning • • 1d ago

The reversal curse is alive: "Who is Jason Momoa's father?" works, "Name a child of Joseph Momoa" fails 10/10 on GPT-5.4 — and I re-tested the proposed "fix" on my own data

Post image
0 Upvotes

"Who is Jason Momoa's father?" The model answers Joseph Momoa. Then: "Name a child of Joseph Momoa." Ten tries, ten failures on GPT-5.4, in a Princeton replication of the original reversal-curse study from this spring. Jason Momoa is an only child, so there is exactly one right answer, and the model still can't find it.
Caveat: that result comes from one student replication, not a peer-reviewed paper. The prompts and per-pair data are published on GitHub.
I wanted to know whether the proposed fix actually works. A February paper from UC Berkeley (Ma et al.) proposed "identity bridges" — extra training sentences that spell out the composition, like "the apprentice of Odette Rook is Gustav Aasen," plus repeating the forward facts six times. On their setup it lifted reverse accuracy from near zero to about 40-50%.
So I recreated their recipe on my own synthetic data and watched what happened inside the models. The image is the probe diagram for one prompt from the bridge model: "Odette Rook's apprentice is".
Two rulers. The logit lens cleans up each layer's 768 numbers first, then asks which token the model would pick. The cosine method skips the cleanup and asks which token the raw numbers point at most. They can disagree — look at layer 11: the lens's top token is [Corn] with the expected [Gustav] at rank 3, while cosine's nearest token is [Gustav] at rank 1.
The full walkthrough, three models:
The data: 60 mentor/apprentice pairs with made-up names. Forward fact: "Odette Rook is the mentor of Gustav Aasen." Bridge sentence: "The apprentice of Odette Rook is Gustav Aasen." The test prompt: "Odette Rook's apprentice is" — expected answer "Gustav Aasen." That exact phrasing never appeared in training.
Three small GPT-2 models, trained identically. The bridge model saw each forward fact six times plus the bridge sentences. The repetition model saw each forward fact six times, no bridges. The plain model saw each forward fact once, no bridges.
Behavioral results, 60 reverse prompts each. Bridge model: 60 out of 60. Repetition model: 53 out of 60. Plain model: 19 out of 60.
So repetition alone did most of the work. The bridges added 12 points on top. That was the honest surprise — I had predicted the bridges would matter more.
Then the instruments. On the bridge model in the diagram, both rulers march the expected answer's rank down across the layers — lens: 4918, 26, 1, 3; cosine: 14214, 818, 6, 1. By layer 9 both have the answer near the top, and the model generates "Gustav Aasen."
On the repetition model the same prompt ends differently: lens top [mentor] with [Gustav] at rank 143, cosine top [SPONSORED] at rank 15. It generates "Lars Quill. Quill is the" — wrong, and confident about it. On the plain model: "the mentor of Walter Elm. Halloway" — it falls back to reciting a forward fact.
Across all 60 prompts the pattern holds: the bridge model's cosine rank goes 987 → 179 → 16 → 1 across layers 5/7/9/11; the repetition model's goes 1373 → 812 → 421 → 4462. The accuracy score barely distinguished them. The representation completely did.
So the score said "repetition nearly solved it." The instruments said "the bridge rewired the inside." Both true. Accuracy tells you whether the fix worked. The layer window tells you what the fix did.
All of this is synthetic data on a small model, one training seed — it bounds the paper's claim rather than refuting it. Their setup used a bigger instruction-tuned model. But the instruments are the point: whatever fix you try, this is how you check what it actually did.
Full write-up with the complete arc: https://github.com/prof-nussbaum/Applications-of-Reading-the-Robot-Mind/blob/main/post-book-experiments/identity-bridge/README.md
Every prompt, every layer, all 300 per-item records: https://github.com/prof-nussbaum/Applications-of-Reading-the-Robot-Mind/blob/main/post-book-experiments/identity-bridge/results/all_results.md


r/deeplearning • • 1d ago

How a Diffusion Transformer Generates Shapes from Text

Post image
1 Upvotes

r/deeplearning • • 1d ago

Mapping what a model learns in post-training

0 Upvotes

I've been working on unsupervised tooling to discover what behaviors a model learns in post-training. The core idea is to use features from sparse autoencoders to identify differences in traces generated before and after training. I applied this to traces from the MiMo-v2.6 RL environments and it found significant eval awareness as well as some mild environment exploitation. Writeup is here. Would love to hear any feedback or questions!


r/deeplearning • • 1d ago

[P] AnyInit: Automated weight init for custom DL architectures

1 Upvotes

Hey r/deeplearning,

A week ago I shared AnyInit on r/neuralnetworks. Following up on that, I’d love to get feedback and feature requests from this community.

What it does: AnyInit automates stable weight initialization for custom architectures so signal propagation works out of the box without manual variance-scaling calculations.

Looking for feedback:

  1. Init methods: What specific non-standard schemes would you like added?
  2. Use cases: What custom layer or activations usually break init for you?

GitHub: https://github.com/jmiravet/AnyInit
PyPI: https://pypi.org/project/anyinit/
Any feedback, critiques, or feature requests are greatly appreciated!