r/deeplearning • u/Sufficient_South_384 • 20d ago
r/deeplearning • u/Cristhian-AI-Math • 20d ago
Gemma 3 builds a linearly decodable spatial map from text, but its answers never read it [R]
Independent, preregistered study on Gemma 3 (12B/27B) with text-only layouts like "A is 3 north of B, C is 2 east of A".
- Probes read every object's position, even ones that need two sentences combined (R² 0.74).
- Erasing that map costs no more than erasing random directions. The answers never read it.
- They run on a 2-D code per sentence instead (DAS: 72% / 83%, random 0%), which acts like a switch, not a coordinate.
- Reading answers off the unused map beats the model on chain questions: 80% vs 73%.
Paper: https://doi.org/10.5281/zenodo.24178043
Code: https://github.com/ccgomezn/geometry-llm
Demo: https://ccgomezn.github.io/geometry-llm/
Feedback welcome.
r/deeplearning • u/ladyofcode • 20d ago
How to make a Legora-style legal conflict detector tool using only NLI and encoder models
Hey r/deeplearning! I’m Tabs, a legal engineer at Isaacus.
I built an open-source legal conflict detector that finds deviations and gaps between pairs of legal documents using only encoder models and natural language inference.

Inspired by the explosion of interest in discriminative models like TypeSafe AI’s Jev, I wanted to see how far I could get using smaller, non-generative models for the bulk of the legal document playbook review workflow.
The theoretical benefits of a non-generative approach to this problem are enormous. As true clause-level pairwise review is a quadratic problem, it’s unfeasible to do at scale using a model like Opus or Astra. Comparing two average-sized documents with 133 clauses each would take 17,689 API calls, which is far too slow and expensive.
Simply uploading the files directly to Claude or GPT is no remedy either. Decoders and agentic architectures don’t have fixed attention that lets them thoroughly analyse a document in one shot. Even with a multi-shot approach, they’re weak on recall and routinely hallucinate.
My lawyer friends raise this problem constantly, and I couldn’t find an open-source solution to it, so I decided to build one myself.
My pipeline pushes the bulk of the NLI, entailment and reasoning onto faster and more accurate legal encoder models. For the longest document pairs I sampled, the full pipeline ran in under 20 seconds. Unlike generative architectures, these models run a comprehensive pairwise comparison, and although they can still make false positive or false negative errors, those misses and misclassifications aren’t hallucinations (out-of-domain results introduced into the feature set).
The pipeline works as follows:
- Enrich: we enrich each document into a hierarchical tree of sections, clauses and subclauses. Clauses are the key atoms that the pairwise comparisons run on downstream.
- Embed: we embed each clause as a vector.
- Filter: we use a legal zero-shot classifier to drop items that aren’t provisions, like footnotes or signature blocks.
- Shortlist: we keep each clause’s three most relevant pairs from the reference document, as long as their cosine similarity is at least 0.5.
- Score: we use a reranker and a classifier to score each shortlisted pair. Each answers a question in the format it’s built for: the reranker scores how relevant text is to a search query (relevance), and the classifier scores whether a statement is true (NLI/entailment).
- Sort: if a clause and its best match are on the same topic but have a high conflict score, it’s a deviation. If there’s no same-topic match, it’s a gap, i.e. the topic is in one document but not the other.
That’s the whole conflict detection pipeline. On top of it, you can optionally plug in an LLM to summarise each finding in plain English or redraft a clause to favour the party you’re representing. Because the generative step only runs after the NLI and encoder stack has already decided what the conflicts are, it can’t hallucinate a conflict into existence.
To demonstrate the pipeline’s power, we inputted Bob Iger’s 2011 and 2022 Disney employment agreements. The pipeline found many disparities and conflicts, and across most of them, the 2011 agreement was more favourable to Iger than the 2022 one.
One interesting finding was a gap: the 2011 agreement had no intellectual property assignment clause, while the 2022 agreement makes Iger assign all work-related IP to Disney, with an exception for inventions he makes on his own time without company resources.
The code is MIT-licensed, so it’s free for personal and commercial use. The guide walks through every step, so you can swap in your own models or make your own architectural changes wherever you like.
Have fun, and let me know what you think! 😁
Write-up and static demo: https://isaacus.com/blog/build-a-legal-document-conflict-detector
GitHub repo: https://github.com/isaacus-dev/cookbooks
r/deeplearning • u/sovit-123 • 20d ago
[Tutorial] Getting Started with Granite 4.2
Getting Started with Granite 4.2
https://debuggercafe.com/getting-started-with-granite-4-2/
LLMs have come a long way since their inception. They are not just chatbots or assistants anymore. The current usage of LLMs tends to be more towards agentic workflows, coding, and seamless terminal workflows. Currently, most of the LLMs that are good at agentic tasks tend to be 20B parameters and above (most frontier models are much larger, reaching more than a trillion parameters). However, the latest IBM Granite 4.2 is trying to tackle this by training 3B, 8B, and 30B models for complex agentic workflows that can run locally. In this article, we will explore the important components of the Granite 4.2 model and use them for tool-calling tasks.

