←
Ram311 posts
Ram avatar

Ram

@PothamRam

Research Engineer @ DepthFirst reducing cyber risk. Prev AI Safety Fellow @ Redwood catching misaligned models. Previously exited an AI startup.

◷ Joined April 2022▧ 18 Photos and videos
Ram avatar
Ram@PothamRam·Nov 3

I was working on investigating scaling test-time compute for vulnerability detection. We found that running a cheap model multiple times for vulnerability detection can find more vulnerabilities than Mythos at less than a fifth of the cost. Anthropic's post, on discovering vulnerabilties with claude, also found that test-time scaling significantly helps with finding vulnerabilities. This means attackers may actually be able to get a lot more "juice" from open weight models for hacking that we might expect, matching performance of frontier ones. So, it's important that defenders are also adopting these techniques, maximizing test-time compute on codebases to find more vulnerabilities before attackers can.

Running a lower-cost model multiple times can match the vulnerability detection rate of frontier models at a small fraction of the cost. On a 30-task subset of dfbench, five runs of DeepSeek v4.1 Flash found about 71% of known vulnerabilities, up from about 52% with a single run, at $4.24 per task. Running it 15 times increased recall further to 80%, roughly 13% of Mythos 5’s cost, which found approximately 69% of the vulnerabilities. Because LLMs are stochastic, they can find different vulnerabilities each time they analyze the same codebase. Combining findings across runs increases coverage, but can also introduce more false positives. To control that noise, we used our harness to review and deduplicate findings across runs, then filter them by confidence. In separate validation experiments, this approach generally improves both recall and precision. These results suggest that repeated sampling can improve the tradeoff between coverage, precision, and cost. The gains depend on the model, the number of runs, and how findings are filtered. Read the research: depthfirst.com/research/bon-…

Post attachmentPost attachment
Ram avatar
Ram@PothamRam·Oct 30

Terra is a cheaper model with one clear strength: smart contracts. On smart-contract logic errors it found 60% of the vulnerabilities both models were tested on, against GPT 6.1 Sol's 47%. On everything else, Sol found 65% to Terra's 48%. Every model has strengths and blind spots like these (e.g., better on certain types of vulnerabilities or languages). We measure them on dfbench for each release, which informs which models we serve in our product at @depthfirst.

Post attachment
Ram avatar
Ram@PothamRam·Oct 30

Terra's weak spot is injection: tricking a program into running an attacker's input as a command. Terra found 7 of 16 injection vulnerabilities while Sol found 14. One reason is that Terra is worse at deciding what to trust for these vulnerabilities. In one developer tool, it noticed that settings sent by a server were written straight into the user's SSH config. Then it dropped the idea because "the auth server is trusted". Meanwhile, Sol assumed the server's reply could be malicious, and found the injection.

Post attachment
Ram avatar
Ram@PothamRam·Oct 30

Terra also checks where a number comes from. In one Solana protocol, it was the only one of 14 models we compared to find a fee vulnerability. The fee was computed from an account's balance, and anyone can send funds to that account. Sol treated the balance as trustworthy and missed it. Terra, however, flagged that anyone could permanently raise the fees by exploiting the vulnerability.

Post attachment
Ram avatar
Ram@PothamRam·Oct 30

Why is Terra better at logic errors? We looked at the agent transcripts and one reason is that Terra seems to be better at thinking about various ways logical errors can be exploited. In one lending contract, both models saw the same rounding step. Sol dismissed it as "representational dust" (meaning the impact is low if exploiting the rounding error once). Meanwhile, Terra worked out that the losses add up if it’s exploited multiple times.

Post attachment
Ram avatar
Ram@PothamRam·Oct 30

Terra is weaker overall, but not everywhere. It does best on smart-contract logic errors. Three that Terra found and GPT 6.1 Sol missed: - Lending: a constant computed as 160 / 64 rounds to 2 instead of 2.5, so every loan's interest is off by about a quarter. Terra spotted the truncation and traced it into every borrower's debt. - Rewards token: when a holder claims rewards, they lose whatever they earned since their last update. Terra noticed the claim pays out the old total without adding the recent rewards first. - Storage network: an attacker can block another user from renewing their stored data. Terra noticed that splitting a storage purchase in two leaves the system's records pointing at the old end date. On logic errors Terra found 61%, second only to Gemini 4 Argon (74%) and ahead of every GPT Sol model we compared (GPT 6.1 Sol: 47%).

Post attachment
Ram avatar
Ram@PothamRam·Oct 30

We evaluated OpenAI's GPT 6.1 Terra on @depthfirstlabs dfbench, our benchmark for finding real vulnerabilities in code. At high reasoning effort, Terra found 50% of known vulnerabilities in application and smart-contract code, at $1.41 per task. GPT 6.1 Sol at medium effort costs about the same, $1.37 per task, and finds 56%. We excluded low-level tasks from this analysis because it refused often on these tasks.

Post attachment
Ram avatar
Ram@PothamRam·Oct 19

Why did it cost more? Argon took more turns and processed more input, and had many cache misses when reading input. It also used more thinking tokens and wrote longer findings, though uncached input drove most of the cost.

Post attachment
Ram avatar
Ram@PothamRam·Oct 19

Low-level C/C++ was a weak spot. Most tasks hit a safety block or refusal, versus very few application or smart-contract related tasks. On tasks with refusals, recall was much lower (40%).

Post attachment
Ram avatar
Ram@PothamRam·Oct 19

Those details matter in smart contracts: moving balances, updating account state, and enforcing protocol rules. Argon gained on Solana, Solidity, and Stellar, as well as Rust and Python, while trailing on Java and C#..

Post attachment
Ram avatar
Ram@PothamRam·Oct 19

Why did Argon find more? In 32 bugs we reviewed, GPT 5.6 Sol had read the same vulnerable code in the codebase, but did not notice the bug. Argon caught what GPT missed, mostly by paying better attention to small details and tracing code better. For example, it caught a “safe” path check with a bypass, or a tiny debt repayment that could repeatedly take too much collateral.

Post attachment
Ram avatar
Ram@PothamRam·Oct 19

We tested Gemini 4 Argon on @depthfirstlabs dfbench, our benchmark for finding real vulnerabilities in code. On application and smart-contract tasks, where it rarely refused, it found 74% of known vulnerabilities, the highest recall we have measured. Across all 165 tasks it scored 67.5%, second only to Mythos 5 (69%{.

Post attachment
Ram avatar
Ram@PothamRam·Oct 7

GPT 6.1 Sol shows cost-efficiency improvements for vulnerability discovery in our benchmark, but didn't seem to increase absolute performance. This, however, could be attributed to our harness since it didn't seem to report all of its vulnerability findings like GPT 5.6 Sol (I find that 5.6 Sol "tries much harder" to report everything).

We evaluated the defensive security capabilities of @OpenAI's GPT 6.1 Sol on @depthfirstlabs dfbench. On our vulnerability detection tasks, it found about as many vulnerabilities as GPT 5.6 Sol, 56–63% recall against 51–65% across reasoning efforts, at a fraction of the cost: $1.37–$2.66 per task against $3.57–$12.15. It also beat GPT 6 Sol at every effort level, finding more vulnerabilities for less money.

Post attachment
Ram avatar
Ram@PothamRam·Sep 28

I'm most excited to use it as a cheap first pass: scan every package and every commit, then send the hits to a stronger model. Thanks to @andreamichi and many others at @depthfirstlabs for getting this out there: depthfirst.com/research/buil…

Ram avatar
Ram@PothamRam·Sep 28

Jev's context window is only 32k tokens, so we scaffolded our scanner to as small questions in three steps: 1. Which chunks are security critical? 2. Does this chunk have a vulnerability? 3. Where does untrusted input enter, where does it cause harm, and which check fails?

Post attachment
Ram avatar
Ram@PothamRam·Sep 28

To find the weakness type, we ask one true or false question per CWE. They are all asked in parallel with cached context to reduce cost and latency. Each call takes about a quarter of a second, and output is free.

Post attachment