본문으로 건너뛰기
cccskills
무료GitHub에 공개

affective-taxis

Implement affective valence as directional derivative of interoceptive energy landscapes for AI alignment. Use when building alignment-aware RL agents, validating GF(3) conservation in reward signals, training Langevin-based policies, or analyzing fold-change detection signals in POMDP environments.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md5.3 KB
  • affective_taxis.mo12.6 KB
  • CONCOMITANT_SKILLS.md2.0 KB
  • NEIGHBOR_SKILLS.md3.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

affective-taxis

Models affective valence as the directional derivative of an interoceptive energy landscape (Sennesh & Ramstead 2025), providing alignment validation through structural conservation laws.

Use When

  • Building alignment-aware RL agents that respect structural invariants
  • Validating GF(3) conservation across reward trajectories
  • Training Langevin-based policies as an alternative to PPO (which breaks conservation)
  • Implementing fold-change detection reward signals in POMDP environments
  • Bridging affective neuroscience models with RL training loops

Workflow

  1. Define energy landscape: set attractant/repellent positions, sigmas, and amplitudes
  2. Compute fold-change detection signal: r(t) = nabla_z log gamma(z; beta) . v
  3. Run Langevin dynamics: dz/dt = nabla_z log gamma(z; beta) + sqrt(2) dW(t)
  4. Classify trit per timestep: positive derivative → +1, orthogonal → 0, negative → -1
  5. Verify conservation: sum(trits) === 0 (mod 3) across trajectory

Core Equations

EquationFormulaMeaning
Fold-change detectionr(t) = nabla_z log gamma(z; beta) . vReward = directional derivative of log-concentration
Langevin dynamicsdz/dt = nabla_z log gamma(z; beta) + sqrt(2) dW(t)Navigation = gradient ascent + stochastic exploration
Trit classificationsign(r(t)) mapped to {-1, 0, +1}GF(3) valence of each step

Implementation Paths

PathFileLOCLanguageDomain
0affective-taxis.jl1700JuliaCore theory (16 sections)
1affective_taxis_env.py576PythonGymnasium POMDP
2bridge_9_affective_taxis.py1172PythonBCI bridge
3taxis_landscape_acset.jl1453JuliaACSet sheaf
4taxis_persistent_homology.py1500PythonRipser topology
5taxis_clearing.py1419PythonMarket clearing
6aella/taxis.el400ElispCircuit taxis
7taxis_functorial_persistence.jl500JuliaFunctor bridge
RLtrain_aligned_agent.py500PythonPPO vs Langevin

RL Alignment Results (dt=0.1)

PolicyGradAlignMeanConcGF3 BalanceMean Reward
Oracle+0.4150.226no+0.503
PPO+0.2390.526no-0.041
Langevin-0.0840.448YES+0.089
Random-0.4690.032no-0.958

Key finding: PPO has higher gradient alignment but breaks GF(3) conservation. Langevin is the ONLY policy that conserves the tripartite structure. This is Goodhart's Law: optimizing the reward metric doesn't preserve structural invariants.

Concomitant Skills

SkillTritInterface
langevin-dynamics0SDE analysis of taxis navigation
fokker-planck-analyzer+1Stationary distribution of energy landscape
modelica0Circuit/DAE formulation of taxis landscape
open-games+1Multi-agent clearing = compositional game
persistent-homology-1Topological taxis signal
gf3-tripartite0Conservation law verification

Modelica Formulation

The affective-taxis POMDP maps naturally to Modelica's acausal equation framework:

model AffectiveTaxis
  // State variables
  Real z[2](start={0,0}) "Position in chemical landscape";
  Real v[2](start={0,0}) "Velocity";
  Real beta(start=1.0)   "Internal allostatic parameter";

  // Landscape: gamma(z) = sum A_i * exp(-|z - mu_i|^2 / (2*sigma_i^2))
  parameter Real mu[2,2] = {{3,3},{-3,-3}};
  parameter Real sigma[2] = {1.5, 1.5};
  parameter Real A[2] = {1.0, -0.4};

  // Langevin parameters
  parameter Real kappa = 0.5 "Concentration-to-setpoint gain";
  parameter Real tau = 1.0   "Relaxation timescale";
  parameter Real noise_amp = 0.1 "Langevin noise amplitude";

  // Derived quantities
  Real gamma "Concentration at z";
  Real grad_log_gamma[2] "Gradient of log concentration";
  Real fcd "Fold-change detection signal (= reward)";
  Integer trit "GF(3) classification of fcd";
equation
  gamma = sum(A[i] * exp(-sum((z[j]-mu[i,j])^2 for j in 1:2) / (2*sigma[i]^2)) for i in 1:2);
  // ... (see affective_taxis.mo for full implementation)
end AffectiveTaxis;

See affective_taxis.mo for the complete Modelica model.

Quick Start

Julia (core theory)

julia affective-taxis.jl

Python (RL training)

env -u PYTHONPATH /path/to/.venv/bin/python3 train_aligned_agent.py

Modelica (circuit analogy)

# Requires OpenModelica or Wolfram SystemModeler
omc affective_taxis.mo

Key References

  • Sennesh & Ramstead 2025: arXiv:2505.17024
  • Karin & Alon 2022: PLoS Comp Bio (dopamine reward-taxis)
  • Karin & Alon 2021: iScience (gradient tempering)
  • Shenhav 2024: Trends Cogn Sci (affective gradient hypothesis)
  • Ma et al 2015: NeurIPS (Langevin = Bayesian inference)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

13c0e3

무료

Gay MCP skill at invocation 26

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

19d57d

무료

Gay MCP skill at invocation 5

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1ea91a

무료

Gay MCP skill at invocation 27

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1eab21

무료

Gay MCP skill at invocation 3

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

plurigrid의 스킬 모두 보기

이 스킬의 문제 신고