Papers
Topics
Authors
Recent
Search
2000 character limit reached

ProgMeta-ICL: Meta-Learning with In-Context Learning

Updated 18 January 2026
  • ProgMeta-ICL is a family of meta-learning approaches that combine meta-interpretive strategies with in-context learning to tackle logic program synthesis, prompt structuring, and log parsing.
  • It employs progressive adaptation over demonstration budgets and advanced abstractions like three-valued logic to enhance generalization and efficiency across tasks.
  • Empirical evaluations show significant improvements in synthesis speed and parsing accuracy, highlighting the method’s capacity for robust latent predicate invention and adaptive resource allocation.

ProgMeta-ICL is a family of progressive meta-learning approaches unified by their joint use of meta-interpretive or meta-learning strategies with in-context learning (ICL). The term encompasses distinct methodologies applied in logic program synthesis, LLM prompt structuring, and log parsing, each addressing domain-specific challenges in generalization, adaptation, and efficiency. Across implementations, ProgMeta-ICL leverages meta-learning frameworks that facilitate learning over progressive task complexities or prompt formats, supporting multi-predicate invention, robust generalization to new tasks or domains, and efficient utilization of demonstration resources.

1. Formal Problem Definition and Motivation

In logic-based settings, ProgMeta-ICL refers to the extension of meta-interpretive learning (MIL) frameworks where the system is tasked with reverse engineering programming language semantics from input/output evaluation examples. For a set of abstract syntax trees (ASTs) L\mathcal{L} representing program terms and a subset VLV \subseteq \mathcal{L} of values (fully reduced terms), the learning environment is defined by:

  • An opaque interpreter I:LV{}I : \mathcal{L} \rightarrow V \cup \{\perp\}, mapping programs to results or divergence.
  • Background knowledge BB, typically partial Prolog definitions (e.g., for eval/2eval/2).
  • A hypothesis space H\mathcal{H} of clauses over predicates such as eval/2eval/2, step/2step/2, value/1value/1.

The objective is to synthesize a finite HHH \subseteq \mathcal{H} such that for all eLe \in \mathcal{L}, vVv \in V:

eL.[I(e)=v    BHeval(e,v) I(e)v    BH⊭eval(e,v) I(e)=    v.BH⊭eval(e,v)]\forall e\in\mathcal{L}. \left[ \begin{array}{l} I(e)=v \implies B \cup H \models eval(e,v)\ I(e)\neq v \implies B \cup H \not\models eval(e,v)\ I(e) = \perp \implies \forall v.\, B\cup H \not\models eval(e,v) \end{array} \right]

Motivations for such ProgMeta-ICL approaches include:

  • Enabling abstraction over language constructors and predicate names.
  • Handling non-terminating (divergent) evaluation cases efficiently.
  • Learning latent, non-observed predicates critical to program semantics (Bartha et al., 2019).

In LLM-based settings, ProgMeta-ICL is instantiated for efficient and adaptive in-context learning, particularly in resource-constrained or highly variable environments:

  • Progressive adaptation to a range of demonstration budgets (zero-shot to kk-shot), with meta-training attuned to increasing information.
  • Meta-learned token structures or prompt schemata to standardize and optimize adaptation to new tasks or data distributions.
  • Efficient sampling, retrieval, and caching to mitigate query cost and data scarcity (Yu et al., 11 Jan 2026, Brunet et al., 2023).

2. Methodological Foundations and Extensions

Meta-Interpretive Learning with Function-Symbol Abstraction

ProgMeta-ICL extends standard Metagol MIL by supporting variables in function-symbol positions, not just predicates. Compound terms f(t1,...,tn)f(t_1,...,t_n) are represented in "univ" list form [f,t1,...,tn][f, t_1, ..., t_n], and the meta-interpreter instantiates such function variables via Prolog's =../2=../2 operator during proof search.

Core meta-rule templates include:

  • Chain: P,Q,R.  P(A,B)Q(A,C)R(C,B)\forall P,Q,R.\; P(A,B) \leftarrow Q(A,C) \wedge R(C,B)
  • Unary unfold: P,Q.  P(f(A),f(B))Q(A,B)\forall P,Q.\; P(f(A), f(B)) \leftarrow Q(A,B)
  • Value-introduction: P,F.  P(F(A,B))value(A)value(B)\forall P, F.\; P(F(A,B)) \leftarrow value(A) \wedge value(B)