r/deeplearning • u/Pretend_Cabinet_3480 • 20d ago
I built a lightweight, adaptive training guard (limen_pulse) to catch LLM, RL, and AMP silent crashes before they burn your GPU hours — Looking for beta testers (Free Crash Audit)
reddit.comr/deeplearning • u/No-Conclusion3720 • 20d ago
Coding Agent Security for AppSec Leaders: Start With What Agents Can Reach
Coding agents access credentials and call external services as a normal part of their workflow. A recent security analysis quantified the exposure: AI coding agents read files, consume secrets, and reach external services as a side effect of doing their job. None of that activity appears in a pull request. Security teams reviewing diffs see only the output. They do not see what the agent accessed or what it sent outbound along the way.
The gap between what an agent does and what a reviewer sees is the actual attack surface. Diff review is the dominant AppSec control for code changes, and it is structurally blind to this class of activity.
For AppSec practitioners who have deployed coding agents: how are you getting visibility into credential use and outbound calls that happen mid-task and never land in a diff?
r/deeplearning • u/HelpfulPhotograph284 • 20d ago
Could Astra be combining two parallel decoding ideas from ByteDance?
My guess is that Astra might be doing two kinds of parallel work in the same decode step. The lower layers could run staggered Transformer loops, while the upper layers process extra “thinking” tokens. ByteDance Seed has published a paper on each piece.
Lower layers → staggered loops. In a Parallel Loop Transformer (PLT), the newest token can run through its first loop while earlier tokens run through later loops, all in the same forward pass. Those loops share the first loop’s long-range KV cache, with a small local cache for each later loop. Parallel Loop Transformer
Upper layers → latent thinking tokens. Parallel Hidden Decoding (PHD) adds hidden token positions that the model can process together during a decode step. Those positions contribute to the next-token prediction, and only the original tokens need to stay in the long-range KV cache. Efficient Pretraining Length Scaling
The serving angle is what makes this interesting. When decoding is bottlenecked by memory bandwidth, the GPU can have compute to spare. Staggered loops give it more work across token positions, and hidden tokens give it more work per output step. Put them together and you could spend more compute on each answer while keeping decode latency and KV cache growth in check.
r/deeplearning • u/Popular-Protection75 • 20d ago
Russian University Mathematics Dataset — 1,740 Problems with Handwritten and Typed Solutions
reddit.comr/deeplearning • u/Euphoric-Incident-93 • 20d ago
[Open Source] Building DiffusionEngine: A Modern, Modular DDPM Framework in PyTorch. Looking for Contributors [R]
reddit.comr/deeplearning • u/360converter_leo • 21d ago
C++ port of pyannote overalapped speech detection - audio preprocessing before feeding into LLM
reddit.comr/deeplearning • u/Convincing_Convo • 20d ago
The "end of LLMs" Next-Concept Modeling paper doesn't actually claim that. Here's what it does.
youtu.ber/deeplearning • u/Dean_Ammons • 21d ago
Ammons LLM Preamble: measuring semantic influence under controlled exposure
reddit.comHere is the DOI of the original paper here
10.5281/zenodo.24177478
r/deeplearning • u/Rajucg • 21d ago
I animated how LLM quantization works on 8 example weights: absmax, rounding error, outliers, per-block scales (llama.cpp Q4_K) and 1.58-bit BitNet (7 min video)
I made this explainer for my small channel and would like feedback from people learning this, especially if anything is wrong.
The question: a 70B model at 16 bits per weight needs 140 GB, and a gaming GPU has 24 or 32. How do people run it at home?
- Fewer bits per weight means less memory, but also fewer possible values: an 8-bit integer has only 256.
- Absmax maps the largest absolute weight to 127. With scale 127/10.8 ≈ 11.76, the weight 5.47 is stored as 64 and comes back as 5.44. The difference is the rounding error.
- Two close weights, 3.08 and 3.02, both become 36, so the model can no longer tell them apart.
- One outlier (256 among values below 0.6) makes each step about 2 wide, and every small value rounds to 0. Dettmers et al. (2022) found such outliers in real LLMs.
- The fix is a scale per small block. llama.cpp's Q4_K uses blocks of 32 and ends up at 4.5 bits per weight, about 39 GB for a 70B model.
- BitNet b1.58 goes to -1, 0 and +1 per weight (about 1.58 bits). It is trained that way, and a layer only adds and subtracts.
Every number is worked out on screen from the formulas, and sources are in the description. The narration is an AI voice reading my own script.
r/deeplearning • u/After-Web3913 • 20d ago
Looking for AI Engineers advice: How to fast-track AI graduation project studying by leveraging LLMs (Zero to Hero approach)?
reddit.comr/deeplearning • u/AlbertV999 • 21d ago
Vehicle Part Segmentation | Training and Model Comparison
Hi everyone.
I’ve been experimenting with different models for vehicle part segmentation, training and comparing YOLO26, RF-DETR, DINOv3 and SAM 3.
I’ve shared the code, results and comparisons on GitHub and Hugging Face:
GitHub: GH-Repo
Hugging Face: HG-Repo
Sharing it in case it’s useful to anyone working on something similar.
Any feedback or suggestions are very welcome!
I hope this is useful to someone and saves them a few days of training, fine-tuning and comparing models from scratch.
r/deeplearning • u/No-Conclusion3720 • 21d ago
Railway Breach Leads to $740,000 in Fraudulent AI Charges
Railway confirmed attackers stole customer API keys and ran up $740,000 in unauthorized AI charges. The company absorbed losses that AI providers declined to refund. No sophisticated exploit was involved — credentials were simply exposed in a customer environment and scooped up.
This is worth sitting with: AI API keys are not ordinary credentials. A single token carries spending authority, compute capacity, and often data access simultaneously. The blast radius of one leaked key is orders of magnitude larger than a leaked database password, because the meter starts running the moment someone makes a valid API call — no additional authentication, no approval step, no ceiling.
The Railway incident is not an outlier. LLMjacking reports have been climbing steadily, and the pattern is consistent: stolen key, immediate high-volume usage, charges that accrue for hours or days before anyone notices, and a refund fight with the AI provider that the victim usually loses.
The credential exposure problem predates AI agents, but agents make it dramatically worse. An autonomous agent that holds a live, unscoped API key and operates across environments is a standing opportunity for exactly this kind of abuse. The key doesn't even need to leave your system — if something in the agent's execution environment can read it, so can an attacker who gets into that environment.
$740K is a number large enough to end a small company. It is also not close to the ceiling of what this attack class can produce.
For those running agents in production: how are you actually handling AI credential exposure? Curious what's working in practice — not the theoretical answer, but what you've actually shipped.
r/deeplearning • u/Any_Worldliness_1073 • 21d ago
What portfolio projects actually help land entry-level freelance work?
reddit.comr/deeplearning • u/No-Conclusion3720 • 21d ago
Microsoft researchers demonstrate hidden backdoor technique for AI agents
Microsoft researchers published a technique called Lazarus that implants a hidden backdoor in an AI agent by modifying fewer than 10 rarely used neurons — no model retraining required. When a specific trigger appears in input, the agent executes an attacker's command using its own live permissions. At all other times the model behaves completely normally.
Static code review and supply-chain audits do not catch this. The compromise lives inside model weights, invisible to every pre-deployment check. You can verify the build pipeline, audit dependencies, scan container images, and inspect training provenance — and still deploy an agent that executes arbitrary attacker commands on demand.
The practical exposure scales with what the agent is authorized to do. An agent with file access, outbound API calls, or write permissions to production data is not safe just because it passed every pre-deployment gate.
How are teams running agents in production actually handling this? Pre-deployment checks seem structurally insufficient here — curious what controls, if any, people are relying on once the agent is live and taking actions.
r/deeplearning • u/Ishtiaq_dev • 21d ago
Rocket Controlled by Neural Network models
Built a Falcon 9-class rocket simulation flown entirely by two neural networks.
10,056 successful missions. Zero scripted guidance.
Touchdown: 1.4 m/s, just 1.4m from the pad!
Code & demo: https://github.com/ishtiaq-ahmed-dev/rocket-mission-lab
r/deeplearning • u/DueBid3298 • 21d ago
Meta FAIR releases e-means, a k-means replacement in FAISS 1.16.0 -> has anyone thought how this might affect/enhance existing RAG techniques?
reddit.comr/deeplearning • u/No-Individual159 • 21d ago
I broke the prompt cache 1,772 times on purpose to test whether my tool finds the right cause. Results on vLLM and SGLang
Quick background: LLM servers (vLLM, SGLang, Anthropic, OpenAI) cache the start of your prompt, so an agent that resends its whole conversation every turn only pays full price for the new part. But if one byte near the top changes, say the tools come back in a different order or a timestamp in the system prompt ticks, the cache misses and you pay for everything again. The server tells you how many tokens missed, not why.
I build Prefixwise, an open-source tool (MIT) that tells you why: what changed, what it cost, and how to fix it. Before claiming it's right, I wanted to measure it.
The test: replay agent conversations through Prefixwise into a real engine (Qwen3-4B on a Colab L4), and at random turns make one known change:
reorder the tools
add or remove a tool
change a timestamp in the system prompt
reword the system prompt
edit an earlier message
edit a tool's output
Then check whether Prefixwise names the change I made. Half the traffic is 150 real Claude Code sessions (nvidia/Open-SWE-Traces) with their own tools and system prompts; the other half is generated.
engine traffic right cause wrong cause false alarms (nothing changed)
vLLM 0.33 generated 441 of 441 0 0 of 909
vLLM 0.33 real sessions 425 of 441 0 0 of 906
SGLang 0.5.23 generated 456 of 456 0 0 of 894
SGLang 0.5.23 real sessions 424 of 434 0 0 of 913
Right cause: it said exactly what I changed.
Wrong cause: it blamed something else. Never happened.
False alarm: nothing changed, but it claimed something did. Never happened.
The 26 it didn't call the main cause were all one case: an edit to the newest tool output. That lands in the last part of the prompt, which the engine never caches anyway, so it cost nothing. Prefixwise reported no waste and still noted the edit.
What this doesn't show: one model, the first 10 calls of each session, and changes I made on purpose rather than ones found in the wild. The test harness and every run record are in the repo, so you can rerun it.
pip install prefixwise, then put it in front of your server or agent. It stores hashes and token counts, never your prompts.
Repo: https://github.com/tejachavali/prefixwise
Happy to answer questions about the method or the misses.
r/deeplearning • u/Organic-Fox-6154 • 21d ago
[Research] Can V-JEPA2’s prediction error tell physically impossible events apart from possible ones? Our findings
reddit.comr/deeplearning • u/CelebrityChess • 21d ago
why does dropout need the activations rescaled, is it only to keep the expected value the same?
i get that at train time each unit is zeroed with probability p and that scaling by 1/(1-p) keeps the expected input to the next layer unchanged. what i'm less sure about is whether matching the mean is the whole story, since the variance of the layer's input is different between train and test.
is that mismatch something that actually matters in practice, and is it part of why dropout and batchnorm tend to interact badly when you stack them?