Course Project for INLP 26 A verifiable, multi-stage NLP pipeline for legal text simplification.
π View Pipeline Outputs (All Stages)
Juris-Clarify translates complex legal contracts into accessible language while formally guaranteeing semantic faithfulness. Unlike standard generative LLMs, our Writer-Critic architecture prevents "semantic drift" by explicitly extracting constraints and verifying outputs using Natural Language Inference (NLI).
The system is divided into five modular stages:
BART model generates simplified text while explicitly preserving the constraints extracted in Stage 2.DeBERTa-v3 critic checks if the simplified text logically entails the original. If not, it rejects the text and triggers regeneration.Flan-T5 model adapts the verified text to match the reading levels of specific audiences (Layperson, Student, or Professional).results/kaggle/working
βββ exp1 (Stage 1)
βΒ Β βββ best_model
βΒ Β βΒ Β βββ config.json # Model configuration settings
βΒ Β βΒ Β βββ model.pt
βΒ Β βΒ Β βββ tokenizer_config.json # Tokenizer configuration settings
βΒ Β βΒ Β βββ tokenizer.json # Serialized tokenizer vocabulary
βΒ Β βββ best_threshold.json # Optimal threshold computed for predictions
βΒ Β βββ data
βΒ Β βΒ Β βββ test.jsonl # Stage 1 formatted test split
βΒ Β βΒ Β βββ train.jsonl # Stage 1 formatted train split
βΒ Β βΒ Β βββ val.jsonl # Stage 1 formatted validation split
βΒ Β βββ test_results.json # Model evaluation results on the test data
βββ stage1_predictions
βΒ Β βββ predicted_test.jsonl # Model predictions on test subset
βΒ Β βββ predicted_train.jsonl # Model predictions on train subset
βΒ Β βββ predicted_val.jsonl # Model predictions on validation subset
βββ stage2_output
βΒ Β βββ checkpoints
βΒ Β βΒ Β βββ best_model
βΒ Β βΒ Β βββ constraint_config.json # Stage 2 model configuration
βΒ Β βΒ Β βββ constraint_model.pt
βΒ Β βΒ Β βββ tokenizer_config.json
βΒ Β βΒ Β βββ tokenizer.json
βΒ Β βββ demo_output.json # Sample demonstration outputs from Stage 2
βΒ Β βββ eval_metrics.json # Quantitative metrics for the Stage 2 model
βΒ Β βββ final_model
βΒ Β βΒ Β βββ constraint_config.json
βΒ Β βΒ Β βββ constraint_model.pt
βΒ Β βΒ Β βββ tokenizer_config.json
βΒ Β βΒ Β βββ tokenizer.json
βΒ Β βββ test_constraints.json # Test data with constraint pairs
βΒ Β βββ train_constraints.json # Training data with constraint pairs
βΒ Β βββ training_history.json # Epoch-wise training and validation logs
βΒ Β βββ val_constraints.json # Validation data with constraint pairs
βββ stage3_output
βΒ Β βββ evaluation_metrics.json # Evaluation metrics from simplification
βΒ Β βββ simplified_test_clauses.json # Stage 3 text simplification results
βΒ Β βββ synthetic_pairs.json # Synthetic positive/negative pairs generated for Stage 3
βΒ Β βββ training_history.json # Stage 3 epoch-wise progress logs
βββ stage4_output
βΒ Β βββ human_review_queue.json # Simplifications flagged by NLI that require human review
βΒ Β βββ stage4_evaluation_metrics.json # Efficacy metrics post-NLI correction loop
βΒ Β βββ stage4_simplified_clauses.json # Refined simplifications fully conforming to NLI entailment
βββ stage5_output
βββ persona_targets.json # Final output mapped to user-specific personas
Course Project for INLP 26 A verifiable, multi-stage NLP pipeline for legal text simplification.
π View Pipeline Outputs (All Stages)
Juris-Clarify translates complex legal contracts into accessible language while formally guaranteeing semantic faithfulness. Unlike standard generative LLMs, our Writer-Critic architecture prevents "semantic drift" by explicitly extracting constraints and verifying outputs using Natural Language Inference (NLI).
The system is divided into five modular stages:
BART model generates simplified text while explicitly preserving the constraints extracted in Stage 2.DeBERTa-v3 critic checks if the simplified text logically entails the original. If not, it rejects the text and triggers regeneration.Flan-T5 model adapts the verified text to match the reading levels of specific audiences (Layperson, Student, or Professional).results/kaggle/working
βββ exp1 (Stage 1)
βΒ Β βββ best_model
βΒ Β βΒ Β βββ config.json # Model configuration settings
βΒ Β βΒ Β βββ model.pt
βΒ Β βΒ Β βββ tokenizer_config.json # Tokenizer configuration settings
βΒ Β βΒ Β βββ tokenizer.json # Serialized tokenizer vocabulary
βΒ Β βββ best_threshold.json # Optimal threshold computed for predictions
βΒ Β βββ data
βΒ Β βΒ Β βββ test.jsonl # Stage 1 formatted test split
βΒ Β βΒ Β βββ train.jsonl # Stage 1 formatted train split
βΒ Β βΒ Β βββ val.jsonl # Stage 1 formatted validation split
βΒ Β βββ test_results.json # Model evaluation results on the test data
βββ stage1_predictions
βΒ Β βββ predicted_test.jsonl # Model predictions on test subset
βΒ Β βββ predicted_train.jsonl # Model predictions on train subset
βΒ Β βββ predicted_val.jsonl # Model predictions on validation subset
βββ stage2_output
βΒ Β βββ checkpoints
βΒ Β βΒ Β βββ best_model
βΒ Β βΒ Β βββ constraint_config.json # Stage 2 model configuration
βΒ Β βΒ Β βββ constraint_model.pt
βΒ Β βΒ Β βββ tokenizer_config.json
βΒ Β βΒ Β βββ tokenizer.json
βΒ Β βββ demo_output.json # Sample demonstration outputs from Stage 2
βΒ Β βββ eval_metrics.json # Quantitative metrics for the Stage 2 model
βΒ Β βββ final_model
βΒ Β βΒ Β βββ constraint_config.json
βΒ Β βΒ Β βββ constraint_model.pt
βΒ Β βΒ Β βββ tokenizer_config.json
βΒ Β βΒ Β βββ tokenizer.json
βΒ Β βββ test_constraints.json # Test data with constraint pairs
βΒ Β βββ train_constraints.json # Training data with constraint pairs
βΒ Β βββ training_history.json # Epoch-wise training and validation logs
βΒ Β βββ val_constraints.json # Validation data with constraint pairs
βββ stage3_output
βΒ Β βββ evaluation_metrics.json # Evaluation metrics from simplification
βΒ Β βββ simplified_test_clauses.json # Stage 3 text simplification results
βΒ Β βββ synthetic_pairs.json # Synthetic positive/negative pairs generated for Stage 3
βΒ Β βββ training_history.json # Stage 3 epoch-wise progress logs
βββ stage4_output
βΒ Β βββ human_review_queue.json # Simplifications flagged by NLI that require human review
βΒ Β βββ stage4_evaluation_metrics.json # Efficacy metrics post-NLI correction loop
βΒ Β βββ stage4_simplified_clauses.json # Refined simplifications fully conforming to NLI entailment
βββ stage5_output
βββ persona_targets.json # Final output mapped to user-specific personas