Such abstraction supports synthesis of constructs (e.g., fst/1fst/1, snd/1snd/1, pair/2pair/2) without hardcoding names and facilitates reasoning over AST constructors (Bartha et al., 2019).

Three-Valued, Depth-Bounded Examples

To accommodate divergence, ProgMeta-ICL incorporates three-valued logic:

  • Positives must succeed within depth DD.
  • Negatives must finitely fail within DD.
  • Divergent examples are flagged as “\infty” if depth bound is exceeded, forming constraints on hypotheses.

The interpreter tracks a depth counter (e.g., in eval(E,V,Depth)eval(E,V,Depth)) and restricts hypothesis to correctly classify all three categories (Bartha et al., 2019).

Multi-Predicate, Latent Predicate Invention

Learning is not limited to directly observed predicates. By marking background predicates (e.g., step/2step/2, value/1value/1) as "interpreted," ProgMeta-ICL recursively switches into learning mode if such a predicate is incompletely defined, synthesizing subroutines as needed in the course of proving the observed task (e.g., eval/2eval/2). This enables joint induction of multiple interdependent logic definitions (Bartha et al., 2019).

Progressive Meta-Learning in LLM-ICL

In LLM-based implementations, ProgMeta-ICL employs meta-training over a sequence of ICL conditions (zero- to kk-shot):

  • Each meta-task cycles through tasks with increasing numbers of demonstration examples.
  • The LLM is conditioned during training to robustly utilize whichever kk (0kkmax0 \leq k \leq k_{\max}) is encountered at inference.
  • Enhanced sampling (weighted DBSCAN) increases coverage of complex or rare cases.
  • Enhanced demonstration selection (BM25 with ordering) improves relevance and prompt robustness (Yu et al., 11 Jan 2026).

Meta-Learned Prompt Structure in ICL

ICL Markup instantiates ProgMeta-ICL by learning a set of soft-token tags T={τ1,,τM}\mathcal{T} = \{\tau_1, \ldots, \tau_M\}, whose embeddings are trained via meta-learning while the LLM itself is frozen. These tags are inserted at structural points in prompt templates to encode task components (demonstration, input, label etc.), thereby standardizing formatting and removing reliance on prompt engineering (Brunet et al., 2023).

3. Implementation Strategies and Procedural Flow

Algorithmic Steps in Logic Program Synthesis

  1. Encode compound term structure using "univ" list representation.
  2. Define meta-rules with potential function-symbol variables.
  3. Manage derivation with a global depth bound for three-valued example handling.
  4. At proof time:
    • Attempt to prove observed predicates.
    • If an interpreted, under-defined predicate is encountered, invoke learning for it.
    • Aggregate induced clauses, updating background knowledge iteratively.

Algorithmic Steps in LLM-Based Log Parsing

  1. Weighted-DBSCAN over deduplicated log stream with token/length-based complexity scores yields representative meta-training and inference pools.
  2. BM25 is used to select and order demonstration examples for prompt construction.
  3. A multi-level cache (exact-match LRU, normalized-pattern) accelerates repeated parsing and minimizes LLM queries.
  4. At inference, the LLM is presented a prompt structured with 0k0\to k labeled examples according to the meta-trained paradigm.

Meta-Learning Objective

The meta-learning loss combines expected ICL loss over meta-task distribution:

LProgMetaICL=ETP(T)  LICL(T,ST(0k))\mathcal{L}_{ProgMeta-ICL} = \mathbb{E}_{T \sim P(T)}\; \mathcal{L}_{ICL}\left(T,\, S_T^{(0\to k)}\right)

with ICL loss for task TT: LICL(T)=1Tt=1TlogP(rtxt,St1,θ)\mathcal{L}_{ICL}(T) = \frac{1}{|T|} \sum_{t=1}^{|T|} - \log P(r_t \mid x_t, S_{t-1}, \theta)

Soft-token tag learning in ICL Markup can be formalized as tuning the tag embedding parameters VV (with the LLM frozen) to minimize expected negative log-likelihood of pθ(ytagged_prompt(ST,x))p_\theta(y \mid \mathrm{tagged\_prompt}(S_T, x)) over sampled warm-up tasks (Brunet et al., 2023).

4. Experimental Evaluations and Empirical Performance

Logic Program Synthesis

