Skip to content

Instantly share code, notes, and snippets.

@nuxwin
Last active October 11, 2025 17:24
Show Gist options
  • Select an option

  • Save nuxwin/99906ea2fc503efa6e6db14db39b77fa to your computer and use it in GitHub Desktop.

Select an option

Save nuxwin/99906ea2fc503efa6e6db14db39b77fa to your computer and use it in GitHub Desktop.
Whitepaper: Parliamentary Vote Prediction: A Unified Vector Model for Predicting Parliamentary Voting Patterns

Whitepaper: Parliamentary Vote Prediction: A Unified Vector Model for Predicting Parliamentary Voting Patterns

Author: Laurent Declercq, CTO at AGON PARTNERS INNOVATION AG (https://agon-innovation.ch/) - AGON PARTNERS group (https://agon-partners.com)

Date: October 2025

Abstract

Predicting parliamentary voting behavior requires integrating two complementary dimensions of political representation, the declared ideological orientation and the empirically observed voting conduct.

This paper proposes a unified theoretical and computational framework for modeling and predicting legislative votes based on both ideological declarations (aspect-based) and behavioral evidence (vote-based).

The proposed model translates both representations into a common neutral-domain vector space, enabling direct quantitative comparison using Euclidean distance metrics. It introduces a hybrid vector formulation combining declared ideology and behavioral evidence through a tunable weighting parameter, allowing dynamic inference of political alignment.

The framework provides interpretability, empirical grounding, and computational precision, offering a generalizable model for political science and computational social modeling.

1. Introduction

Modeling and predicting legislative voting behavior is a longstanding challenge in political science and computational modeling. Traditional approaches, such as roll-call analysis (Poole & Rosenthal, 1985) or ideological scaling models (DW-NOMINATE, Wordfish), seek to map legislators along latent ideological dimensions inferred from their votes.

However, these methods often overlook declarative ideological stances and contextual interpretation of policy directions expressed in parliamentary discourse or manifestos.

This paper presents a dual-layered vector framework that integrates aspect-based ideological modeling and behavioral modeling of votes into a single interpretable system. It allows political positions to be represented, compared, and predicted in a neutral, symmetric domain space where ideological axes are balanced between restrictive and expansive poles. This approach bridges the gap between declared intent and observed behavior, enhancing both the interpretability and predictive capacity of computational models of political alignment.

2. Theoretical Background

2.1 Ideology and Behavior as Complementary Constructs

Ideological self-description and voting behavior represent distinct yet related manifestations of political alignment. Ideology captures normative orientation, how an actor thinks policy should evolve, while behavior captures pragmatic choice, how an actor acts when confronted with specific proposals.

Discrepancies between the two arise from strategic compromise, party discipline, or contextual factors. A predictive model that unites both representations can thus capture both intentional and empirical dimensions of alignment.

2.2 Related Work

Political scientists have long sought to quantify ideology. Poole and Rosenthal’s DW-NOMINATE model projects legislators into multidimensional spaces derived from roll-call data. More recent models (Lauderdale & Clark, 2014; Barberá, 2015) incorporate text and network data to enrich ideological scaling. In computational linguistics, transformer-based models have been applied to legislative texts to infer policy stances (Glavaš et al., 2020).

Yet few frameworks integrate textual ideology with voting data in a unified geometric model. The framework presented here aims to fill this methodological gap.

3. Aspect-Based Ideological Modeling

3.1 Ideological Axes

Aspect-based modeling defines ideology along predefined interpretative axes, each representing a directional stance on a core policy dimension. Typical axes include:

  1. Immigration Policy (Restrictive ↔ Expansive)
  2. Economic Policy (Regulated ↔ Market-oriented)
  3. Environmental Policy (Limited ↔ Strengthened)
  4. Welfare Policy (Minimal ↔ Inclusive)
  5. Fiscal Policy (Restrictive ↔ Expansive)
  6. Military Policy (Limited ↔ Strengthened)
  7. Political Institutions (Constrained ↔ Expanded)
  8. Security Policy (Lenient ↔ Strict)
  9. Social Policy (Conservative ↔ Liberal)
  10. Foreign Policy (Protectionist ↔ Open)

Each axis is defined by opposing poles representing restrictive and expansive tendencies. Legislators and policy proposals can be projected onto these axes as aspect vectors, with numerical values ranging from −1 (expansive) to +1 (restrictive).

3.2 Representation

Aspect vectors encode ideological alignment as a set of coordinates:

v_aspect = [A1, A2, ..., A10]

where each Ai ∈ [−1, +1] quantifies the actor’s stance along axis i. These vectors can be inferred from textual descriptions, party manifestos, or expert annotation. Direct comparison between legislators and policy proposals is enabled through Euclidean distance within the same reference space.

4. Behavioral (Vote-Based) Modeling

4.1 Empirical Foundation

The behavioral model derives ideology from recorded voting data. Each domain is represented by two opposite directions: restrictive and expansive.

For each legislator m and direction d, the empirical agreement ratio r(m,d) is computed:

r(m,d) = yes / (yes + no + abstain + present + absent)

This ratio captures the proportion of affirmative votes relative to all possible voting opportunities, normalized to account for abstentions and absences.

4.2 Neutral-Domain Transformation

To project behavior into a balanced ideological space, each domain’s restrictive and expansive directions are collapsed into a single neutral-domain coordinate:

A_m(D) = r(m, D⁺) - r(m, D⁻)

where D⁺ and D⁻ represent expansive and restrictive orientations. The resulting coordinate A_m(D) ∈ [−1, +1] encodes behavioral tendency along a symmetric ideological axis.

4.3 Member Voting Vector

Each legislator’s behavior is then represented as:

v_m = [A_m(D1), A_m(D2), ..., A_m(D10)]

This member voting vector expresses empirically grounded ideological patterns across all domains.

5. Mathematical Framework for Neutral-Domain Representation

5.1 Euclidean Distance as Ideological Proximity

To assess ideological similarity between a legislator and a policy proposal, the model employs Euclidean distance:

d(m,b) = sqrt(Σ_D (A_m(D) - A_b(D))²)

Smaller distances indicate stronger ideological proximity, implying higher probability of support.

6. Hybrid Ideology/Behavior Modeling

6.1 Conceptual Rationale

Aspect-based vectors capture declared or inferred ideology, while vote-based vectors capture empirical behavior. Integrating both allows the model to combine normative and behavioral dimensions of alignment. To ensure compatibility, aspect-based vectors (in restrictive reference) are converted into neutral-domain space:

v_m(aspect_neutral) = -v_m(aspect_restrictive)

6.2 Hybrid Vector Definition

The hybrid vector v_m(hybrid) is defined as a weighted combination of ideological and behavioral components:

v_m(hybrid) = α × v_m(aspect_neutral) + (1 − α) × v_m(vote)

where α ∈ [0,1] controls the weight between declared and behavioral evidence.

6.3 Hybrid Comparison

Ideological distance between a legislator and a proposal is computed as:

d_hybrid(m,b) = sqrt(Σ_D (A_m(hybrid, D) − A_b(D))²)

This measure captures the combined proximity of declared ideology and behavioral alignment, allowing dynamic adjustment depending on context or model calibration.

7. Prediction Methodology

  1. Domain Identification: Extract relevant policy domains from legislative text using classifier or embedding-based inference.
  2. Vector Construction: Generate business (proposal) vector in neutral-domain space.
  3. Legislator Vector Retrieval: Compute or retrieve each legislator’s vote-based and aspect-based vectors.
  4. Comparison: Compute distances under aspect-based, vote-based, and hybrid modes.
  5. Classification: Translate distances into categorical predictions (FOR, NEUTRAL, AGAINST).

8. Discussion

8.1 Interpretability and Symmetry

The neutral-domain space ensures that ideological interpretation remains symmetric, neither restrictive nor expansive positions dominate the metric.

8.2 Theoretical Significance

By unifying normative and empirical dimensions, this model aligns with both constructivist and behavioral traditions in political theory.

8.3 Computational Implications

Vector-based modeling enables scalability and integration with modern machine learning frameworks.

9. Limitations and Future Work

Future research should explore adaptive domain learning, multilingual embedding integration, and probabilistic hybrid weighting (e.g., Bayesian α estimation).

10. Conclusion

This paper presents a unified, interpretable, and empirically grounded framework for predicting parliamentary votes. The hybrid vector formulation allows dynamic balancing of ideology and evidence, advancing the field toward more comprehensive and transparent models of political alignment.

Appendix A : Mathematical and Code Equivalents

from math import sqrt

def agreement_ratio(yes: int, no: int, abstain: int, present: int, absent: int) -> float:
    """
    Compute the agreement ratio for a legislator in a given direction.
    
    :param yes: Number of 'yes' votes.
    :param no: Number of 'no' votes.
    :param abstain: Number of 'abstain' votes.
    :param present: Number of 'present' votes.
    :param absent: Number of 'absent' votes.
    :return: Agreement ratio (float).
    """
    total = yes + no + abstain + present + absent

    return yes / total if total > 0 else 0.0

def domain_alignment(r_expansive: float, r_restrictive: float) -> float:
    """
    Compute the domain alignment in neutral-domain space.

    :param r_expansive: Agreement ratio in the expansive direction.
    :param r_restrictive: Agreement ratio in the restrictive direction.
    :return: Domain alignment (float).
    """
    return r_expansive - r_restrictive

def euclidean_distance(vec_member: list[float], vec_business: list[float]) -> float:
    """
    Compute the Euclidean distance between two vectors.
    
    :param vec_member: Vector of the legislator.
    :param vec_business: Vector of the business (proposal).
    :return: Euclidean distance (float).
    """
    return sqrt(sum((m - b) ** 2 for m, b in zip(vec_member, vec_business)))

def hybrid_vector(vec_aspect, vec_vote, alpha=0.5) -> list[float]:
    """
    Compute the hybrid vector as a weighted combination of aspect-based and vote-based vectors.

    :param vec_aspect: Aspect-based vector (in neutral-domain space).
    :param vec_vote: Vote-based vector.
    :param alpha: Weighting factor (0 <= alpha <= 1).
    :return: A hybrid vector (list of floats).
    """
    return [alpha * a + (1 - alpha) * v for a, v in zip(vec_aspect, vec_vote)]

Appendix B : Coordinate Reference Conversion

Context From To Conversion Use
Business → Aspect Neutral Restrictive ( v_b(restrictive) = -v_b(neutral) ) Aspect prediction
Vote → Aspect Neutral Restrictive ( v_m(restrictive) = -v_m(vote) ) Visualization
Aspect → Vote Restrictive Neutral ( v_m(neutral) = -v_m(aspect) ) Hybrid computation

References

  • Barberá, P. (2015). Birds of the same feather tweet together: Bayesian ideal point estimation using Twitter data. Political Analysis, 23(1), 76–91.
  • Glavaš, G., et al. (2020). Political ideology detection using contextualized representations. ACL Proceedings.
  • Lauderdale, B. E., & Clark, T. S. (2014). Scaling politically meaningful dimensions using texts and votes. American Journal of Political Science, 58(3), 754–771.
  • Poole, K. T., & Rosenthal, H. (1985). A spatial model for legislative roll call analysis. American Journal of Political Science, 29(2), 357–384.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment