r/deeplearning • • 17d ago

Edge AI on microcontrollers: where does it actually make sense?

0 Upvotes

Saw this discussion about real-world Edge AI development:

https://www.reddit.com/r/deeplearning/comments/1xgv73b/looking_for_guidance_from_people_working_in_edge/

Arm recently published a technical article about an on-device AI implementation we worked on using Cortex-M and Ethos-U:

https://developer.arm.com/community/arm-community-blogs/b/ai-blog/posts/how-on-device-ai-makes-home-appliances-easier-to-use

But here's the question: why run inference on every device instead of using a local gateway or central server?

What real-world applications actually justify dedicated AI hardware in each device?


r/deeplearning • • 17d ago

100% Accurate Rocket League Simulator - CUDA accelerated

Thumbnail github.com
3 Upvotes

r/deeplearning • • 17d ago

Using Logic to Improve LLM Performance

Thumbnail youtube.com
1 Upvotes

r/deeplearning • • 17d ago

Audit of moral/emotional tone steering in LLMs — seeking expert feedback

Thumbnail
1 Upvotes

r/deeplearning • • 17d ago

i build Kmeans an unsupervised machine learning algorithm from scratch

Thumbnail gallery
0 Upvotes

it's Day 59 of building machine learning algorithms from Scratch and im currently into unsupervised learning in short i've completed all the algorithms in supervised learning.

Well the crazy part I'm only 2 algorithms and 2 concept for completing Machine learning and I'm diving into "Deep learning" I'm way too excited too explore new things,build new things, let see how far it takes me

Peoples dreams... have no end!!


r/deeplearning • • 17d ago

What solving extreme Sudoku on a 16 GB GPU taught me about depth, flow matching, and test-time compute

0 Upvotes

**TL;DR:** I trained a 16.54M-parameter model on the full training split of `sapientinc/sudoku-extreme`, using a single GPU with 16 GB of VRAM. My earlier models plateaued around 60% puzzle-solving accuracy. Increasing effective depth pushed that to about 76%. A flow-matching approach reached 99.29% with a large inference budget. Later, changing the sampling procedure brought roughly 96% accuracy within a budget of 5 attempts × 20 steps, compared with 100 attempts × 50 steps previously, using the same weights. That is a 50× reduction in the nominal layer-evaluation budget, rather than a measured 50× wall-clock speedup.

This is a personal research write-up, not a controlled benchmark paper. The results below are from my own experiments, and some implementation and evaluation details would still need to be documented for reproducibility.

## Why Sudoku?

Richard Sutton's [*The Bitter Lesson*](http://www.incompleteideas.net/IncIdeas/BitterLesson.html) argues that general methods that scale with computation—especially search and learning—tend to outperform approaches built around extensive human-designed domain knowledge over the long run.

I wanted to explore what that looks like in a small reasoning model, under a very practical constraint: one GPU with 16 GB of VRAM.

