UQO Working Paper No. 2 — Decoding Real Estate Descriptions: text-based hedonic analysis of housing listings.
1% Author: Simon-Pierre Boucher — contact@spboucher.ai2%3%======================================================================4\section{Methodology} \label{sec:methodology}5%======================================================================67\subsection{Overview}89The framework transforms unstructured listing text into a set of interpretable features through a four-stage pipeline, illustrated in Figure~\ref{fig:methodology}: (1)~extraction of the listing descriptions; (2)~encoding into dense vector representations with a pre-trained sentence transformer; (3)~computation of cosine similarities against a set of researcher-designed reference descriptions; and (4)~estimation of hedonic price equations in which the similarities enter as named covariates.1011\begin{figure}[!htbp]12\centering13\includegraphics[width=\textwidth]{fig7_methodology.pdf}14\caption{Methodological framework: from listing text to hedonic price estimates.}15\label{fig:methodology}16\begin{minipage}{0.9\textwidth}17\footnotesize18Notes: The four stages are (1) text extraction, (2) sentence embedding, (3) cosine similarity against 20 reference descriptions and (4) hedonic estimation.19\end{minipage}20\end{figure}2122\subsection{Text Extraction}2324Each listing includes a \textit{PublicRemarks} field containing the broker-written description. We apply minimal preprocessing: listings with descriptions shorter than 20 characters are excluded as uninformative, and listings with missing or non-positive prices are removed. We deliberately avoid stemming, lemmatisation or stop-word removal, because the sentence transformer is designed to process natural-language text and handles tokenisation internally. In addition to the embedding-based features, we record the description length $\ell_i$ (number of characters) as a control: length may proxy for broker effort, property complexity or market conditions, and including it ensures that the semantic features capture content rather than verbosity. We also classify each description as French, English or mixed from counts of language-specific stop words (Section~\ref{sec:data}); the classification is used in the extended specifications of Section~\ref{sec:extended}.2526\subsection{Sentence Embedding}2728Each description $d_i$ is encoded into a unit-length vector with the all-MiniLM-L6-v2 sentence transformer \citep{wang2020minilm, reimers2019sentence}:29\begin{equation}30\bfe_i = f_{\bftheta}(d_i) \in \R^{384}, \qquad \lVert \bfe_i \rVert_2 = 1. \label{eq:embed}31\end{equation}32The model has six transformer layers with 384 hidden dimensions; token embeddings are mean-pooled and $L_2$-normalised. The corpus of 17,087 descriptions is encoded in about 14 seconds on an Apple-silicon laptop. The model was trained predominantly on English paraphrase data; its behaviour on French text, and the consequences for a bilingual corpus, are examined directly in Section~\ref{sec:language}, where we also re-run the analysis with a multilingual encoder, paraphrase-multilingual-MiniLM-L12-v2, which was distilled to map translations of the same sentence to nearby vectors \citep{reimers2020multilingual}.3334\subsection{Reference Description Design}3536\subsubsection{Rationale}3738The central design choice is the construction of reference descriptions that serve as semantic anchors. Rather than reducing the 384-dimensional embedding by an unsupervised method (principal components, autoencoders), which yields features without economic names, we project each listing's embedding onto axes defined by the researcher. Each axis is a reference text that embodies one qualitative housing dimension.3940The idea is analogous to factor-mimicking portfolios in asset pricing \citep{fama1993common}: just as a Fama--French factor is a portfolio constructed to load on a risk dimension, a reference description is a synthetic text constructed to load on a quality dimension. Within the text-as-data toolkit, the design is a semantic generalisation of the dictionary method \citep{loughran2011liability, gentzkow2019text}: a reference plays the role of a curated word list, but the matching operates in embedding space, so paraphrases and synonyms contribute without being enumerated. It is also related to anchor-based zero-shot classification, where label descriptions serve as fixed textual anchors \citep{yin2019benchmarking}, except that we retain the continuous similarity scores as regression covariates instead of discretising them into class labels.4142\subsubsection{Reference Categories and Design Principles}4344We define 20 reference descriptions spanning six domains of housing quality (Table~\ref{tab:references}). Each reference is a synthetic paragraph of 150--260 characters written in French, the majority language of the corpus, listing the vocabulary and phrasing characteristic of its dimension; the verbatim texts are reproduced in Appendix~\ref{app:references}. Three principles guided their design: \textit{semantic saturation} (each reference lists several synonyms and related phrases to cover its dimension broadly); \textit{dimensional specificity} (each reference targets a single dimension); and \textit{linguistic consistency} (all references use vocabulary typical of Quebec listings). The second principle is imperfectly met: several references share phrases---Land \& Nature mentions waterfront access, Modern/Contemporary mentions new construction and energy efficiency, Premium Location mentions schools, parks and family neighbourhoods---and these overlaps, visible in Appendix~\ref{app:references}, matter for the interpretation of individual coefficients (Section~\ref{sec:extended}).4546\input{tables/tab_references}4748\subsection{Cosine Similarity}4950For property $i$ and reference $j$, with $\mathbf{r}_j$ the $L_2$-normalised embedding of the $j$-th reference,51\begin{equation}52s_{ij} = \bfe_i \cdot \mathbf{r}_j \in [-1, 1], \qquad j = 1, \dots, 20. \label{eq:sim}53\end{equation}54Stacking the embeddings in $\mathbf{E} \in \R^{n \times 384}$ and the references in $\mathbf{R} \in \R^{20 \times 384}$, the similarity matrix is $\mathbf{S} = \mathbf{E}\mathbf{R}' \in \R^{n \times 20}$, a single matrix product. A higher $s_{ij}$ indicates that the listing uses language closer in meaning to reference $j$. Because every listing is compared with every reference, the 20 columns of $\mathbf{S}$ share whatever is common to the listing's embedding---its language, its register, its length---and are therefore strongly correlated; Sections~\ref{sec:results} and~\ref{sec:extended} document and address this feature of the design.5556\subsection{Hedonic Specifications}5758Let $\bfX_i$ collect six structural variables (bedrooms, bathrooms, half-bathrooms, parking spaces, storeys and the lot-size field), $\ell_i$ the description length and $\bfs_i = (s_{i1}, \dots, s_{i20})'$ the similarity vector. We estimate five nested specifications by ordinary least squares:59\begin{align}60\text{Model A:} \quad \ln P_i &= \alpha + \bfbeta' \bfX_i + \eps_i, \label{eq:modelA} \\61\text{Model B:} \quad \ln P_i &= \alpha + \bfbeta' \bfX_i + \delta\, \ell_i + \eps_i, \label{eq:modelB} \\62\text{Model C:} \quad \ln P_i &= \alpha + \bfbeta' \bfX_i + \bfgamma' \bfs_i + \eps_i, \label{eq:modelC} \\63\text{Model D:} \quad \ln P_i &= \alpha + \bfbeta' \bfX_i + \delta\, \ell_i + \bfgamma' \bfs_i + \eps_i, \label{eq:modelD} \\64\text{Model E:} \quad \ln P_i &= \alpha + \bfbeta' \bfX_i + \delta\, \ell_i + \bfgamma_{\mathrm{sig}}' \bfs_i^{\mathrm{sig}} + \eps_i, \label{eq:modelE}65\end{align}66where $\bfs_i^{\mathrm{sig}}$ retains the similarities that are individually significant at the 5\% level in Model~D. All covariates are standardised to zero mean and unit variance on the estimation sample before estimation, so that each coefficient measures the change in log price associated with a one-standard-deviation change in the covariate. The semi-logarithmic form follows \citet{halvorsen1981choice}; \citet{cropper1988choice} show that simple parametric forms are preferable to flexible transformations when attributes are measured with error or omitted, which is the case here. Standard errors are heteroskedasticity-consistent (HC3), the variant recommended by \citet{mackinnon1985some}.6768\paragraph{Interpretation of the semantic coefficients.} Because $s_{ij}$ is standardised, the coefficient $\gamma_j$ is the change in $\ln P$ for a one-standard-deviation increase in similarity to reference $j$, holding the other covariates fixed, and the corresponding proportional price change is69\begin{equation}70100 \times \left( e^{\gamma_j} - 1 \right) \ \text{per cent per standard deviation of } s_j . \label{eq:impact}71\end{equation}72Equivalently, since the standard deviations of the 20 similarities lie between 0.11 and 0.17 (Table~\ref{tab:sim_stats}), the coefficient per unit of cosine similarity is $\gamma_j / \sigma_{s_j}$, and a 0.10 increase in cosine similarity---roughly the distance between the median listing and the top quartile---changes log price by about $0.10\,\gamma_j / \sigma_{s_j}$. We report Equation~(\ref{eq:impact}) throughout and refer to it as the price impact per standard deviation. These are partial associations in a cross-section of listing prices; the identification discussion below explains why they are not causal effects of wording.7374\paragraph{Joint test of the text block.} The incremental contribution of the 21 text variables (length and the 20 similarities) is tested with75\begin{equation}76F = \frac{(\mathrm{SSR}_A - \mathrm{SSR}_D) / q}{\mathrm{SSR}_D / (n - k - 1)}, \qquad q = 21,\ k = 27, \label{eq:ftest}77\end{equation}78where $\mathrm{SSR}$ denotes the residual sum of squares, $q$ the number of restrictions and $k$ the number of regressors in Model~D excluding the intercept. Equation~(\ref{eq:ftest}) assumes homoskedasticity; in Section~\ref{sec:extended} we report heteroskedasticity- and cluster-robust Wald tests of the 20 semantic coefficients, overall and by domain, which do not.7980\subsection{Extended Specifications} \label{sec:extended_methods}8182The first version of this paper stopped at Models A--E. The present revision adds specifications that address three threats to interpretation: the language of the listing, unobserved location, and measurement error in the lot-size field. Let $L_i$ be a pair of indicators for English and mixed-language descriptions, and let $g(i)$ denote the forward sortation area (FSA, the first three characters of the postal code) or the municipality of listing $i$. The extended model is83\begin{equation}84\ln P_i = \alpha_{g(i)} + \bfbeta' \bfX_i + \delta\, \ell_i + \boldsymbol{\lambda}' L_i + \bfgamma' \bfs_i + \eps_i, \label{eq:modelFE}85\end{equation}86estimated by the within transformation (all variables demeaned within $g$). The area effects $\alpha_{g}$ absorb location-specific price levels, so that $\bfgamma$ is identified from variation among listings in the same FSA or municipality. Because listings in the same area share unobserved shocks and because the fixed effects define the sampling structure, standard errors are clustered by area \citep{cameron2015practitioner, abadie2023when}; with 415 FSAs the cluster count is ample. In variants of Equation~(\ref{eq:modelFE}) the raw lot-size field is replaced by the logarithm of the lot area converted to square metres with an indicator for missing values, and the logarithm of the interior floor area is added on the subsample that reports it.8788\paragraph{Out-of-sample validation.} In-sample $R^2$ gains can overstate the value of added regressors. We therefore evaluate each specification by five-fold cross-validation \citep{hastie2009elements}, with random folds and with folds that hold out entire FSAs so that no held-out listing shares an area with the training data \citep{roberts2017cross}. For held-out predictions $\hat y_i$ of $y_i = \ln P_i$,89\begin{align}90R^2_{\mathrm{oos}} &= 1 - \frac{\sum_i (y_i - \hat y_i)^2}{\sum_i (y_i - \bar y)^2}, \label{eq:r2oos} \\91\mathrm{MdAPE} &= \operatorname{median}_i \left| \frac{e^{\hat y_i} - P_i}{P_i} \right| \times 100, \label{eq:mdape}92\end{align}93together with the root mean squared error in log points. The median absolute percentage error is the accuracy measure conventionally used for automated valuation models.9495\subsection{Identification and Interpretation} \label{sec:identification}9697The coefficients on the semantic similarities are \textit{conditional associations}---implicit semantic price gradients---rather than causal effects of wording. This follows the modern reading of cross-sectional hedonic coefficients as equilibrium price gradients rather than structural willingness-to-pay parameters \citep{ekeland2004identification, kuminoff2013new}, and it is reinforced by the way listing text is produced. The description is written by the broker after the asking price has been set, with knowledge of the property, of the price and of the targeted buyer segment. Text and price are therefore jointly determined by the same information set, and three channels could generate the observed correlations.9899\textbf{Information channel.} Brokers describe observable attributes that affect prices but are absent from the structural fields. The similarities then proxy for genuine quality dimensions---finishes, condition, natural setting---and the coefficients have a hedonic interpretation as implicit prices of unmeasured quality.100101\textbf{Persuasion and positioning channel.} Brokers choose language to match the price point they have set: a property priced for the luxury segment is described in luxury vocabulary, and a property priced to sell quickly is described with urgency cues. Under this channel the coefficient measures how price-driven wording is, not how wording drives prices.102103\textbf{Omitted-location channel.} Listing language proxies for locational characteristics correlated with price. Family-oriented marketing characterises suburban markets; new-construction vocabulary characterises peripheral developments; the English language characterises the western part of the Montr\'eal region and the Outaouais, where prices are higher. Fixed effects at the FSA or municipality level absorb between-area price differences but not within-area location quality.104105The cross-sectional design cannot separate these channels, and the paper does not attempt to. The estimates are informative about the information content of broker narratives, about the segmentation of the market along qualitative lines and about the predictive value of text for valuation. They do not establish that rewriting a description would change its price, and we avoid any language suggesting that semantic similarity ``causes'' or ``determines'' prices. Likewise, because prices are asking prices rather than transaction prices, the coefficients describe the pricing behaviour of sellers and brokers conditional on the text they wrote, not the valuation of buyers.106