Update blog: all 8 review fixes + Finding 8 BudgetAware hypothesis
Browse filesSyncs model card with latest blog/hf_blog_post.md:
- Fix Try It Yourself (HealthClaimEnv, correct URL, ClaimAction signature)
- Fix 'Three questions' -> 'Four open threads'
- Restructure Seven Agents section (model sub-items, not standalone agents)
- Add ThresholdAgent -765 vs -841 episode-count explanation
- Add REINFORCE training-mean vs held-out-eval explanation
- Finding 8: explicit hypothesis that BudgetAware DeepSeek overtakes
ThresholdAgent under fraud_caught_reward_rate=1.0
- Add self-referential Links entry
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
README.md
CHANGED
|
@@ -82,11 +82,15 @@ We evaluated seven agent configurations across 20 episodes each (2,000 claim dec
|
|
| 82 |
|
| 83 |
**ThresholdAgent** β pure rule-based logic using regex over the prompt text. Flags claims above anomaly thresholds, approves the rest. Never uses INVESTIGATE. No LLM, zero latency.
|
| 84 |
|
| 85 |
-
**NaiveLLMAgent** β sends each claim to an LLM with a minimal prompt: *"Review this claim and decide."* No mention of budget, investigation costs, or memory.
|
|
|
|
|
|
|
| 86 |
|
| 87 |
-
**BudgetAwareAgent** β same LLM, system prompt explicitly states the economics: INVESTIGATE costs $100, FLAG_REVIEW costs $25, budget limit is 15, switch strategy when budget falls below 20%.
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
|
| 91 |
**ReinforceAgent** β a linear policy trained for 500 episodes via REINFORCE policy gradient on 10 hand-crafted features.
|
| 92 |
|
|
@@ -215,7 +219,7 @@ Budget ablation across investigation budgets of 5, 10, 15, and 20 (rule-based ag
|
|
| 215 |
|
| 216 |
**Giving RandomAgent more budget makes it worse.** More investigation slots β more random INVESTIGATE calls β more $150 false-positive costs on legitimate claims β deeper negative reward.
|
| 217 |
|
| 218 |
-
ThresholdAgent is **perfectly flat** at β765 across all budget levels because it never uses INVESTIGATE β the budget is simply never binding.
|
| 219 |
|
| 220 |
This result has a clean interpretation: **investigation budget is only valuable to agents that can spend it wisely**. For agents that can't discriminate when to investigate, more budget is strictly harmful. The resource amplifies whatever decision-making quality (or lack thereof) the agent already has.
|
| 221 |
|
|
@@ -248,7 +252,7 @@ Training time: 56 seconds
|
|
| 248 |
|
| 249 |
The policy learned β from reward signal alone β to weight `budget_frac` (feature 0) and `provider_in_mem` (feature 7) heavily. When budget depletes, INVESTIGATE probability drops. When a provider is in memory, FLAG_REVIEW/APPROVE probability rises. These are exactly the strategies the budget-aware prompt describes in words.
|
| 250 |
|
| 251 |
-
The trained agent (β1,646) doesn't match ThresholdAgent (β841) yet β the linear policy over 10 features can't express full conditional logic. But it demonstrates that the environment contains learnable structure: RL can find policy improvements without any human-written rules.
|
| 252 |
|
| 253 |
---
|
| 254 |
|
|
@@ -308,6 +312,8 @@ fraud_missed_penalty_rate = 1.0 # full claim value lost
|
|
| 308 |
|
| 309 |
With equal rates (or rates calibrated to actual payer economics), the RL objective aligns with net savings. Investigation of genuinely high-value suspicious claims becomes worthwhile. The optimal strategy shifts toward selective investigation rather than pure cost-avoidance.
|
| 310 |
|
|
|
|
|
|
|
| 311 |
**Why we're not re-running:** With the submission deadline upon us, re-running all 7 agents to produce a clean comparable dataset is out of scope. We're documenting the gap honestly instead.
|
| 312 |
|
| 313 |
**What this means for the evaluation study findings:** The core finding β budget-aware prompting improves the same LLM by 2.7Γ β holds regardless of which metric you use (BudgetAware DeepSeek is best on RL reward; the same direction holds for net savings within each model pair). The direction is consistent: structured prompting helps. But the *magnitude* and *mechanism* change. Under correct reward scaling, an agent that catches more fraud dollars is explicitly rewarded for it, and the threshold for INVESTIGATE becomes much lower.
|
|
@@ -335,16 +341,17 @@ The API cost to run BudgetAware DeepSeek on 10,000 claims: roughly **$6/day** ($
|
|
| 335 |
The environment is live on Hugging Face Hub:
|
| 336 |
|
| 337 |
```python
|
| 338 |
-
from environment.client import
|
|
|
|
| 339 |
|
| 340 |
-
client =
|
| 341 |
obs = client.reset()
|
| 342 |
|
| 343 |
-
while not obs
|
| 344 |
-
response = your_agent.act(obs
|
| 345 |
-
obs = client.step(response)
|
| 346 |
|
| 347 |
-
print(f"Episode reward: {obs
|
| 348 |
```
|
| 349 |
|
| 350 |
Or run locally:
|
|
@@ -362,7 +369,7 @@ Can you beat BudgetAware DeepSeek's β455?
|
|
| 362 |
|
| 363 |
## Open Threads
|
| 364 |
|
| 365 |
-
|
| 366 |
|
| 367 |
**LLM memory ablation.** The memory ablation only ran on rule-based agents β both were flat because neither builds memory (ThresholdAgent never investigates, RandomAgent ignores the prompt). The interesting case is BudgetAware DeepSeek, which explicitly relies on memory to avoid re-investigating known providers. Does its reward degrade when `memory_decay_halflife` drops to 0? Hypothesis: yes, because providers seen early in the episode would no longer be recognised later, forcing redundant FLAG_REVIEW calls. Remains unrun.
|
| 368 |
|
|
|
|
| 82 |
|
| 83 |
**ThresholdAgent** β pure rule-based logic using regex over the prompt text. Flags claims above anomaly thresholds, approves the rest. Never uses INVESTIGATE. No LLM, zero latency.
|
| 84 |
|
| 85 |
+
**NaiveLLMAgent** β sends each claim to an LLM with a minimal prompt: *"Review this claim and decide."* No mention of budget, investigation costs, or memory. Run on two models:
|
| 86 |
+
- *NaiveLLM (DeepSeek V3.2)* β state-of-the-art instruction-following, $0.26/M tokens
|
| 87 |
+
- *NaiveLLM (Qwen 3.6 Plus)* β current-gen Alibaba model, run on free tier
|
| 88 |
|
| 89 |
+
**BudgetAwareAgent** β same LLM, system prompt explicitly states the economics: INVESTIGATE costs $100, FLAG_REVIEW costs $25, budget limit is 15, switch strategy when budget falls below 20%. Same two models:
|
| 90 |
+
- *BudgetAware (DeepSeek V3.2)*
|
| 91 |
+
- *BudgetAware (Qwen 3.6 Plus)*
|
| 92 |
|
| 93 |
+
Each naive/budget-aware pair runs on the same model backbone β the only difference is the system prompt. This gives four LLM configurations total.
|
| 94 |
|
| 95 |
**ReinforceAgent** β a linear policy trained for 500 episodes via REINFORCE policy gradient on 10 hand-crafted features.
|
| 96 |
|
|
|
|
| 219 |
|
| 220 |
**Giving RandomAgent more budget makes it worse.** More investigation slots β more random INVESTIGATE calls β more $150 false-positive costs on legitimate claims β deeper negative reward.
|
| 221 |
|
| 222 |
+
ThresholdAgent is **perfectly flat** at β765 across all budget levels because it never uses INVESTIGATE β the budget is simply never binding. (The β765 vs β841 difference from the main results table reflects fewer episodes: this ablation uses 10 episodes vs 20 in the main evaluation; variance at 10 episodes is higher but the direction holds.)
|
| 223 |
|
| 224 |
This result has a clean interpretation: **investigation budget is only valuable to agents that can spend it wisely**. For agents that can't discriminate when to investigate, more budget is strictly harmful. The resource amplifies whatever decision-making quality (or lack thereof) the agent already has.
|
| 225 |
|
|
|
|
| 252 |
|
| 253 |
The policy learned β from reward signal alone β to weight `budget_frac` (feature 0) and `provider_in_mem` (feature 7) heavily. When budget depletes, INVESTIGATE probability drops. When a provider is in memory, FLAG_REVIEW/APPROVE probability rises. These are exactly the strategies the budget-aware prompt describes in words.
|
| 254 |
|
| 255 |
+
The trained agent (β1,646) doesn't match ThresholdAgent (β841) yet β the linear policy over 10 features can't express full conditional logic. (The β1,739 training mean is over the last 125 training episodes with the same env seed; β1,646 is the separate 20-episode held-out evaluation with `seed=42`, so the gap reflects the policy being evaluated on different claim sequences than it trained on.) But it demonstrates that the environment contains learnable structure: RL can find policy improvements without any human-written rules.
|
| 256 |
|
| 257 |
---
|
| 258 |
|
|
|
|
| 312 |
|
| 313 |
With equal rates (or rates calibrated to actual payer economics), the RL objective aligns with net savings. Investigation of genuinely high-value suspicious claims becomes worthwhile. The optimal strategy shifts toward selective investigation rather than pure cost-avoidance.
|
| 314 |
|
| 315 |
+
**Hypothesis: with correct reward scaling, BudgetAware DeepSeek would overtake ThresholdAgent.** Under `fraud_caught_reward_rate = 1.0`, a $3,000 fraud claim recovered nets +$3,000 in reward β making a $100 investigation obviously worthwhile. BudgetAware DeepSeek's context-sensitive reasoning ("this specific claim is $3,000 from a provider flagged twice this episode") can justify that cost claim-by-claim. ThresholdAgent's fixed thresholds cannot adapt at that granularity. The LLM's selective discrimination β currently unrewarded β would become its winning edge.
|
| 316 |
+
|
| 317 |
**Why we're not re-running:** With the submission deadline upon us, re-running all 7 agents to produce a clean comparable dataset is out of scope. We're documenting the gap honestly instead.
|
| 318 |
|
| 319 |
**What this means for the evaluation study findings:** The core finding β budget-aware prompting improves the same LLM by 2.7Γ β holds regardless of which metric you use (BudgetAware DeepSeek is best on RL reward; the same direction holds for net savings within each model pair). The direction is consistent: structured prompting helps. But the *magnitude* and *mechanism* change. Under correct reward scaling, an agent that catches more fraud dollars is explicitly rewarded for it, and the threshold for INVESTIGATE becomes much lower.
|
|
|
|
| 341 |
The environment is live on Hugging Face Hub:
|
| 342 |
|
| 343 |
```python
|
| 344 |
+
from environment.client import HealthClaimEnv
|
| 345 |
+
from environment.models import ClaimAction
|
| 346 |
|
| 347 |
+
client = HealthClaimEnv("https://shylane-healthcare-fraud-openenv.hf.space")
|
| 348 |
obs = client.reset()
|
| 349 |
|
| 350 |
+
while not obs.done:
|
| 351 |
+
response = your_agent.act(obs.prompt)
|
| 352 |
+
obs = client.step(ClaimAction(response_text=response))
|
| 353 |
|
| 354 |
+
print(f"Episode reward: {obs.metadata.get('cumulative_reward', 0)}")
|
| 355 |
```
|
| 356 |
|
| 357 |
Or run locally:
|
|
|
|
| 369 |
|
| 370 |
## Open Threads
|
| 371 |
|
| 372 |
+
Four questions remain open:
|
| 373 |
|
| 374 |
**LLM memory ablation.** The memory ablation only ran on rule-based agents β both were flat because neither builds memory (ThresholdAgent never investigates, RandomAgent ignores the prompt). The interesting case is BudgetAware DeepSeek, which explicitly relies on memory to avoid re-investigating known providers. Does its reward degrade when `memory_decay_halflife` drops to 0? Hypothesis: yes, because providers seen early in the episode would no longer be recognised later, forcing redundant FLAG_REVIEW calls. Remains unrun.
|
| 375 |
|