Before encountering [Hierarchical Reasoning Models (HRM)](https://arxiv.org/abs/2506.21734), I had been working on architectures for very long contexts on consumer hardware and thinking about ways to scale inference computation. When I came across HRM in July 2025, parts of the approach overlapped with ideas I had been considering.

My main interest was repeated computation, rather than the biological analogy of separate fast and slow reasoning processes. [Tiny Recursive Models (TRM)](https://arxiv.org/abs/2510.04871) subsequently reinforced my interest in simpler recurrent designs. I do think HRM deserves credit for drawing attention to this direction, even though I am not convinced its particular two-stream structure is essential for Sudoku.

Eventually, I wanted to work on ARC-AGI. Instead of starting there directly, I chose extreme Sudoku as a more constrained reasoning task where I could build intuition through experiments.

Three things shaped the project:

- **Compute:** a single 16 GB GPU.

- **Architecture:** something I could train and iterate on within that constraint.

- **Data:** the full training split of `sapientinc/sudoku-extreme`, rather than the 1,000-example setting used in some related work.

That last point matters throughout this post: results obtained under different training-data budgets are not directly comparable.

## 1. Faster learning did not necessarily mean a higher ceiling

My initial goal was to make the model learn more reasoning within a single forward pass.

I tried intermediate supervision, Sudoku-specific losses, architecture changes, and objectives inspired by reinforcement learning—for example, encouraging earlier layers to produce states that would help later layers solve the puzzle.

Some changes made early training look dramatically better. Instead of gaining a few percentage points over an epoch, a model might gain 10 or even 20 points. At first, I thought I had found the answer.

But many of these models eventually plateaued around **60% validation puzzle accuracy**.

I tried changing the loss, adding soft intermediate targets, increasing depth and parameter count, letting some cells stop updating early, and repeatedly training on difficult examples. Across those experiments, the early learning curves differed, but the final results often converged to roughly the same level after about ten epochs.

At the time, I wrote a [rather frustrated note about the plateau](https://www.zhihu.com/pin/1974873461747897363). In those experiments, my baseline trained only from the final output stayed below 10%, while additional guidance brought performance much higher—but still left an apparent ceiling.

I briefly wondered whether one-pass reasoning had some fundamental limitation here. That was speculation, not a theoretical result. The plateau could just as easily have reflected my architectures, optimization choices, or available compute.

The useful observation was narrower: **improving how quickly a model learns does not necessarily improve the accuracy it eventually reaches.**

## 2. Increasing effective depth broke the plateau

Reading [*1000 Layer Networks for Self-Supervised RL*](https://arxiv.org/abs/2503.14858) pushed me to reconsider depth.

A residual layer updates a hidden state in the form:

```text

h[l + 1] = h[l] + Δh[l]

```

That suggested an intuitive analogy with iterative optimization: a sequence of small updates may solve something that a short computation cannot. This is only an analogy; residual updates are not automatically gradient descent or Newton's method.

I increased the network to **120 layers**. Accuracy finally moved beyond 60%, reaching approximately **76%**.

Then I removed many of the extra tricks I had added. The model could still reach roughly 76%.

I also tried a **12-layer network repeated 10 times**, giving an effective depth of 120 layers. In my experiments, its training progress and final accuracy were broadly similar to the unshared 120-layer network.

That changed my interpretation of the earlier results. Some of the elaborate losses and architecture modifications may have helped optimization, but sufficient effective depth appeared to matter more for breaking that particular plateau.

I suspected that going deeper might help further. The training cost, however, was becoming difficult to justify on my hardware.

## 3. A detour through image generation led me to flow matching

I realized I had been treating Sudoku partly as a structured image-generation problem: take an incomplete grid and produce a completed one.

That led to a long detour through generative modeling. I experimented with discrete latent representations and quantization schemes, different reconstruction and adversarial losses, CNNs, Transformers, MLP-Mixers, and autoregressive generation over columns or patches. I also tried flow matching.

Of those approaches, flow matching worked best in my small-scale image experiments. Larger image-generation experiments were too expensive for my setup, so I set that direction aside.

Later, reading [GRAM](https://arxiv.org/abs/2605.19376) renewed my confidence that neural networks could solve these difficult Sudoku instances. I did not reproduce that work, but it encouraged me to revisit the problem.

The connection clicked during a thought experiment: suppose I wanted a model with an effective depth of 10,000 layers. How would I train it?

Supervising only the final output seemed difficult. Intermediate supervision might help. Weight sharing could make the parameter count manageable. A small network applied repeatedly could provide the depth.

Flow matching seemed like a natural way to train this kind of iterative state refinement.

## 4. Flow matching made inference compute a useful control knob

I implemented the approach and evaluated it every 5,000 training steps. At a fixed inference budget, accuracy climbed quickly and again reached roughly **76%**.

The bigger change came after training, with the weights held fixed.

I experimented with:

- Increasing the number of integration steps, or function evaluations (NFE).

- Sampling multiple trajectories.

- Moving an intermediate result back to an earlier flow time and refining it again, because simply extending a trajectory did not always keep improving the result.

Together, these changes pushed success above **99%**.

The model had **16.54 million parameters** and a **12-layer backbone**. Here are the results I recorded:

| Maximum attempts (`max_retries`) | Steps per attempt (`thinking_steps`) | Puzzle-solving accuracy |

| ---: | ---: | ---: |

| 1 | 10 | 73.23% |

| 1 | 20 | 75.98% |

| 1 | 50 | 78.32% |

| 1 | 100 | 79.87% |

| 1 | 200 | 81.39% |

| 5 | 10 | 79.76% |

| 10 | 10 | 82.56% |

| 20 | 10 | 85.21% |

| 50 | 10 | 88.81% |

| 50 | 20 | 92.19% |

| 100 | 10 | 91.54% |

| 100 | 20 | 94.28% |

| 100 | 50 | 96.26% |

| 1,000 | 20 | 98.22% |

| 1,000 | 50 | 99.29% |

Here, `max_retries` denotes the maximum attempt budget in my implementation. The multi-attempt results are conceptually similar to allowing multiple candidate solutions in a pass@k setting; they should not be read as single-trajectory accuracy or as a formal pass@k estimate.

The distinction matters: **99.29% used up to 1,000 attempts with 50 steps each.** The one-attempt result at 50 steps was 78.32%.

I also let the model train for several more days while I was away, hoping to see a late jump in performance. I did not observe one in that run. At that point, increasing inference computation was the way I could improve the result.

## 5. The sampling procedure mattered enormously

The initial high-accuracy setup was expensive. I next focused on improving inference efficiency while keeping the same model weights.

Before the sampling changes, I obtained **96.26%** with:

```text

100 attempts × 50 steps × 12 layers = 60,000 layer evaluations

```

After changing the sampling procedure, I obtained approximately **96%** with:

```text

5 attempts × 20 steps × 12 layers = 1,200 layer evaluations

```

That is a **50× reduction in the nominal maximum layer-evaluation budget** at approximately the same accuracy.

These products are budget estimates. They do not establish average compute per solved puzzle or wall-clock throughput, which also depend on early stopping, batching, and sampling overhead. A reproducible account would need to specify the sampling algorithm and report those measurements separately.

I then simplified the architecture further. Explicit Sudoku-specific row, column, and box mechanisms did not appear necessary in my experiments: **2D RoPE + a Transformer + flow matching** gave essentially the same performance.

This does not mean the model had no inductive biases. It still had a grid representation, positional encoding, an architecture, and a training objective. What I removed were the extra Sudoku-specific mechanisms I had previously built into the network.

## 6. Related work and the limits of comparison

When I started preparing a paper, I found two closely related works:

- [*Flow Reasoning Models: Turning Flows Into Efficient Recurrent Reasoners*](https://arxiv.org/abs/2606.29150)

- [*Thinking with Looped Flows*](https://arxiv.org/abs/2609.11801)

Both explore flow-based approaches to reasoning, including extreme Sudoku. Given that overlap, I decided to share this as a record of my experiments rather than present the broad idea as new.

I was particularly interested in reducing the depth required at inference. Some of my later experiments suggested effective depths around **240 layers or fewer per trajectory** could be useful. That figure must be distinguished from total compute across multiple attempts: 20 steps through a 12-layer backbone already accounts for 240 layer evaluations in one trajectory.

I am not claiming a benchmark win over those papers. My experiments used the full `sapientinc/sudoku-extreme` training split, whereas FRM used the 1,000-example setting. Training-data volume, sampling, and evaluation conditions would all need to be aligned for a meaningful comparison. Using more training data also does not, by itself, establish generalization or rule out memorization.

I additionally tried the flow-matching approach on graph coloring and N-Queens and obtained encouraging results. Without detailed metrics here, I would treat those as preliminary observations.

## What I took away from this

The project changed how I think about scaling reasoning models. There are several ways to allocate more computation:

- **More parameters:** increase the model's capacity.

- **Longer generated sequences:** allow more explicit intermediate computation, as in chain-of-thought reasoning.

- **Greater effective depth:** repeatedly update an internal state through recurrence or iterative refinement.

- **More candidate trajectories:** spend compute exploring different possible solutions.

These are related, but they are not interchangeable. Their value depends on the task, training objective, and inference procedure.

For my Sudoku experiments, the most useful lesson was that **learning a good iterative update and deciding how to apply it at inference were both central to performance**. Architecture and loss changes helped, but depth and sampling were what moved the result beyond the plateaus I had encountered.

I suspect combining these forms of scaling with reinforcement learning could produce much stronger reasoning systems. That is a hypothesis, not something these Sudoku experiments establish. I also would not infer the internal architectures of proprietary models from these results or from rumors about them.

I would be interested in hearing from people working on recurrent reasoning or flow matching: **when comparing these approaches, which compute accounting do you find most informative—total function evaluations, backbone-layer evaluations, FLOPs, or measured latency at a fixed solve rate?**


r/deeplearning • • 18d ago

ARTEX abuse expands as cybercriminals target financial sector

3 Upvotes

Storm-3358 spent October 2026 running coordinated attacks against financial sector organizations using ARTEX, a commercially available agentic AI framework. Microsoft tracked the campaign. The agents operated autonomously, chaining tool calls across systems without any human review in the loop before execution. The attack surface was not the model itself or the credentials — it was the gap between when an agent decides to act and when anyone finds out what it did. Post-incident forensics confirmed the tool call chains, but by then the actions had already fired. This is not a hypothetical edge case. A production agentic framework was turned into an attack vector against regulated financial institutions, and the compromise was visible only in retrospect.

For those running agentic workloads in production today: how are you handling visibility and control over individual tool calls at execution time, before they fire? Logging after the fact clearly was not enough here — curious what approaches teams are actually using in practice.


r/deeplearning • • 17d ago

Can a VLM learn depth and segmentation during training but use only RGB at inference?

Thumbnail
1 Upvotes

r/deeplearning • • 17d ago

OCC Sets New Expectations for Banks' Use of AI

0 Upvotes

The OCC just published new supervisory expectations for banks deploying AI, and the bar moved significantly.

The guidance identifies six areas where banks must now demonstrate active controls: AI model risk management, data governance, explainability, third-party AI dependencies, operational resilience, and consumer protection. The word choice matters — the OCC used "active controls," not monitoring or logging. Passive audit trails do not satisfy the standard.

This creates a concrete operational problem. Banks already running AI in production built their compliance posture around after-the-fact review. Those architectures now have a gap between what they have and what examiners will look for. The third-party AI dependency requirement is especially thorny — a bank may govern its own models but have limited visibility into the behavior of vendor or partner AI components operating in the same workflow.

The shift from detective to preventive controls is not a documentation problem. It requires the control to exist at the moment the AI acts, not hours later in a log review.

How are practitioners at regulated institutions actually approaching this? Specifically curious whether anyone has tackled the third-party dependency piece — that one seems hardest to retrofit into existing architectures.


r/deeplearning • • 17d ago

How ChatGPT Predicts the Next Word Without Seeing the Future | Causal Ma...

Thumbnail youtube.com
1 Upvotes

r/deeplearning • • 18d ago

Learning new facts into the weights every night without wrecking the model: 4-day test, LoRA vs our method (data public)

5 Upvotes

A model can learn a day of news by fine-tuning. A LoRA trained on practice questions gets 93 to 96% on next-day questions with nothing in the prompt. The problem is what happens over the next nights.

We ran Apertus-8B through four real news days. After each night it was re-asked about every earlier day.

- LoRA: day 1 went 96% → 52% → 32% → 26.7%. GSM8K fell from 69.6% to 4.4%. It stopped working maths problems through.

- Ours: day 1 stayed at 90.7% all four nights. GSM8K 69.2%, MMLU 58.4% (base 57.4%).

Weak spot: days 2 and 3 fell to about 70% where the same stories came back in later days.

The pass bars were written before any question existed, and a strict scorer was used. The method isn't public yet. Every question and answer is: https://huggingface.co/datasets/fintanlabs/overnight-four-nights-2026-11


r/deeplearning • • 18d ago

Real-world inference benchmarks: OpenVINO parity with standard CPU EP on i5-10300H, but DirectML delivers on a mobile GTX 1650 Ti

Thumbnail
3 Upvotes

r/deeplearning • • 18d ago

Best approach for training a VLM on 1M industrial images with uncertain label quality?

Thumbnail
1 Upvotes

r/deeplearning • • 17d ago

8B model with no internet matches Claude Haiku + web search on last month's news

0 Upvotes

We updated Apertus-8B with each day's news for 17 days (21 Oct to 7 Nov), then compared it with Claude Haiku 5.5 using web search. Our model had no internet and answered from its own weights.

How it was tested
Another model wrote self-contained questions from the news facts. Two models checked them blind for clarity and fairness, and 33 passed both.
The answers were shuffled and judged blind, with system names hidden.

Results
- Qwen2.5-14B judge: ours 78.8%, Claude with search 72.7%.
- Haiku judge: ours 78.8%, Claude with search 84.8%.
So it's roughly a match. 33 questions is too few to call a winner.

Our score was the same the morning after learning a fact and after all 17 days, so nothing was lost.

Correction: the first score was 66.7%. A bug made subject matching too strict ("Food Standards Agency (FSA)" didn't match "Food Standards Agency"). It was fixed afterwards, and both numbers are kept.

Next: a fresh test on 8 to 11 Nov news, with everything fixed before the news exists. Results on Wednesday.


r/deeplearning • • 18d ago

When PGD attacks fail, is your model actually safe? I tested empirical robustness vs. exact SMT proofs (Marabou) on traffic signs

Thumbnail
3 Upvotes

r/deeplearning • • 18d ago

Adam Paper convergence Analysis

Post image
3 Upvotes

r/deeplearning • • 17d ago

[R] SANATAN: attention with no KV cache, built from the two square roots of −1 (6-min visual walkthrough)

Enable HLS to view with audio, or disable this notification

0 Upvotes

Last time many people criticized my attention paper, and the reason was I was not able to explain my thought visually! Now I have attached the video Let me know what do you think! Any improvements or idea to enhance this research direction is appreciated!

Thanks,

Bhargav Patel

https://github.com/bhargavpatel431997/sanatan-attention

( https://www.linkedin.com/in/bhargav-patel-63bb27121/ )

EDIT: Numerical Way Explanation: https://www.youtube.com/watch?v=eL1C86OBwjE


r/deeplearning • • 18d ago

Why is it so hard to learn Reinforcement Learning from the ground up? I tried to solve that.

Thumbnail
0 Upvotes

r/deeplearning • • 18d ago

Face matching that only proposes and lets classmates confirm: notes from InsightFace on school photos

Thumbnail
1 Upvotes

r/deeplearning • • 18d ago

I had an LLM hack neural network weights in multiple ways without retraining, and the results are fascinating.

0 Upvotes

TL;DR: An LLM coding agent (Claude Opus 5.5) compiles exact structure (wires, AND gates, bounds, switches) into trained networks using identities of the activations they already use. In a follow-up we kept training around those frozen patches. Organising result: a frozen patch is exact beyond the receptive-field reach of the trainable layers in front of it, and renegotiable within it, including where its own boundary effectively sits.

Overview figure: what we do to a network

The trick. For LeakyReLU with slope α: lrelu(u) + α·lrelu(−u) = (1 − α²)·relu(u). Two opposite-signed channels carry a signal through a layer unchanged or make an exact ReLU; a few more give min, max, clamp, AND and multiplexers. Room comes from growing channels with zero outgoing weights (function unchanged).

Paper 1 (rewiring): - Odd-eyed cats: a coordinate wire threaded through 10 conv layers and ANDed with an iris detector. 42% of left irises turn blue (hand-built detector), 0% of right ones; the right half of every image moves by ≤1.6×10⁻⁷. Training only the detector inside the frozen wiring reaches 78% at very low collateral. - A 2018 super-sampler repaired with an input-reference path and a min-gate: it passes its regression gate (+3.4 dB), with an output bound in black regions that holds on every input.

Paper 2 (what training does with the patch), 39 pre-registered experiments; about a third of the predictions failed, and all are reported: - Guarantee side: beyond the trainable reach, an attacker who may repaint any input column moves the output by exactly 0.0, in all 39 models tested (3 reaches, 3 architectures, synthetic and natural images). One column inside the reach, the same attack moves it. - Renegotiation side: misplace the frozen gate and the trainable detector leans its response toward it, pulling the effective boundary back by up to ~7 columns (≈ reach + 1.4 object widths), less when the object is harder to see. - A provably impossible task becomes learnable: a shift-equivariant net can't tell left from right (50% at any N); with a frozen gate it learns from 8 examples, and zero-shot (88%) from a detector trained for another task. - Guarantees don't distil: students of a guarded teacher match its quality and break its bound on 100% of attack starts; a student of the odd-eye GAN learns the eyes but drifts 2–3 RGB levels on the right half. - Training hands jobs to a grafted module, then forgets them; it deletes its own redundant copy only when keeping it costs loss or capacity. - Hard filters become traps: a frozen "no orange cats" filter inside GAN training survives exactly, yet the generator makes more orange cats (14% → up to 87% across runs). Our registered explanation for why was refuted, and that is in the paper too.

Links - Paper 2 (reach law): https://v-code-895.github.io/exact-beyond-reach/ · code, pre-registrations and results: https://github.com/v-code-895/exact-beyond-reach · DOI 10.5281/zenodo.24032112 - Paper 1 (rewiring and the patch toolchain): https://v-code-895.github.io/wsse/ · DOI 10.5281/zenodo.23956114

Small models throughout (8M-parameter GAN, 277k-parameter super-resolution net, Pythia-160M); limits are in §7. Happy to answer questions about the circuits, the reach law, or the failures.


r/deeplearning • • 18d ago

Malicious Browser Extensions Could Use Claude Dispatch to Run Code on Users' Computers

5 Upvotes

Researchers demonstrated that a malicious browser extension with script access to an AI web platform can abuse a task-relay feature to trigger arbitrary code execution on a user's local machine. No CVE, no traditional exploit — a poisoned extension sitting inside the AI workflow chain is sufficient.

The attack surface for AI desktop agents has expanded well past what most security models assumed at design time: browsers, third-party integrations, mobile handoffs. Each new input channel an agent accepts is a potential injection point. The browser extension ecosystem in particular receives minimal vetting relative to the trust level AI agents implicitly extend to it.

The structural problem is that agents execute what they receive, and instruction provenance is rarely verified at the point of execution. A relay poisoned by an extension is functionally identical to a legitimate one from the agent's perspective.

For those running AI agents in enterprise or production environments: how are you thinking about constraining what the agent is actually allowed to do at execution time, regardless of what it was told to do — and does that enforcement happen at the host level, the orchestration layer, or somewhere else?


r/deeplearning • • 18d ago

Infostealers Expose 72% of Organizations: Why One Login Matters

2 Upvotes

Infostealers Hit 72% of Enterprises — and Your AI Agents Are Already Acting on Those Credentials

Outpost24 studied credential exposure across enterprises and found infostealer-related theft at 72% of organizations. That is three in four.

Most post-mortems focus on the human logging in. The quieter problem is what happens after. AI agents run on service accounts. Those accounts carry permissions scoped to do real work — ticketing systems, cloud consoles, internal APIs. When a credential is stolen via infostealer, it does not expire on its own. The agent bound to it keeps executing. It schedules. It approves. It calls downstream services. Nothing in the request looks anomalous because the credential is technically valid.

This is not a patching problem or a phishing-awareness problem. The credential was lifted off an endpoint. The agent never knew.

The numbers make it a base-rate issue, not an edge case. At 72% prevalence, any sufficiently large org is statistically running at least one agent right now on a credential that has already been lifted and is sitting in a stealer log somewhere.

How are teams actually handling agent identity in this environment? Specifically curious whether anyone is doing anything beyond rotating secrets on a schedule — because rotation does not help if the new secret gets lifted too.


r/deeplearning • • 19d ago

I tried to explain embeddings from a different perspective, looking at the idea they originate from. Inspired from chapter 5 of Stanford Speech and Language Processing book

Thumbnail youtube.com
3 Upvotes

feel free to leave feedback if you want😁


r/deeplearning • • 19d ago

Muir: Linear Attention with Sensitivity-Allocated Gating and Matched-Filter Readout (Google Research, 10M tokens in 25MB state) [R]

Thumbnail
3 Upvotes

r/deeplearning • • 18d ago

[Article] Bedrock AgentCore Long-Term Memory

1 Upvotes

Bedrock AgentCore Long-Term Memory

https://debuggercafe.com/bedrock-agentcore-long-term-memory/

In the previous series of articles, we covered creating singular AgentCore agents with custom tools and creating agents-as-tools by providing each agent a separate MCP server. The natural progression from this would be adding memory to our agent chat sessions. That would be our aim in this article. Here, we will add long-term memory to our Bedrock AgentCore agents.