Introduction
Large Language Models (LLMs) have demonstrated remarkable general-purpose capabilities, yet they often struggle with the "last mile" of specific domain applications. These failures frequently manifest as an inability to adhere to strict task-specific rules, such as maintaining logical consistency in temporal reasoning or following precise formatting constraints in entity extraction. Traditionally, the solution has been supervised fine-tuning (SFT), which requires thousands of human-annotated examples—a process that is both costly and slow.
This paper introduces ACT (Aligning to ConsTraints), a framework designed to customize LLMs without the need for expensive human labels. The core insight is that most task failures stem from a lack of constraint adherence rather than a lack of underlying knowledge. By utilizing automated "constraint verifiers" to rank model outputs, ACT provides a scalable surrogate for human supervision, achieving performance levels comparable to traditional fine-tuning.
The ACT Framework
The ACT framework automates the alignment process through a four-step pipeline that bridges the gap between general instructions and task-specific execution.
1. Constraint Selection and Verifier Realization
Constraints are categorized into three primary types:
- Response-based: Rules governing the output format (e.g., selecting from a predefined list of labels).
- Prompt-Response: Rules defining the relationship between input and output (e.g., ensuring a summary is relevant to the source document).
- Multi-instance: Logical rules across multiple outputs (e.g., ensuring temporal consistency across related questions).
Instead of human graders, ACT employs "Verifiers"—programmatic scripts, rule engines, or automated metrics like BERTScore—to calculate a Constraint Satisfaction Rate (CSR) for any given model output.
2. Response Sampling and Ranking-based Training
For each unlabeled prompt, the model generates multiple candidate responses using diverse search strategies. These candidates are then processed by the Verifiers. The model is fine-tuned using a ranking loss, learning to assign higher probabilities to responses that satisfy constraints and lower probabilities to those that violate them. This process effectively "bakes" constraint-following behavior directly into the model's weights, making it more robust than simple prompt-based instructions.
Experimental Evaluation
The researchers evaluated ACT across several challenging domains:
- FIGER: Fine-grained entity typing involving 112 possible labels.
- XSUM: Extreme abstractive summarization.
- TORQUE: Temporal question answering focusing on event ordering.
- Transfer Learning: Testing if constraint-following behavior (e.g., extractiveness) learned on one task transfers to others like event trigger extraction.
Results and Discussion
Empirical results demonstrate that ACT significantly narrows the gap between zero-shot prompting and full supervised fine-tuning. On the FIGER entity typing task, ACT achieved a 61.5 F1 score using zero human labels, nearly matching the 63.8 F1 of a model trained on a fully labeled dataset.
As shown in the figure above, ACT consistently outperforms both the base model and simple constraint-augmented prompting. In complex scenarios involving both label options and hierarchical constraints, ACT's performance (61.3 CSR) is identical to that of full supervised fine-tuning, highlighting its efficiency in learning from automated feedback.
Furthermore, the study found that constraint-following behavior is transferable. A model trained to be extractive for entity typing automatically improved its performance in event extraction tasks without additional task-specific training. This suggests that ACT helps models learn generalizable "behaviors" rather than just memorizing task-specific patterns.
Conclusion and Future Work
ACT provides a powerful alternative to human-centric data labeling by leveraging programmatic constraints as a supervision signal. While the framework requires an initial "warm-up" for highly complex tasks to ensure the model can generate at least some valid responses, it offers a scalable path for LLM customization. Future research may explore "meta-verifiers," where LLMs are used to automatically generate the Python code for constraint verifiers based on natural language task descriptions, further reducing the human effort required for model alignment.
Summary updated