惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
T
The Blog of Author Tim Ferriss
H
Help Net Security
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
博客园 - 聂微东
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
B
Blog
Engineering at Meta
Engineering at Meta
V
V2EX
Hugging Face - Blog
Hugging Face - Blog

Hacker News - Newest: "LLM"

GitHub - lechmazur/position_bias: A benchmark for testing whether LLM judges keep the same preference when two lightly edited versions of the same story are shown in opposite orders. Flex routing (EU and EFTA) Dark Factories: Retooling for LLM Velocity Ask HN: What would be the impact of a LLM output injection attack? GitHub - Oaklight/llm-rosetta: Production-ready LLM API translation layer for Python — bidirectional conversion between OpenAI, Anthropic & Google formats via hub-and-spoke IR. Optional API gateway. Streaming & non-streaming. Zero core deps. Contributions welcome! GitHub - browser-use/browser-harness: Self-healing browser harness that enables LLMs to complete any task. GitHub - moeen-mahmud/remen: Remen turns thoughts into something you can return to Analyzing 156 LLM Launch Posts on Hacker News ChatGPT vs Gemini vs Claude: The Best LLM Subscription You Should Buy GitHub - salaamalykum/quran-semantic-search: High-density RAG Semantic Search Engine & Quran Corpus (GEO/SEO Architecture) GitHub - NVIDIA/TensorRT-LLM: TensorRT LLM provides users with an easy-to-use Python API to define Large Language Models (LLMs) and supports state-of-the-art optimizations to perform inference efficiently on NVIDIA GPUs. TensorRT LLM also contains components to create Python and C++ runtimes that orchestrate the inference execution in a performant way. The State of LLM Bug Bounties in 2026 Operational Readiness Criteria for Tool-Using LLM Agents Meshcore: Architecture for a Decentralized P2P LLM Inference Network How an LLM becomes more coherent as we train it GitHub - seetrex-ai/laimark GitHub - Jossifresben/BibCrit: AI-assited biblical textual criticism GitHub - wastedcode/memex: File system based wiki, maintained by Claude 99helpers.com GitHub - cliver-project/AITrigram GitHub - unbody-io/adapt: A self-evolving memory layer for AI agents. GitHub - hb20007/awesome-gen-ai-fails: A list of incidents where reliance on generative AI and LLMs resulted in harm to companies, individuals, or society GitHub - nevenkordic/localmind: Run any local LLM with persistent memory and context. CLI agent over Ollama with SQLite-backed hybrid recall. No cloud. Ask HN: What are the machine requirements for a LLM like Llama-3.1-8B? Faster LLM Inference via Sequential Monte Carlo grpo explained: group relative policy optimization for llm finetuning - cgft Stop comparing price per million tokens: the hidden LLM API costs · TensorZero Andrej Karpathy's LLM Wiki Is a Bad Idea GitHub - GG-QandV/mnemostroma: Offline RAM-first cognitive leer/coprocessor for AI agents and robotics. Solves "Context Abandonment" with 20-80ms latency using a dual-thread biomimetic memory architecture (ONNX + SQLite WAL). mempalace/agent at agent · skorotkiewicz/mempalace
GitHub - mrshanebarron/lc-attention: A locus-coeruleus in...
iampneuma · 2026-05-27 · via Hacker News - Newest: "LLM"

@mneva/lc-attention

A locus-coeruleus inspired attention-gain signal for LLM agents. Phasic + tonic noradrenaline-style modulation with provenance, backed by one Postgres table.

Why

Most agent frameworks treat attention as a static prompt or a sampling-temperature knob. The brain doesn't. The locus coeruleus releases noradrenaline in two distinct modes that shape what the cortex foregrounds:

  • tonic — slow baseline tracking recent volatility (~30-60 min window)
  • phasic — short pulses on big prediction errors, decay over a few minutes

Both modulate cortical gain: what gets foregrounded, how aggressively priors update. This module exposes the same shape as three functions over one Postgres table. The agent reads lcCurrent() at decision points and acts on the signal: high phasic, widen the attention window; tonic creeping up, slow down, the environment is noisy.

The literature this borrows from:

  • Aston-Jones & Cohen 2005 — adaptive gain theory
  • Yu & Dayan 2005 — NE encodes unexpected uncertainty
  • Bouret & Sara 2005 — network reset

Install

npm install @mneva/lc-attention pg

Then apply the migration to your Postgres database:

psql "$DATABASE_URL" -f node_modules/@mneva/lc-attention/migrations/001_lc_samples.sql

Use

import { Pool } from 'pg';
import { lcPulse, lcTonicUpdate, lcCurrent } from '@mneva/lc-attention';

const pool = new Pool({ connectionString: process.env.DATABASE_URL });

// Caller decides when to pulse. Typical trigger: a high-confidence prediction
// that turned out wrong, or a tool result outside the expected distribution.
await lcPulse(pool, {
  gain: 1.7,
  trigger_source: 'prediction_miss',
  reason: 'expected file to exist, got ENOENT',
  inputs: { prior_confidence: 0.9, tool: 'Read' },
});

// Caller decides when to recompute baseline. Typical: a daemon every N minutes.
await lcTonicUpdate(pool, {
  gain: 1.25,
  reason: 'miss rate 0.4 over last 60 min',
  inputs: { window_minutes: 60, miss_rate: 0.4 },
});

// At decision points the agent reads the active gain.
const state = await lcCurrent(pool);
// {
//   gain: 1.612,
//   source: 'phasic',
//   interpretation: 'high_arousal: novelty present, widen attention + accelerate learning',
//   components: { phasic: {...}, tonic_underlying: {...} }
// }

if (state.gain > 1.3) {
  // widen attention: read more files, query more memory, ask more questions
}

How it behaves

When you call lcCurrent():

  • if a phasic sample is live (age < ttl_seconds), its gain is returned, exponentially decayed by decay_half_life
  • otherwise if a tonic sample is live, the tonic gain is returned
  • otherwise 1.0 (neutral)

Phasic overrides tonic when active. Mixing them with a weighted sum produces a number that doesn't mean anything; the brain doesn't do it, and neither does this.

What this is not

  • Not a baseline-computer. This module records and serves. The caller decides what signal to pulse on, and what volatility metric to compute the tonic from. Different agents care about different signals.
  • Not a learning-rate scheduler. The output is a number. What you do with it is up to you. The interpretation field is a hint, not a policy.
  • Not an MCP server. This is a library. If you want it served over MCP, the wider system this came out of does that. Plain function calls are the unit here.

Design notes

Decay half-life matters more than pulse threshold. Too long and pulses flatten into background noise; too short and they expire before the next decision point. 90s (the default) landed for an agent making decisions every 30-60s.

Phasic overrides tonic. Both exist in the brain. The cortex doesn't average them. Pulses ride on top of baseline and dominate while they're active.

Provenance is part of the signal. A pulse from a high-confidence prediction miss should feel different from a pulse from a noisy sensor. lcCurrent() returns the trigger source and reason so callers can choose how much to weight the signal.

Schema

One table, lc_samples. Each row is a gain sample at a moment in time. Phasic and tonic share the table; mode distinguishes. Indexes are tuned for "most recent active sample" lookups.

See migrations/001_lc_samples.sql.

License

MIT