Asterisk-Pi: ASPP-Attention with π-Flow Refinement
Asterisk-Pi is an enhanced version of the Asterisk model that adds π-flow (probability flow) refinement to the hybrid ASPP-Attention architecture. Building on the SmolLM2-135M base, Asterisk-Pi implements per-layer iterative refinement inspired by probability flow ODEs from diffusion models, enabling multi-step reasoning through continuous state evolution.
Model Description
Base Model: Asterisk (SmolLM2-135M-Instruct with ASPP)
Key insight: Asterisk-Pi (173.7M params) consistently outperforms the much larger Gemma-3-270m-it (270M params), demonstrating that the hybrid ASPP-Attention architecture with π-flow refinement achieves superior parameter efficiency. The structured reasoning approach enables better performance per parameter, especially on complex multi-step reasoning tasks.
Architecture
Overview
Asterisk-Pi Architecture
Figure: Asterisk-Pi architecture showing the hybrid ASPP-Attention structure with π-flow refinement. Each of the 30 layers contains parallel ASPP and Attention branches, gated fusion, and iterative π-flow refinement using probability flow ODE.
Input → [30 Hybrid Layers with π-Flow] → Output
Each Hybrid Layer:
1. ASPP-Attention Fusion (from base Asterisk)
2. π-Flow Refinement (NEW)
3. Feed-Forward Network
1. Hybrid ASPP-Attention Layer (Base Asterisk)
python
1classHybridASPPAttentionLayer:2"""
3 Combines ASPP operator with standard attention
45 Components:
6 - ASPP operator: Local structured reasoning with Union-Find graph propagation
7 - Standard attention: Global context
8 - Gated fusion: Dynamic balancing
9 """
ASPP Operator: Union-Find Graph Propagation
The ASPP operator uses a Union-Find (Disjoint Set Union) structure for efficient graph-based message passing. Unlike traditional attention's O(n²) complexity or skip-list's O(n log n), Union-Find achieves O(n) complexity with nearly constant-time operations.
Graph Structure - Union-Find Parent Chain:
Position: [0] [1] [2] [3] [4] [5] ... [n-1]
Parent: [0] ← 0 ← 1 ← 2 ← 3 ← 4 ... ← n-2
(root)
- Position 0: points to itself (root of the tree)
- Position i (i>0): points to position i-1 (parent)
- Forms a linear chain structure for sequential token relationships
This creates a directed acyclic graph (DAG) where information flows from children to parents, naturally capturing left-to-right sequential dependencies in language modeling.
Graph Propagation Aggregation:
Each ASPP evolution step performs parent-based message passing:
python
1# Pseudocode for one ASPP propagation step2for position i in sequence:3# 1. Find parent using Union-Find structure4 parent_idx = compute_parent_indices()[i]# O(1) with path compression56# 2. Gather parent features7 parent_features = hidden_states[parent_idx]89# 3. Message aggregation: combine self + parent10 message_input = concat([hidden_states[i], parent_features])1112# 4. Update via learned transformation13 new_state = message_net(message_input)# 2-layer MLP1415# 5. Scaled residual connection16 hidden_states[i]= hidden_states[i]+ residual_scale * new_state
17 hidden_states[i]= layer_norm(hidden_states[i])
Key properties of Union-Find propagation:
O(n) Complexity: Each position performs exactly one parent lookup and one aggregation
Message passing simulates "Find" operations (traversing to ancestors)
Can extend to dynamic "Union" operations (merging related tokens)
Multi-Step Propagation:
With K=4 evolution steps, information flow becomes:
Step 1: Position i accesses parent i-1
Step 2: Position i now has information from i-2 (via i-1)
Step 3: Position i now has information from i-3 (propagated through chain)
Step 4: Position i now has information from i-4 (fully propagated)
Result: Each position has aggregated context from 4 previous positions
through efficient O(n) operations
This multi-step propagation is crucial for:
Local context: Recent tokens for coherence
Gradient flow: Direct paths for backpropagation
Efficiency: Linear cost instead of quadratic attention
1# Added to each hybrid layer2self.pi_flow_aspp = ASPPOperator(...)# Velocity field network3self.pi_flow_scale = Parameter(0.2)# Learnable flow strength4self.pi_flow_gate = MLP(hidden_size ->1)# Token-wise adaptive gating
π-Flow forward pass:
function π_flow_refinement(hidden_states):
for step = 1 to π_flow_steps:
# Compute velocity field using dedicated ASPP
v = pi_flow_aspp(hidden_states)
# Adaptive per-token gating
gate = sigmoid(pi_flow_gate(hidden_states)) # [B, L, 1]
alpha = pi_flow_scale * gate
# Euler step in probability space
hidden_states = hidden_states + alpha * v
return hidden_states
Key design choices:
Per-layer π-flow: Each of 30 layers has independent π-flow parameters
Learnable scale: pi_flow_scale adapts flow strength during training
Token-wise gating: Different tokens get different flow magnitudes
ASPP velocity: Reuses ASPP architecture for computing v(h)
1@misc{asteriskpi2026,
2 title={Asterisk-Pi: Probability Flow Refinement for Hybrid ASPP-Attention Models},
3 author={NoesisLab},
4 year={2026},
5 publisher={Huggingface},
6 url={https://huggingface.co/NoesisLab/Asterisk-Pi}
7}
bibtex
1@misc{asterisk2026,
2 title={Asterisk: Hybrid ASPP-Attention Architecture for Enhanced Language Modeling},
3 author={NoesisLab},
4 year={2026},
5 publisher={Huggingface},
6 url={https://huggingface.co/NoesisLab/Asterisk}
7}
bibtex
1@misc{vonwerra2022trl,
2 title={{TRL: Transformer Reinforcement Learning}},
3 author={Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
4 year={2020},
5 journal={GitHub repository},
6 publisher={GitHub},
7 howpublished={\url{https://github.com/huggingface/trl}}
8}
bibtex
1@article{allal2024SmolLM2,
2 title={SmolLM2 - with great data, comes great performance},
3 author={Allal, Loubna Ben and Lozhkov, Anton and Penedo, Guilherme and Wolf, Thomas and von Werra, Leandro},
4 year={2024}
5}
Related Work
Diffusion Models: π-flow inspired by probability flow ODEs in score-based diffusion
Neural ODEs: Continuous-depth models with adaptive computation
Iterative Refinement: Multi-pass decoding in sequence models
Future Directions
Adaptive π-flow steps: Learn number of refinement steps per layer
Higher-order ODE solvers: Replace Euler with RK4 or adaptive schemes
Stochastic π-flow: Add noise injection for exploration
Cross-layer π-flow: Allow information flow between distant layers
License
This model inherits the Apache 2.0 license from SmolLM2-135M-Instruct.