ProgMeta-ICL was evaluated on small-step semantics extensions over the untyped λ\lambda-calculus:

  • Constructs: pairs, lists, conditionals, and evaluation strategies.
  • Results:
    • Each extension learned in under 0.2 s, synthesizing 3–6 clauses.
    • Sequentially, 25 clauses induced per staged run (also <0.2 s/stage).
    • Learning time grows exponentially with theory size; example order heavily impacts runtime (10× speedups observed with reordering).
    • Validated ability to abstract over function symbols, accommodate divergences, and simultaneously invent latent subroutines (Bartha et al., 2019).

LLM-Based Log Parsing (MicLog)

  • Loghub-2.0 benchmark (14 datasets).
  • Metrics: Parsing Accuracy (PA), Template Precision/Recall.
  • Performance:
    • MicLog (ProgMeta-ICL) achieves 97.6% PA (+10.3% over AdaParser), 95.3% PTA (+12.6%), and 90.5% RTA (+6.1%).
    • Efficiency: Parsing time reduced by 42.4% vs AdaParser; cache lookup reduced from 376.5 s (LILAC) to 63.5 s.
    • Ablation: removing ProgMeta-ICL drops PA to 87.3% (−10.3%); removing weighted-DBSCAN or ordering reduces accuracy by 2.9–3.9%.
    • Robustness: lowest variance and highest median across datasets (Yu et al., 11 Jan 2026).

Prompt Structure Learning (ICL Markup)

  • News, intent, and legal text classification tasks with task/domain shifts.
  • Results:
    • HuffPost News: +5.9 p.p. accuracy over best hand-written prompt; +5.2 p.p. over PBML baseline.
    • Intent datasets: ICL-MU matches or exceeds performance of rule-based prompt-tuning without LLM finetuning.
    • Legal classification: +2.5 p.p. over vanilla Flan-T5-XL; statistically significant improvement (p=0.024p=0.024).
    • Reduces performance variance and eliminates sensitivity to prompt design choices (Brunet et al., 2023).
Implementation Domain Notable Results
Logic MIL (Bartha et al., 2019) Program synthesis <<0.2 s/construct, 3-6 clauses/stage
MicLog (Yu et al., 11 Jan 2026) Log parsing 97.6% PA, −42.4% time
ICL Markup (Brunet et al., 2023) Prompt learning +5.9 p.p., less variance

5. Hyperparameters, Design Choices, and Limitations

Key Hyperparameters and Tuning

  • Depth bound  D=10\text{Depth bound}\;D=10 for logic derivations (Bartha et al., 2019).
  • Maximum k=5k=5 for progressive ICL, meta-trained over 050\to 5 shots (Yu et al., 11 Jan 2026).
  • Weighted-DBSCAN: ϵ[0.1,1.0]\epsilon\in[0.1,1.0], MinPts[3,10]\text{MinPts}\in[3,10].
  • Sample ratio α0.009%\alpha\approx 0.009\%; pattern cache CLRU104C_\text{LRU}\approx 10^4.
  • Soft-token tag vocabulary: 14–23 entries assigned by role (Brunet et al., 2023).

Advantages

  • Adaptive resource allocation for demonstration usage (progressive kk-shot ICL).
  • Robust generalization to new task distributions, categories, and objectives.
  • Efficient online performance and amortized demonstration/sample selection.
  • Reduces arbitrary prompt engineering axes.

Limitations

  • Up-front meta-training required, albeit with small data in some cases (≈300 examples).
  • Sensitivity to clustering and batch-of-tasks scheduling.
  • Cache cost may escalate with highly diverse or adversarial inputs.
  • In logic MIL, exponential scaling with induced theory size is observed.
  • Some domain-specific implementations limited to classification and small model scales (Brunet et al., 2023).

A plausible implication is that the efficiency and generality benefits of ProgMeta-ICL may extend to broader generative and multi-modal tasks as future work.

6. Theoretical and Practical Significance

ProgMeta-ICL demonstrates that progressive meta-learning over in-context demonstration budgets, function-symbol abstraction, and meta-learned prompt structures can overcome several long-standing limitations in program synthesis, log parsing, and input-output adaptation for LLMs. Empirical results highlight substantial improvements in accuracy, robustness, and efficiency across domains.

By integrating latent predicate invention, depth-bounded three-valued reasoning, and learned prompt formalism, ProgMeta-ICL realizes flexible yet principled frameworks for both symbolic and neural learners. The standardized strategies for demonstration selection, prompt composition, and recursive hypothesis induction provide fundamental mechanisms for scalable, automatable knowledge acquisition in data- and domain-diverse environments (Bartha et al., 2019, Yu et al., 11 Jan 2026, Brunet et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ProgMeta-ICL.